VLib.Node.VLibNode

Package VLib :: Module Node :: Class VLibNode |
[hide private]
[frames] | no frames]

# Class VLibNode

source code

    object --+
             |
            VLibNode

Known Subclasses:
  Chem.Fingerprints.DbFpSupplier.DbFpSupplier, Filter.FilterNode, Output.OutputNode, Supply.SupplyNode, Transform.TransformNode

    base class for all virtual library nodes,
    defines minimal required interface

Instance Methods | [hide private]
__init__(self, *args, **kwargs) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
__iter__(self) part of the iterator interface | source code
next(self) part of the iterator interface... | source code
reset(self) resets our iteration state... | source code
AddChild(self, child, notify=1) >>> p1 = VLibNode()... | source code
RemoveChild(self, child, notify=1) >>> p1 = VLibNode()... | source code
GetChildren(self) | source code
AddParent(self, parent, notify=1) >>> p1 = VLibNode()... | source code
RemoveParent(self, parent, notify=1) >>> p1 = VLibNode()... | source code
GetParents(self) | source code
Destroy(self, notify=1, propagateDown=0, propagateUp=0) >>> p1 = VLibNode()... | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args, **kwargs) (Constructor) | source code
    x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__ (inherited documentation)

### next(self) | source code
    part of the iterator interface

    raises StopIteration on failure

### reset(self) | source code
    resets our iteration state

### AddChild(self, child, notify=1) | source code
    >>> p1 = VLibNode()
    >>> p2 = VLibNode()
    >>> c1 = VLibNode()
    >>> p1.AddChild(c1)
    >>> len(c1.GetParents())
    1
    >>> len(p1.GetChildren())
    1
    >>> p2.AddChild(c1,notify=0)
    >>> len(c1.GetParents())
    1
    >>> len(p2.GetChildren())
    1
    >>> c1.AddParent(p2,notify=0)
    >>> len(c1.GetParents())
    2
    >>> len(p2.GetChildren())
    1

### RemoveChild(self, child, notify=1) | source code
    >>> p1 = VLibNode()
    >>> c1 = VLibNode()
    >>> p1.AddChild(c1)
    >>> len(c1.GetParents())
    1
    >>> len(p1.GetChildren())
    1
    >>> p1.RemoveChild(c1)
    >>> len(c1.GetParents())
    0
    >>> len(p1.GetChildren())
    0

### AddParent(self, parent, notify=1) | source code
    >>> p1 = VLibNode()
    >>> p2 = VLibNode()
    >>> c1 = VLibNode()
    >>> c1.AddParent(p1)
    >>> len(c1.GetParents())
    1
    >>> len(p1.GetChildren())
    1
    >>> c1.AddParent(p2,notify=0)
    >>> len(c1.GetParents())
    2
    >>> len(p2.GetChildren())
    0
    >>> p2.AddChild(c1,notify=0)
    >>> len(c1.GetParents())
    2
    >>> len(p2.GetChildren())
    1

### RemoveParent(self, parent, notify=1) | source code
    >>> p1 = VLibNode()
    >>> c1 = VLibNode()
    >>> p1.AddChild(c1)
    >>> len(c1.GetParents())
    1
    >>> len(p1.GetChildren())
    1
    >>> c1.RemoveParent(p1)
    >>> len(c1.GetParents())
    0
    >>> len(p1.GetChildren())
    0

### Destroy(self, notify=1, propagateDown=0, propagateUp=0) | source code
    >>> p1 = VLibNode()
    >>> p2 = VLibNode()
    >>> c1 = VLibNode()
    >>> c2 = VLibNode()
    >>> p1.AddChild(c1)
    >>> p2.AddChild(c1)
    >>> p2.AddChild(c2)
    >>> len(c1.GetParents())
    2
    >>> len(c2.GetParents())
    1
    >>> len(p1.GetChildren())
    1
    >>> len(p2.GetChildren())
    2
    >>> c1.Destroy(propagateUp=1)
    >>> len(p2.GetChildren())
    0
    >>> len(c1.GetParents())
    0
    >>> len(c2.GetParents())
    0