Package gavo :: Package base :: Module meta :: Class MetaAttribute
[frames] | no frames]

Class MetaAttribute

source code

          object --+    
                   |    
attrdef.AttributeDef --+
                       |
                      MetaAttribute

An attribute magically inserting meta values to Structures mixing in MetaMixin.

We don't want to keep metadata itself in structures for performance reasons, so we define a parser of our own in here.

Instance Methods
 
__init__(self, description='Metadata')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
feedObject(self, instance, value) source code
 
getCopy(self, parent, newParent, ctx)
creates a deep copy of the current meta dictionary and returns it.
source code
 
create(self, parent, ctx, name) source code
 
makeUserDoc(self) source code
 
iterEvents(self, instance) source code

Inherited from attrdef.AttributeDef: doCallbacks, feed, iterParentMethods

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

Class Variables
  typedesc = 'Metadata'

Inherited from attrdef.AttributeDef: typeDesc_

Properties
  default_

Inherited from object: __class__

Method Details

__init__(self, description='Metadata')
(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

getCopy(self, parent, newParent, ctx)

source code 

creates a deep copy of the current meta dictionary and returns it.

This is used when a MetaMixin's attribute is set to copyable and a meta carrier is copied. As there's currently no way to make the _metaAttr copyable, this isn't called by itself. If you must, you can manually call this (_metaAttr.getCopy), but that'd really be an indication the interface needs changes.

Note that the copying semantics is a bit funky: Copied values remain, but on write, sequences are replaced rather than added to.

Overrides: attrdef.AttributeDef.getCopy

makeUserDoc(self)

source code 
Overrides: attrdef.AttributeDef.makeUserDoc

Property Details

default_

Get Method:
unreachable.default_(self)