Maintains a list of pointers to paths. More...
#include <Inventor/lists/SoPathList.h>
Public Member Functions | |
SoPathList () | |
SoPathList (int size) | |
SoPathList (const SoPathList &l) | |
virtual | ~SoPathList () |
virtual SbBool | removePath (const SoPath &path) |
virtual void | append (SoPath *ptr) |
SoPath * | operator[] (int i) const |
SoPathList & | operator= (const SoPathList &l) |
virtual int | findPath (const SoPath &path) |
virtual void | sort () |
virtual void | uniquify () |
Static Public Member Functions | |
static int | comparePaths (const void *p1Ptr, const void *p2Ptr) |
Maintains a list of pointers to paths.
This subclass of SoBaseList holds lists of pointers to SoPaths. It updates reference counts to paths in the list whenever adding or removing pointers.
SoPathList::SoPathList | ( | ) | [inline] |
Constructor.
SoPathList::SoPathList | ( | int | size | ) | [inline] |
Constructor that pre-allocates storage for size pointers.
SoPathList::SoPathList | ( | const SoPathList & | l | ) | [inline] |
Constructor that copies the contents of another list.
virtual SoPathList::~SoPathList | ( | ) | [inline, virtual] |
Destructor.
virtual void SoPathList::append | ( | SoPath * | ptr | ) | [inline, virtual] |
Adds a path to the end of the list.
static int SoPathList::comparePaths | ( | const void * | p1Ptr, | |
const void * | p2Ptr | |||
) | [static] |
virtual int SoPathList::findPath | ( | const SoPath & | path | ) | [virtual] |
Returns the index of the matching path in the list, or -1 if not found.
SoPathList& SoPathList::operator= | ( | const SoPathList & | l | ) | [inline] |
Copies a list, keeping all reference counts correct.
Reimplemented from SoBaseList.
SoPath* SoPathList::operator[] | ( | int | i | ) | const [inline] |
Returns pointer with given index. If requested index does not exists, list is grown to return a valid pointer.
Reimplemented from SoBaseList.
Remove a path from the list and return TRUE if removed.
virtual void SoPathList::sort | ( | ) | [virtual] |
Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children.
virtual void SoPathList::uniquify | ( | ) | [virtual] |
Given a sorted list, removes any path that (1) is a duplicate, or (2) goes through a node that is the tail of another path.