| 1 |
NAME SoPathList "" "" { maintains a list of pointers to paths } |
| 2 |
|
| 3 |
INCLUDE SoLists.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This subclass of \cSoBaseList\. holds lists of pointers to |
| 7 |
\cSoPath\.s. It updates reference counts to paths in the list |
| 8 |
whenever adding or removing pointers. |
| 9 |
} |
| 10 |
|
| 11 |
METHOD "" SoPathList() { Constructor. } |
| 12 |
|
| 13 |
METHOD createSize SoPathList(int size) { |
| 14 |
Constructor that pre-allocates storage for \asize\. pointers. |
| 15 |
} |
| 16 |
|
| 17 |
METHOD " " SoPathList(const SoPathList &l) { |
| 18 |
Constructor that copies the contents of another list. |
| 19 |
} |
| 20 |
|
| 21 |
METHOD "" ~SoPathList() { Destructor. } |
| 22 |
|
| 23 |
METHOD "" void append(SoPath *path) { Adds a path to the end of the list. } |
| 24 |
|
| 25 |
METHOD "" SoPath * operator [\|](int i) const { Accesses an element of a list. } |
| 26 |
|
| 27 |
METHOD "" SoPathList & operator =(const SoPathList &l) { |
| 28 |
Copies a list, keeping all reference counts correct. |
| 29 |
} |
| 30 |
|
| 31 |
METHOD "" int findPath(const SoPath &path) { |
| 32 |
Returns the index of the matching path in the list, or -1 if not found. |
| 33 |
} |
| 34 |
|
| 35 |
METHOD "" void sort() { |
| 36 |
Sorts list in place based on (1) increasing address of head node, then |
| 37 |
(2) increasing indices of children. |
| 38 |
} |
| 39 |
|
| 40 |
METHOD "" void uniquify() { |
| 41 |
Given a sorted list, removes any path that (1) is a duplicate, or (2) |
| 42 |
goes through a node that is the tail of another path. |
| 43 |
} |
| 44 |
|
| 45 |
ALSO { SoPath } |
| 46 |
|