Back to index

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

List of all members.

Public Member Functions

def resolve
def __getitem__
def setup
def append
def __len__

Public Attributes

 loc

Static Public Attributes

string name = 'call'
int minargs = 1
int maxargs = 0

Static Private Attributes

 __slots__ = Function.__slots__

Detailed Description

Definition at line 494 of file functions.py.


Member Function Documentation

def pymake.functions.Function.__getitem__ (   self,
  key 
) [inherited]

Definition at line 32 of file functions.py.

00032 
00033     def __getitem__(self, key):
00034         return self._arguments[key]

def pymake.functions.Function.__len__ (   self) [inherited]

Definition at line 47 of file functions.py.

00047 
00048     def __len__(self):
00049         return len(self._arguments)

def pymake.functions.Function.append (   self,
  arg 
) [inherited]

Definition at line 43 of file functions.py.

00043 
00044     def append(self, arg):
00045         assert isinstance(arg, (data.Expansion, data.StringExpansion))
00046         self._arguments.append(arg)

Here is the caller graph for this function:

def pymake.functions.CallFunction.resolve (   self,
  makefile,
  variables,
  fd,
  setting 
)

Definition at line 501 of file functions.py.

00501 
00502     def resolve(self, makefile, variables, fd, setting):
00503         vname = self._arguments[0].resolvestr(makefile, variables, setting)
00504         if vname in setting:
00505             raise data.DataError("Recursively setting variable '%s'" % (vname,))
00506 
00507         v = data.Variables(parent=variables)
00508         v.set('0', data.Variables.FLAVOR_SIMPLE, data.Variables.SOURCE_AUTOMATIC, vname)
00509         for i in xrange(1, len(self._arguments)):
00510             param = self._arguments[i].resolvestr(makefile, variables, setting)
00511             v.set(str(i), data.Variables.FLAVOR_SIMPLE, data.Variables.SOURCE_AUTOMATIC, param)
00512 
00513         flavor, source, e = variables.get(vname)
00514 
00515         if e is None:
00516             return
00517 
00518         if flavor == data.Variables.FLAVOR_SIMPLE:
00519             log.warning("%s: calling variable '%s' which is simply-expanded" % (self.loc, vname))
00520 
00521         # but we'll do it anyway
00522         e.resolve(makefile, v, fd, setting + [vname])

Here is the caller graph for this function:

def pymake.functions.Function.setup (   self) [inherited]

Reimplemented in pymake.functions.IfFunction, pymake.functions.SubstitutionRef, and pymake.functions.VariableRef.

Definition at line 35 of file functions.py.

00035 
00036     def setup(self):
00037         argc = len(self._arguments)
00038 
00039         if argc < self.minargs:
00040             raise data.DataError("Not enough arguments to function %s, requires %s" % (self.name, self.minargs), self.loc)
00041 
00042         assert self.maxargs == 0 or argc <= self.maxargs, "Parser screwed up, gave us too many args"


Member Data Documentation

Reimplemented from pymake.functions.Function.

Definition at line 499 of file functions.py.

Reimplemented in pymake.functions.SubstitutionRef, and pymake.functions.VariableRef.

Definition at line 29 of file functions.py.

Reimplemented from pymake.functions.Function.

Definition at line 497 of file functions.py.

Definition at line 496 of file functions.py.

string pymake.functions.CallFunction.name = 'call' [static]

Definition at line 495 of file functions.py.


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