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

Class ProcApp

source code

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

An abstract base for procedure applications.

Deriving classes need to provide:

They can, in addition, give a class attribute additionalNamesForProcs, which is a dictionary that is joined into the global namespace during procedure compilation.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
breakCircles(self)
removes the parent attributes from all child structures recusively.
source code
 
compile(self, parent=None)
returns a callable for this procedure application.
source code
 
completeElement(self, ctx) source code
 
getBodySetupCode(self, boundNames) source code
 
getFuncCode(self)
returns a function definition for this proc application.
source code
 
getLateSetupCode(self, boundNames) source code
 
getParSetupCode(self, boundNames) source code
 
getSetupCode(self) source code
 
getSetupPars(*args)
returns the setup parameters for the proc app, where procDef parameters may be overridden by self's parameters.
source code
 
onElementComplete(self) source code
 
validate(self) source code

Inherited from ProcDef: getCode

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, finishElement

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

Inherited from base.structure.StructureBase: __providedBy__, adopt, 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
  additionalNamesForProcs = {}
  attrSeq = [<gavo.base.complexattrs.StructListAttribute object>...
  managedAttrs = {'bind': <gavo.base.complexattrs.StructListAttr...
  requiredType = None
hash(x)

Inherited from ProcDef: name_

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Method Details

breakCircles(self)

source code 

removes the parent attributes from all child structures recusively.

The struct will probably be broken after this, but this is sometimes necessary to help the python garbage collector.

In case you're asking: parent cannot be a weak reference with the current parse architecture, as it usually is the only reference to the embedding object. Yes, we should probably change that.

Overrides: base.structure.StructureBase.breakCircles
(inherited documentation)

compile(self, parent=None)

source code 

returns a callable for this procedure application.

You can pass a different parent; it will then be used to expand macros. If you do not give it, the embedding structure will be used.

completeElement(self, ctx)

source code 
Overrides: base.structure.RestrictionMixin.completeElement

getBodySetupCode(self, boundNames)

source code 
Overrides: ProcDef.getBodySetupCode

getFuncCode(self)

source code 

returns a function definition for this proc application.

This includes bindings of late parameters.

Locally defined code overrides code defined in a procDef.

getLateSetupCode(self, boundNames)

source code 
Overrides: ProcDef.getLateSetupCode

getParSetupCode(self, boundNames)

source code 
Overrides: ProcDef.getParSetupCode

getSetupPars(*args)

source code 

returns the setup parameters for the proc app, where procDef parameters may be overridden by self's parameters.

Decorators:
  • @utils.memoized
Overrides: ProcDef.getSetupPars

onElementComplete(self)

source code 
Overrides: base.structure.Structure.onElementComplete

validate(self)

source code 
Overrides: base.structure.Structure.validate

Class Variable Details

attrSeq

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

managedAttrs

Value:
{'bind': <gavo.base.complexattrs.StructListAttribute object>,
 'bindings': <gavo.base.complexattrs.StructListAttribute object>,
 'code': <gavo.base.attrdef.UnicodeAttribute object>,
 'deprecated': <gavo.base.attrdef.UnicodeAttribute object>,
 'doc': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'name': <gavo.base.attrdef.UnicodeAttribute object>,
 'original': <gavo.base.parsecontext.OriginalAttribute object>,
...