Package gavo :: Package rscdef :: Module procdef :: Class ProcDef
[frames] | no frames]

Class ProcDef

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                           object --+   |
                                    |   |
      base.structure.RestrictionMixin --+
                                        |
                                       ProcDef
Known Subclasses:

An embedded procedure.

Embedded procedures are python code fragments with some interface defined by their type. They can occur at various places (which is called procedure application generically), e.g., as row generators in grammars, as applys in rowmakers, or as SQL phrase makers in condDescs.

They consist of the actual actual code and, optionally, definitions like the namespace setup, configuration parameters, or a documentation.

The procedure applications compile into python functions with special global namespaces. The signatures of the functions are determined by the type attribute.

ProcDefs are referred to by procedure applications using their id.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
getCode(self)
returns the body code indented with two spaces.
source code
 
getSetupPars(*args)
returns all parameters used by setup items, where lexically later items override earlier items of the same name.
source code
 
getLateSetupCode(self, boundNames) source code
 
getParSetupCode(self, boundNames) source code
 
getBodySetupCode(self, boundNames) source code

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, completeElement, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: __init__, end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'procDef'
a sentinel for all kinds of undefined values.
  attrSeq = [<gavo.base.attrdef.UnicodeAttribute object>, <gavo....
  managedAttrs = {'code': <gavo.base.attrdef.UnicodeAttribute ob...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Method Details

getSetupPars(*args)

source code 

returns all parameters used by setup items, where lexically later items override earlier items of the same name.

Decorators:
  • @utils.memoized

Class Variable Details

attrSeq

Value:
[<gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.base.parsecontext.OriginalAttribute object>,
 <gavo.base.complexattrs.StructListAttribute object>,
 <gavo.base.attrdef.EnumeratedUnicodeAttribute object>]

managedAttrs

Value:
{'code': <gavo.base.attrdef.UnicodeAttribute object>,
 'deprecated': <gavo.base.attrdef.UnicodeAttribute object>,
 'doc': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'original': <gavo.base.parsecontext.OriginalAttribute object>,
 'setup': <gavo.base.complexattrs.StructListAttribute object>,
 'setups': <gavo.base.complexattrs.StructListAttribute object>,
 'type': <gavo.base.attrdef.EnumeratedUnicodeAttribute object>}