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:47
void truncate(const int length, const int dofit=0)
Definition SbList.h:149
int getLength(void) const
Definition SbList.h:145
int find(const Type item) const
Definition SbList.h:103
SbList< Type > & operator=(const SbList< Type > &l)
Definition SbList.h:76
void removeFast(const int index)
Definition SbList.h:138
int operator!=(const SbList< Type > &l) const
Definition SbList.h:194
int getArraySize(void) const
Definition SbList.h:205
const Type * getArrayPtr(const int start=0) const
Definition SbList.h:168
void remove(const int index)
Definition SbList.h:129
void removeItem(const Type item)
Definition SbList.h:121
int operator==(const SbList< Type > &l) const
Definition SbList.h:186
void copy(const SbList< Type > &l)
Definition SbList.h:69
void fit(void)
Definition SbList.h:81
void insert(const Type item, const int insertbefore)
Definition SbList.h:109
void append(const Type item)
Definition SbList.h:98
void expand(const int size)
Definition SbList.h:200
Type operator[](const int index) const
Definition SbList.h:172
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