1#ifndef COIN_LISTS_SBPLIST_H
2#define COIN_LISTS_SBPLIST_H
27#include <Inventor/SbBasic.h>
32 enum { DEFAULTSIZE = 4 };
47 void remove(
const int index);
57 void * get(
const int index)
const;
58 void set(
const int index,
void *
item);
62 void expand(
const int size);
66 void expandlist(
const int size)
const;
67 void grow(
const int size = -1);
72 void * builtinbuffer[DEFAULTSIZE];
80 if (this->numitems == this->itembuffersize) this->grow();
81 this->itembuffer[this->numitems++] =
item;
87#ifdef COIN_EXTRA_DEBUG
90 this->itembuffer[index] = this->itembuffer[--this->numitems];
96 return this->numitems;
102#ifdef COIN_EXTRA_DEBUG
105 this->numitems = length;
112#ifdef COIN_EXTRA_DEBUG
115 return &this->itembuffer[start];
121#ifdef COIN_EXTRA_DEBUG
124 if (index >= this->
getLength()) this->expandlist(index + 1);
125 return this->itembuffer[index];
131 return !(*
this ==
l);
137 return this->itembuffer[index];
143 this->itembuffer[index] =
item;
150 this->numitems = size;
156 return this->itembuffersize;
The SbList class is a template container class for lists.
Definition SbList.h:61
void truncate(const int length, const int dofit=0)
Definition SbList.h:163
int getLength(void) const
Definition SbList.h:159
int find(const Type item) const
Definition SbList.h:117
SbList< Type > & operator=(const SbList< Type > &l)
Definition SbList.h:90
void removeFast(const int index)
Definition SbList.h:152
int operator!=(const SbList< Type > &l) const
Definition SbList.h:208
int getArraySize(void) const
Definition SbList.h:226
const Type * getArrayPtr(const int start=0) const
Definition SbList.h:182
void remove(const int index)
Definition SbList.h:143
void removeItem(const Type item)
Definition SbList.h:135
int operator==(const SbList< Type > &l) const
Definition SbList.h:200
void copy(const SbList< Type > &l)
Definition SbList.h:83
void fit(void)
Definition SbList.h:95
void insert(const Type item, const int insertbefore)
Definition SbList.h:123
void append(const Type item)
Definition SbList.h:112
void expand(const int size)
Definition SbList.h:221
Type operator[](const int index) const
Definition SbList.h:186
The SbPList class is a container class for void pointers.
Definition SbPList.h:31
void ** getArrayPtr(const int start=0) const
Definition SbPList.h:110
void set(const int index, void *item)
Definition SbPList.h:141
void expand(const int size)
Definition SbPList.h:147
void * get(const int index) const
Definition SbPList.h:135
int operator!=(const SbPList &l) const
Definition SbPList.h:129
void append(void *item)
Definition SbPList.h:78
int getLength(void) const
Definition SbPList.h:94
void fit(void)
Definition SbPList.cpp:189
void removeFast(const int index)
Definition SbPList.h:85
void *& operator[](const int index) const
Definition SbPList.h:119
int getArraySize(void) const
Definition SbPList.h:154
void truncate(const int length, const int fit=0)
Definition SbPList.h:100