Package gavo :: Package base :: Module complexattrs :: Class StructAttribute
[frames] | no frames]

Class StructAttribute

source code

          object --+    
                   |    
attrdef.AttributeDef --+
                       |
                      StructAttribute
Known Subclasses:

describes an attribute containing a Structure

These are constructed with a childFactory that must have a feedEvent method. Otherwise, they are normal structs, i.e., the receive a parent as the first argument and keyword arguments for values.

In addition, you can pass a onParentComplete callback that are collected in the completedCallback list by the struct decorator. ParseableStruct instances call these when they receive their end event during XML deserialization.

Instance Methods
 
__init__(self, name, childFactory, default=<Undefined>, description='Undocumented', **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
feedObject(self, instance, value) source code
 
feed(self, ctx, instance, value) source code
 
create(self, structure, ctx, name) source code
 
getCopy(self, instance, newParent, ctx) source code
 
replace(self, instance, oldStruct, newStruct) source code
 
iterEvents(self, instance) source code
 
iterChildren(self, instance) source code
 
remove(self, child) source code
 
onParentComplete(self, val) source code
 
makeUserDoc(self) source code

Inherited from attrdef.AttributeDef: doCallbacks, iterParentMethods

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

Properties
  typeDesc_

Inherited from object: __class__

Method Details

__init__(self, name, childFactory, default=<Undefined>, description='Undocumented', **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

feedObject(self, instance, value)

source code 
Overrides: attrdef.AttributeDef.feedObject

feed(self, ctx, instance, value)

source code 
Overrides: attrdef.AttributeDef.feed

getCopy(self, instance, newParent, ctx)

source code 
Overrides: attrdef.AttributeDef.getCopy

makeUserDoc(self)

source code 
Overrides: attrdef.AttributeDef.makeUserDoc

Property Details

typeDesc_

Get Method:
unreachable.typeDesc_(self)