Package gavo :: Package base :: Module attrdef :: Class AttributeDef
[frames] | no frames]

Class AttributeDef

source code

object --+
         |
        AttributeDef
Known Subclasses:

is the base class for all attribute definitions.

See above.

The data attribute names have all an underscore added to avoid name clashes -- structures should have about the same attributes and may want to have managed attributes called name or description.

When constructing AttributeDefs, you should only use keyword arguments, except for name (the first argument).

Note that an AttributeDef might be embedded by many instances. So, you must *never* store any instance data in an AttributeDef (unless it's really a singleton, of course).

Instance Methods
 
__init__(self, name, default=None, description='Undocumented', copyable=False, aliases=None, callbacks=None, before=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
doCallbacks(self, instance, value)
should be called after feedObject has done its work.
source code
 
feed(self, ctx, instance, value) source code
 
feedObject(self, instance, value) source code
 
getCopy(self, instance, newParent, ctx) source code
 
iterParentMethods(self)
returns an iterator over (name, method) pairs that should be inserted in the parent class.
source code
 
makeUserDoc(self) source code

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

Class Variables
  typeDesc_ = 'unspecified, invalid'
Properties

Inherited from object: __class__

Method Details

__init__(self, name, default=None, description='Undocumented', copyable=False, aliases=None, callbacks=None, before=None)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)