Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes | Static Private Attributes
pymake.parserdata.IfdefCondition Class Reference
Inheritance diagram for pymake.parserdata.IfdefCondition:
Inheritance graph
[legend]
Collaboration diagram for pymake.parserdata.IfdefCondition:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def evaluate
def __str__

Public Attributes

 exp
 expected

Static Private Attributes

tuple __slots__ = ('exp', 'expected')

Detailed Description

Definition at line 307 of file parserdata.py.


Constructor & Destructor Documentation

def pymake.parserdata.IfdefCondition.__init__ (   self,
  exp 
)

Definition at line 310 of file parserdata.py.

00310 
00311     def __init__(self, exp):
00312         assert isinstance(exp, (data.Expansion, data.StringExpansion))
00313         self.exp = exp
00314         self.expected = True


Member Function Documentation

Definition at line 324 of file parserdata.py.

00324 
00325     def __str__(self):
00326         return "ifdef (expected=%s) %s" % (self.expected, self.exp)

def pymake.parserdata.IfdefCondition.evaluate (   self,
  makefile 
)

Definition at line 315 of file parserdata.py.

00315 
00316     def evaluate(self, makefile):
00317         vname = self.exp.resolvestr(makefile, makefile.variables)
00318         flavor, source, value = makefile.variables.get(vname, expand=False)
00319 
00320         if value is None:
00321             return not self.expected
00322 
00323         return (len(value) > 0) == self.expected


Member Data Documentation

tuple pymake.parserdata.IfdefCondition.__slots__ = ('exp', 'expected') [static, private]

Definition at line 308 of file parserdata.py.

Definition at line 312 of file parserdata.py.

Definition at line 313 of file parserdata.py.


The documentation for this class was generated from the following file: