Open Inventor Reference
SoPathList Class Reference

Maintains a list of pointers to paths. More...

#include <Inventor/SoLists.h>

Inheritance diagram for SoPathList:
SoBaseList SbPList

Public Member Functions

 SoPathList ()
 
 SoPathList (int size)
 
 SoPathList (const SoPathList &l)
 
 ~SoPathList ()
 Destructor.
 
void append (SoPath *ptr)
 Adds a path to the end of the list.
 
SoPathListoperator= (const SoPathList &l)
 Copies a list, keeping all reference counts correct.
 
SoPathoperator[] (int i) const
 
int findPath (const SoPath &path)
 Returns the index of the matching path in the list, or -1 if not found.
 
void sort ()
 Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children.
 
void uniquify ()
 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.
 
- Public Member Functions inherited from SoBaseList
 SoBaseList ()
 Constructor.
 
 SoBaseList (int size)
 Constructor that pre-allocates storage for size pointers.
 
 SoBaseList (const SoBaseList &l)
 Constructor that copies the contents of another list.
 
 ~SoBaseList ()
 Destructor.
 
void append (SoBase *ptr)
 Adds a pointer to the end of the list.
 
void insert (SoBase *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
void remove (int which)
 Removes pointer with given index.
 
void truncate (int start)
 Removes all pointers after one with given index, inclusive.
 
void copy (const SoBaseList &l)
 Copies a list, keeping all reference counts correct.
 
SoBaseListoperator= (const SoBaseList &l)
 Copies a list, keeping all reference counts correct.
 
SoBaseoperator[] (int i) const
 Access an element of a list.
 
void set (int i, SoBase *ptr)
 Sets an element of a list.
 
void addReferences (bool flag)
 Indicates whether to call ref() and unref() for bases in the list when adding/removing them.
 
- Public Member Functions inherited from SbPList
 SbPList ()
 Constructor.
 
 SbPList (int initSize)
 initSize specifies an initial size for the list, which is useful as an optimization if you can estimate the length of the list before you construct it.
 
 SbPList (const SbPList &pl)
 Copy constructor.
 
 ~SbPList ()
 Destructor.
 
void append (void *ptr)
 Adds given pointer to end of list.
 
int find (const void *ptr) const
 Returns index of given pointer in list, or -1 if not found.
 
void insert (void *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
void remove (int which)
 Removes pointer with given index.
 
int getLength () const
 Returns number of pointers in list.
 
void truncate (int start)
 Removes all pointers after one with given index, inclusive.
 
void copy (const SbPList &pl)
 Copy a list.
 
SbPListoperator= (const SbPList &pl)
 Assignment operator; copies list into this list.
 
void *& operator[] (int i) const
 Returns pointer with given index.
 
bool operator== (const SbPList &pl) const
 Equality and inequality operators.
 
bool operator!= (const SbPList &pl) const
 Equality and inequality operators.
 
void * get (int i) const
 Internal versions of [] that do not check for bounds:
 
void set (int i, void *j)
 

Detailed Description

This subclass of SoBaseList holds lists of pointers to SoPaths. It updates reference counts to paths in the list whenever adding or removing pointers.

See Also
SoPath

Definition at line 212 of file SoLists.h.

Constructor & Destructor Documentation

◆ SoPathList() [1/3]

SoPathList::SoPathList ( )
inline

Definition at line 214 of file SoLists.h.

◆ SoPathList() [2/3]

SoPathList::SoPathList ( int  size)
inline

Definition at line 215 of file SoLists.h.

◆ SoPathList() [3/3]

SoPathList::SoPathList ( const SoPathList l)
inline

Definition at line 216 of file SoLists.h.

◆ ~SoPathList()

SoPathList::~SoPathList ( )
inline

Definition at line 218 of file SoLists.h.

Member Function Documentation

◆ append()

void SoPathList::append ( SoPath ptr)
inline

Definition at line 221 of file SoLists.h.

◆ findPath()

int SoPathList::findPath ( const SoPath path)

◆ operator=()

SoPathList & SoPathList::operator= ( const SoPathList l)
inline

Definition at line 225 of file SoLists.h.

References SoBaseList::copy().

◆ operator[]()

SoPath * SoPathList::operator[] ( int  i) const
inline

Definition at line 228 of file SoLists.h.

◆ sort()

void SoPathList::sort ( )

◆ uniquify()

void SoPathList::uniquify ( )

The documentation for this class was generated from the following file: