Package gavo :: Package base :: Module structure :: Class Structure
[frames] | no frames]

Class Structure

source code

    object --+        
             |        
 StructureBase --+    
                 |    
    object --+   |    
             |   |    
 common.Parser --+    
                 |    
ParseableStructure --+
                     |
                    Structure
Known Subclasses:

is the base class for user-defined structures.

It will do some basic validation and will call hooks to complete elements and compute computed attributes, based on ParseableStructure's finishElement hook.

Also, it supports onParentComplete callbacks; this works by checking if any managedAttr has a onParentComplete method and calling it with the current value of that attribute if necessary.

Nested Classes

Inherited from StructureBase: __metaclass__, name_

Instance Methods
 
__provides__(...)
Special descriptor for class __provides__
 
callCompletedCallbacks(self) source code
 
completeElement(self, ctx) source code
 
finishElement(self, ctx=None) source code
 
onElementComplete(self) source code
 
validate(self) source code

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

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

Inherited from common.Parser: feedEvent

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

Class Methods

Inherited from StructureBase: fromStructure

Class Variables
  __implemented__ = <implementedBy gavo.base.structure.Structure>

Inherited from StructureBase: attrSeq, completedCallbacks, managedAttrs

Properties

Inherited from object: __class__

Method Details

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

Overrides: common.Parser.__provides__

finishElement(self, ctx=None)

source code 
Overrides: ParseableStructure.finishElement