1#ifndef COIN_LISTS_SBPLIST_H
2#define COIN_LISTS_SBPLIST_H
36#include <Inventor/SbBasic.h>
41 enum { DEFAULTSIZE = 4 };
56 void remove(
const int index);
66 void * get(
const int index)
const;
67 void set(
const int index,
void *
item);
71 void expand(
const int size);
75 void expandindex(
const int index)
const;
76 void expandlist(
const int size)
const;
77 void grow(
const int size = -1);
82 void * builtinbuffer[DEFAULTSIZE];
90 if (this->numitems == this->itembuffersize) this->grow();
91 this->itembuffer[this->numitems++] =
item;
97#ifdef COIN_EXTRA_DEBUG
100 this->itembuffer[index] = this->itembuffer[--this->numitems];
106 return this->numitems;
112#ifdef COIN_EXTRA_DEBUG
115 this->numitems = length;
122#ifdef COIN_EXTRA_DEBUG
125 return &this->itembuffer[start];
131#ifdef COIN_EXTRA_DEBUG
134 if (index >= this->
getLength()) this->expandindex(index);
135 return this->itembuffer[index];
141 return !(*
this ==
l);
147 return this->itembuffer[index];
153 this->itembuffer[index] =
item;
160 this->numitems = size;
166 return this->itembuffersize;
The SbList class is a template container class for lists.
Definition SbList.h:72
void truncate(const int length, const int dofit=0)
Definition SbList.h:180
int getLength(void) const
Definition SbList.h:176
int find(const Type item) const
Definition SbList.h:134
SbList< Type > & operator=(const SbList< Type > &l)
Definition SbList.h:101
void removeFast(const int index)
Definition SbList.h:169
int operator!=(const SbList< Type > &l) const
Definition SbList.h:225
int getArraySize(void) const
Definition SbList.h:243
const Type * getArrayPtr(const int start=0) const
Definition SbList.h:199
void remove(const int index)
Definition SbList.h:160
void removeItem(const Type item)
Definition SbList.h:152
int operator==(const SbList< Type > &l) const
Definition SbList.h:217
void copy(const SbList< Type > &l)
Definition SbList.h:94
void fit(void)
Definition SbList.h:106
void insert(const Type item, const int insertbefore)
Definition SbList.h:140
void append(const Type item)
Definition SbList.h:129
void expand(const int size)
Definition SbList.h:238
Type operator[](const int index) const
Definition SbList.h:203
The SbPList class is a container class for void pointers.
Definition lists/SbPList.h:40
void ** getArrayPtr(const int start=0) const
Definition lists/SbPList.h:120
void set(const int index, void *item)
Definition lists/SbPList.h:151
void expand(const int size)
Definition lists/SbPList.h:157
void * get(const int index) const
Definition lists/SbPList.h:145
int operator!=(const SbPList &l) const
Definition lists/SbPList.h:139
void append(void *item)
Definition lists/SbPList.h:88
int getLength(void) const
Definition lists/SbPList.h:104
void fit(void)
Definition SbPList.cpp:205
void removeFast(const int index)
Definition lists/SbPList.h:95
void *& operator[](const int index) const
Definition lists/SbPList.h:129
int getArraySize(void) const
Definition lists/SbPList.h:164
void truncate(const int length, const int fit=0)
Definition lists/SbPList.h:110