Home | Trees | Indices | Help |
|
---|
|
object --+ | type --+ | StructType
is a metaclass for the representation of structured data.
StructType classes with this will be called structures within the DC software.
Structures do quite a bit of the managed attribute nonsense to meaningfully catch crazy user input.
Basically, you give a Structure class attributes (preferably with underscores in front) specifying the attributes the instances should have and how they should be handled.
Structures must be constructed with a parent (for the root element, this is None). All other arguments should be keyword arguments. If given, they have to refer to existing attributes, and their values will directly give the the values of the attribute (i.e., parsed values).
Structures should always inherit from StructBase below and arrange for its constructor to be called, since, e.g., default processing happens there.
Structures have a managedAttrs dictionary containing names and attrdef.AttributeDef objects for the defined attributes.
Instance Methods | |||
the object's type |
|
||
|
|||
|
|||
Inherited from Inherited from |
Class Variables | |
__implemented__ = <implementedBy gavo.base.structure.StructType>
|
Properties | |
Inherited from Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
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. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |