Package gavo :: Package rscdef :: Module rmkdef :: Class ApplyDef
[frames] | no frames]

Class ApplyDef

source code

                   object --+                    
                            |                    
 base.structure.StructureBase --+                
                                |                
                   object --+   |                
                            |   |                
           base.common.Parser --+                
                                |                
base.structure.ParseableStructure --+            
                                    |            
             base.structure.Structure --+        
                                        |        
                           object --+   |        
                                    |   |        
      base.structure.RestrictionMixin --+        
                                        |        
                          procdef.ProcDef --+    
                                            |    
                              procdef.ProcApp --+
                                                |
                                               ApplyDef

A code fragment to manipulate the result row (and possibly more).

Apply elements allow embedding python code in rowmakers.

The current input fields from the grammar (including the rowmaker's vars) are available in the vars dictionary and can be changed there. You can also add new keys.

You can add new keys for shipping out in the result dictionary.

The active rowmaker is available as parent. It is also used to expand macros.

The table that the rowmaker feeds to can be accessed as targetTable. You probably only want to change meta information here (e.g., warnings or infos).

As always in procApps, you can get the embedding RD as rd; this is useful to, e.g., resolve references using rd.getByRD, and specify resdir-relative file names using rd.getAbsPath.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
getFuncCode(self)
returns a function definition for this proc application.
source code

Inherited from procdef.ProcApp: breakCircles, compile, completeElement, getBodySetupCode, getLateSetupCode, getParSetupCode, getSetupCode, getSetupPars, onElementComplete, validate

Inherited from procdef.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
  name_ = 'apply'
hash(x)
  requiredType = 'apply'
hash(x)
  formalArgs = 'vars, result, targetTable, _self'

Inherited from procdef.ProcApp: additionalNamesForProcs, attrSeq, managedAttrs

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Method Details

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.

Overrides: procdef.ProcApp.getFuncCode
(inherited documentation)