Package esys :: Package escript :: Module modelframe :: Class LinkableObject
[show private | hide private]
[frames | no frames]

Type LinkableObject

object --+
         |
        LinkableObject

Known Subclasses:
ParameterSet

An object that allows to link its attributes to attributes of other objects via a Link object. For instance:
      p = LinkableObject()
      p.x = Link(o,"name")
      print p.x

links attribute x of p to the attribute name of object o.

p.x will contain the current value of attribute name of object o.

If the value of getattr(o, "name") is callable, p.x will return the return value of the call.
Method Summary
  __init__(self, debug)
Initializes LinkableObject so that we can operate on Links
  __delattr__(self, name)
Removes the attribute name.
  __getattr__(self, name)
Returns the value of attribute name.
  __setattr__(self, name, value)
Sets the value for attribute name.
  getAttributeObject(self, name)
Return the object stored for attribute name.
  hasAttribute(self, name)
Returns True if self as attribute name.
  trace(self, msg)
If debugging is on, print the message, otherwise do nothing
    Inherited from object
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
count number_sequence = <itertools.count object at 0x401ff100>

Method Details

__init__(self, debug=False)
(Constructor)

Initializes LinkableObject so that we can operate on Links
Overrides:
__builtin__.object.__init__

__delattr__(self, name)

Removes the attribute name.
Overrides:
__builtin__.object.__delattr__

__getattr__(self, name)
(Qualification operator)

Returns the value of attribute name. If the value is a Link object the object is called and the return value is returned.

__setattr__(self, name, value)

Sets the value for attribute name. If value is a Link the target attribute is set to name if no attribute has been specified.
Overrides:
__builtin__.object.__setattr__

getAttributeObject(self, name)

Return the object stored for attribute name.

hasAttribute(self, name)

Returns True if self as attribute name.

trace(self, msg)

If debugging is on, print the message, otherwise do nothing

Class Variable Details

number_sequence

Type:
count
Value:
<itertools.count object at 0x401ff100>                                 

Generated by Epydoc 2.1 on Thu Apr 27 11:16:12 2006 http://epydoc.sf.net