Home | Trees | Indices | Help |
|
---|
|
object --+ | StructureBase
is a base class for all structures.
You must arrange for calling its constructor from classes inheriting this.
The constructor receives a parent (another structure, or None) and keyword arguments containing values for actual attributes (which will be set without any intervening consultation of the AttributeDef).
The attribute definitions talking about structures let you set parent to None when constructing default values; they will then insert the actual parent.
Nested Classes | |
__metaclass__ is a metaclass for the representation of structured data. |
|
name_ a sentinel for all kinds of undefined values. |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Class Methods | |||
|
Class Variables | |
__implemented__ = <implementedBy gavo.base.structure.Structure
|
|
attrSeq =
|
|
completedCallbacks =
|
|
managedAttrs =
|
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
returns a dict of the current attributes, suitable for making a shallow copy of self. Struct attributes will not be reparented, so there are limits to what you can do with such shallow copies. |
returns a dictionary mapping attribute names to copyable children. ignoreKeys can be a set or dict of additional attribute names to ignore. The children are orphan deep copies. |
returns a deep copy of self, reparented to parent. This is a shallow wrapper around change, present for backward compatibility. |
iterates over structure children of self. To make this work, attributes containing structs must define iterChildren methods (and the others must not). |
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. |
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. |
Class Variable Details |
__implemented__
|
managedAttrs
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |