| |
- list(object)
-
- NodePath
-
- WeakNodePath(NodePath, WeakList)
class NodePath(list) |
|
Path within a scenegraph from root to particular node
Has minimal operations, most high-level functionality is
provided by sub-classes such as vrml.vrml97.nodepath and
OpenGLContext.scenegraph.nodepath |
|
- Method resolution order:
- NodePath
- list
- object
Methods defined here:
- __add__(self, other)
- Return a new path with other as tail
- __eq__(self, other)
- Check whether we are equal to another path
- __getslice__(self, start, stop)
- Return a new path with our items from start to stop
- __repr__(self)
- Code-like representation of the node path
Note: this doesn't use super for determining
the base representation, as that might wind up
creating a name like:
WeakNodePath( WeakTuple( Node, Node,...))
- __str__(self)
- Simple representation of a node-path for human consumption
- common(self, other)
- Return the common root sub-path between ourselves and other
If there is no common sub-root, returns an empty path
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from list:
- __contains__(...)
- x.__contains__(y) <==> y in x
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
Use of negative indices is not supported.
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iadd__(...)
- x.__iadd__(y) <==> x+=y
- __imul__(...)
- x.__imul__(y) <==> x*=y
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __mul__(...)
- x.__mul__(n) <==> x*n
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __reversed__(...)
- L.__reversed__() -- return a reverse iterator over the list
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __setslice__(...)
- x.__setslice__(i, j, y) <==> x[i:j]=y
Use of negative indices is not supported.
- __sizeof__(...)
- L.__sizeof__() -- size of L in memory, in bytes
- append(...)
- L.append(object) -- append object to end
- count(...)
- L.count(value) -> integer -- return number of occurrences of value
- extend(...)
- L.extend(iterable) -- extend list by appending elements from the iterable
- index(...)
- L.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
- insert(...)
- L.insert(index, object) -- insert object before index
- pop(...)
- L.pop([index]) -> item -- remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- remove(...)
- L.remove(value) -- remove first occurrence of value.
Raises ValueError if the value is not present.
- reverse(...)
- L.reverse() -- reverse *IN PLACE*
- sort(...)
- L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1
Data and other attributes inherited from list:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x8187c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class WeakNodePath(NodePath, WeakList) |
|
Node path that uses weak-references to nodes
You hold strong references to these paths, then
wrap all uses of them with checks for
weakref.ReferenceError to check for dead paths. |
|
- Method resolution order:
- WeakNodePath
- NodePath
- WeakList
- list
- object
Methods inherited from NodePath:
- __add__(self, other)
- Return a new path with other as tail
- __eq__(self, other)
- Check whether we are equal to another path
- __getslice__(self, start, stop)
- Return a new path with our items from start to stop
- __repr__(self)
- Code-like representation of the node path
Note: this doesn't use super for determining
the base representation, as that might wind up
creating a name like:
WeakNodePath( WeakTuple( Node, Node,...))
- __str__(self)
- Simple representation of a node-path for human consumption
- common(self, other)
- Return the common root sub-path between ourselves and other
If there is no common sub-root, returns an empty path
Data descriptors inherited from NodePath:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from WeakList:
- __contains__(self, item)
- Return boolean indicating whether the item is in the list
- __ge__(self, sequence)
- Compare the list to another (>=)
- __getitem__(self, index)
- Get the item at the given index
- __gt__(self, sequence)
- Compare the list to another (>)
- __iadd__ = extend(self, sequence)
- Extend this list with another sequence
- __init__(self, sequence=())
- Initialize the list, with an optional sequence of objects
The WeakList will store weak references to objects
within the sequence.
- __iter__(self)
- Iterate over the list, yielding strong references
- __le__(self, sequence)
- Compare the list to another (<=)
- __lt__(self, sequence)
- Compare the list to another (<)
- __ne__(self, sequence)
- Compare the list to another (!=)
- __setitem__(self, index, item)
- Set the item at the given index
- __setslice__(self, start, stop, sequence)
- Set a sequence of items from the start to the stop index
- append(self, item)
- Append a single item to the list
- count(self, item)
- Return integer count of instances of item in list
- extend(self, sequence)
- Extend this list with another sequence
- get(self)
- Get all items as a list of strong references
- index(self, item)
- Return integer index of item in list
- insert(self, index, item)
- Insert an item at the given index
- pop(self, index=-1)
- Pop an item from the list, removing it and returning it
- remove(self, item)
- Remove the given item from the list
- sort(self, function=None)
- Sort the list of objects
This sorts the objects referenced,
then rebuilds the list of references!
- unwrap(self, item)
- Unwrap an individual item
This is a fairly trivial operation at the moment,
it merely calls the item with no arguments and
returns the result.
- wrap(self, item)
- Wrap an individual item in a weak-reference
If the item is already a weak reference, we store
a reference to the original item. We use approximately
the same weak reference callback mechanism as the
standard weakref.WeakKeyDictionary object.
Methods inherited from list:
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
Use of negative indices is not supported.
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __imul__(...)
- x.__imul__(y) <==> x*=y
- __len__(...)
- x.__len__() <==> len(x)
- __mul__(...)
- x.__mul__(n) <==> x*n
- __reversed__(...)
- L.__reversed__() -- return a reverse iterator over the list
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __sizeof__(...)
- L.__sizeof__() -- size of L in memory, in bytes
- reverse(...)
- L.reverse() -- reverse *IN PLACE*
Data and other attributes inherited from list:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x8187c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |