Package rdkit :: Package VLib :: Module Node :: Class VLibNode

[hide private]
[frames] | no frames]

# Class VLibNode

source code

    object --+
             |
            VLibNode

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

Instance Methods | [hide private]

__init__(self, *args, **kwargs) x.__init__(...) initializes x; see help(type(x)) 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) | 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

__next__(self) part of the iterator interface | source code

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

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args, **kwargs)
(Constructor)

source code

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

Overrides: object.__init__
  (inherited documentation)

### next(self)

source code

    part of the iterator interface

    raises StopIteration on failure

### 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

### __next__(self)

source code

    part of the iterator interface

    raises StopIteration on failure