Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoPathList Class Reference

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

#include <Inventor/lists/SoPathList.h>

+ Inheritance diagram for SoPathList:

Public Member Functions

 SoPathList ()
 Constructor.
 
 SoPathList (int size)
 Constructor that pre-allocates storage for size pointers.
 
 SoPathList (const SoPathList &l)
 Constructor that copies the contents of another list.
 
virtual ~SoPathList ()
 Destructor.
 
virtual SbBool removePath (const SoPath &path)
 Remove a path from the list and return TRUE if removed.
 
virtual void append (SoPath *ptr)
 Adds a path to the end of the list.
 
SoPathoperator[] (int i) const
 Returns pointer with given index.
 
SoPathListoperator= (const SoPathList &l)
 Copies a list, keeping all reference counts correct.
 
virtual int findPath (const SoPath &path)
 Returns the index of the matching path in the list, or -1 if not found.
 
virtual void sort ()
 Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children.
 
virtual 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.
 
virtual ~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.
 
virtual void remove (int which)
 Removes pointer with given index.
 
virtual 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
 Returns pointer with given index.
 
void set (int i, SoBase *ptr)
 Sets an element of a list.
 
void addReferences (SbBool flag)
 Indicates whether to call ref() and unref() for bases in the list when adding/removing them.
 
void touch (int index=-1)
 Forces each attached SoListSensor to be notified.
 
void addAuditor (void *auditor, SoNotRec::Type type)
 Add an auditor to the list.
 
void removeAuditor (void *auditor, SoNotRec::Type type)
 Remove an auditor to the list.
 
const SoAuditorList * getAuditors () const
 Get current auditor list.
 
int getChangedIndex () const
 Get last changed index element of the list.
 
SoListSensor::ChangeType getChangedType () const
 Get last changed type of the list.
 
void setNotificationInfo (const int changedIndex, const SoListSensor::ChangeType changedType)
 setup notification info for auditor mechanism.
 
- Public Member Functions inherited from SbPList
 SbPList ()
 Default constructor.
 
 SbPList (int initSize)
 Constructor.
 
 SbPList (const SbPList &pl)
 Constructor.
 
virtual ~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.
 
int getLength () const
 Returns number of pointers in list.
 
void copy (const SbPList &pl)
 Copies a list.
 
SbPListoperator= (const SbPList &pl)
 Assignment operator: copies list into this list.
 
void *& operator[] (const int index) const
 Returns pointer with given index.
 
int operator== (const SbPList &pl) const
 Equality operator.
 
int operator!= (const SbPList &pl) const
 Inequality operator.
 
void swap (int index1, int index2)
 Swaps element having index1 with the one having index2.
 

Static Public Member Functions

static int comparePaths (const void *p1Ptr, const void *p2Ptr)
 

Detailed Description

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.

SEE ALSO

SoPath

Definition at line 80 of file SoPathList.h.

Constructor & Destructor Documentation

◆ SoPathList() [1/3]

SoPathList::SoPathList ( )
inline

Constructor.

Definition at line 86 of file SoPathList.h.

◆ SoPathList() [2/3]

SoPathList::SoPathList ( int  size)
inline

Constructor that pre-allocates storage for size pointers.

Definition at line 91 of file SoPathList.h.

◆ SoPathList() [3/3]

SoPathList::SoPathList ( const SoPathList l)
inline

Constructor that copies the contents of another list.

Definition at line 96 of file SoPathList.h.

◆ ~SoPathList()

virtual SoPathList::~SoPathList ( )
inlinevirtual

Destructor.

Definition at line 104 of file SoPathList.h.

Member Function Documentation

◆ append()

virtual void SoPathList::append ( SoPath ptr)
inlinevirtual

Adds a path to the end of the list.

Definition at line 114 of file SoPathList.h.

◆ comparePaths()

static int SoPathList::comparePaths ( const void *  p1Ptr,
const void *  p2Ptr 
)
static

◆ findPath()

virtual int SoPathList::findPath ( const SoPath path)
virtual

Returns the index of the matching path in the list, or -1 if not found.

◆ operator=()

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

Copies a list, keeping all reference counts correct.

Definition at line 124 of file SoPathList.h.

◆ operator[]()

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.

Definition at line 118 of file SoPathList.h.

◆ removePath()

virtual SbBool SoPathList::removePath ( const SoPath path)
virtual

Remove a path from the list and return TRUE if removed.

◆ sort()

virtual void SoPathList::sort ( )
virtual

Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children.

◆ uniquify()

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.


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