| 1 |
NAME SoDetailList SoDtlList "" { maintains a list of instances of details } |
| 2 |
|
| 3 |
INCLUDE SoLists.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This subclass of \cSbPList\. holds lists of instances of |
| 7 |
classes derived from \cSoDetail\.. |
| 8 |
} |
| 9 |
|
| 10 |
METHOD "" SoDetailList() { Constructor. } |
| 11 |
|
| 12 |
METHOD createSize SoDetailList(int size) { |
| 13 |
Constructor that pre-allocates storage for \asize\. pointers. |
| 14 |
} |
| 15 |
|
| 16 |
METHOD " " SoDetailList(const SoDetailList &l) { |
| 17 |
Constructor that copies the contents of another list. |
| 18 |
} |
| 19 |
|
| 20 |
METHOD "" ~SoDetailList() { Destructor. } |
| 21 |
|
| 22 |
METHOD "" void append(SoDetail *detail) { |
| 23 |
Adds a detail to the end of the list. |
| 24 |
} |
| 25 |
|
| 26 |
METHOD "" void insert(SoDetail *detail, int addBefore) { |
| 27 |
Inserts given detail in list before detail with given index. |
| 28 |
} |
| 29 |
|
| 30 |
METHOD "" void truncate(int start) { |
| 31 |
Removes all details after one with given index, inclusive. Removed |
| 32 |
detail instances are deleted. |
| 33 |
} |
| 34 |
|
| 35 |
METHOD "" void copy(const SoDetailList &l) { |
| 36 |
Copies a list, making a copy of each detail instance in the list. |
| 37 |
} |
| 38 |
|
| 39 |
BEGIN C++ |
| 40 |
METHOD "" SoDetailList & operator =(const SoDetailList &l) { |
| 41 |
Copies a list, making a copy of each detail instance in the list. |
| 42 |
} |
| 43 |
END |
| 44 |
|
| 45 |
METHOD "" SoDetail * operator [\|](int i) const { |
| 46 |
Accesses an element of a list. |
| 47 |
} |
| 48 |
|
| 49 |
METHOD "" void set(int i, SoDetail *detail) { |
| 50 |
Sets an element of a list, deleting the old entry first. |
| 51 |
} |
| 52 |
|
| 53 |
ALSO { SoDetail } |