55#include <Inventor/SbBase.h>
56#include <Inventor/STL/cassert>
110 int find(
const void* ptr)
const;
162 void swap(
int index1,
int index2 );
167 void *get(
int i)
const;
168 void set(
int i,
void *j);
175 void reserve(
int size)
185 void grow(
int max)
const;
189 void setSize(
int size);
195 int compare(
const SbPList &pl)
const;
205 void expand(
int size);
209inline void* SbPList::get(
int i)
const
212 return ((i>=0)&&(i<nPtrs))?ptrs[i]:NULL;
218 nPtrs = (start>=0)?start:0;
223 if (nPtrs + 1 > ptrsSize)
238#include <Inventor/lists/SbIntList.h>
239#include <Inventor/lists/SbVec3fList.h>
240#include <Inventor/lists/SbStringList.h>
List of generic (void *) pointers.
void append(void *ptr)
Adds given pointer to end of list.
virtual void truncate(int start)
Removes all pointers after one with given index, inclusive.
int find(const void *ptr) const
Returns index of given pointer in list, or -1 if not found.
void swap(int index1, int index2)
Swaps element having index1 with the one having index2.
SbPList & operator=(const SbPList &pl)
Assignment operator: copies list into this list.
void copy(const SbPList &pl)
Copies a list.
void *& operator[](const int index) const
Returns pointer with given index.
int operator!=(const SbPList &pl) const
Inequality operator.
SbPList(int initSize)
Constructor.
int operator==(const SbPList &pl) const
Equality operator.
virtual ~SbPList()
Destructor.
void insert(void *ptr, int addBefore)
Inserts given pointer in list before pointer with given index.
virtual void remove(int which)
Removes pointer with given index.
SbPList(const SbPList &pl)
Constructor.
SbPList()
Default constructor.
int getLength() const
Returns number of pointers in list.