97 {
if (nPtrs + 1 > ptrsSize) expand(nPtrs + 1);
98 ptrs[nPtrs++] = ptr; }
101 int find(
const void *ptr)
const;
123 void *& operator [](
int i)
const
124 {
if (i >= nPtrs) grow(i);
return ptrs[i]; }
128 {
return pl.nPtrs == nPtrs ? compare(pl) :
FALSE; }
131 {
return pl.nPtrs == nPtrs ? ! compare(pl) :
TRUE; }
135 void *
get(
int i)
const {
return ptrs[i]; }
136 void set(
int i,
void *j) { ptrs[i] = j; }
142 bool compare(
const SbPList &pl)
const;
151 void grow(
int max)
const;
155 void setSize(
int size)
156 {
if (size > ptrsSize) expand(size); nPtrs = size; }
160 void expand(
int size);
182 { ((
SbPList *)
this)->append((
void *) (size_t) integer); }
186 {
return ((
SbPList *)
this)->find((
void *) (
size_t) integer); }
190 { ((
SbPList *)
this)->insert((
void *) (size_t) integer, addBefore); }
192 int & operator [](
int i)
const
193 {
return ( (
int &) ( (*(
const SbPList *)
this) [i] ) ); }
243 { ((
SbPList *)
this)->append((
void *) string); }
247 {
return ((
SbPList *)
this)->find((
void *)
string); }
251 { ((
SbPList *)
this)->insert((
void *) string, addBefore); }
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
INVENTOR_API bool operator!=(const SbBox3f &b1, const SbBox3f &b2)
INVENTOR_API bool operator==(const SbBox3f &b1, const SbBox3f &b2)
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
List of generic (void *) pointers.
void append(int integer)
Adds given pointer to end of list.
int find(int integer)
Returns index of given pointer in list, or -1 if not found.
SbIntList()
Constructors, similar to SbPList.
void insert(int integer, int addBefore)
Inserts given pointer in list before pointer with given index.
List of generic (void *) pointers.
void append(void *ptr)
Adds given pointer to end of list.
void truncate(int start)
Removes all pointers after one with given index, inclusive.
void remove(int which)
Removes pointer with given index.
int find(const void *ptr) const
Returns index of given pointer in list, or -1 if not found.
void copy(const SbPList &pl)
Copy a list.
SbPList(int initSize)
initSize specifies an initial size for the list, which is useful as an optimization if you can estima...
void * get(int i) const
Internal versions of [] that do not check for bounds:
void insert(void *ptr, int addBefore)
Inserts given pointer in list before pointer with given index.
SbPList(const SbPList &pl)
Copy constructor.
int getLength() const
Returns number of pointers in list.
int find(SbString *string)
Returns index of given pointer in list, or -1 if not found.
void insert(SbString *string, int addBefore)
Inserts given pointer in list before pointer with given index.
void append(SbString *string)
Adds given pointer to end of list.
Class for smart character strings.
void append(SbVec3f *vec)
Adds given pointer to end of list.
void insert(SbVec3f *vec, int addBefore)
Inserts given pointer in list before pointer with given index.
const float * getValue() const
Returns vector components.