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 expandlist(
const int size)
const;
76 void grow(
const int size = -1);
81 void * builtinbuffer[DEFAULTSIZE];
89 if (this->numitems == this->itembuffersize) this->grow();
90 this->itembuffer[this->numitems++] =
item;
96#ifdef COIN_EXTRA_DEBUG
99 this->itembuffer[index] = this->itembuffer[--this->numitems];
105 return this->numitems;
111#ifdef COIN_EXTRA_DEBUG
114 this->numitems = length;
121#ifdef COIN_EXTRA_DEBUG
124 return &this->itembuffer[start];
130#ifdef COIN_EXTRA_DEBUG
133 if (index >= this->
getLength()) this->expandlist(index + 1);
134 return this->itembuffer[index];
140 return !(*
this ==
l);
146 return this->itembuffer[index];
152 this->itembuffer[index] =
item;
159 this->numitems = size;
165 return this->itembuffersize;
The SbList class is a template container class for lists.
Definition SbList.h:70
void truncate(const int length, const int dofit=0)
Definition SbList.h:172
int getLength(void) const
Definition SbList.h:168
int find(const Type item) const
Definition SbList.h:126
SbList< Type > & operator=(const SbList< Type > &l)
Definition SbList.h:99
void removeFast(const int index)
Definition SbList.h:161
int operator!=(const SbList< Type > &l) const
Definition SbList.h:217
int getArraySize(void) const
Definition SbList.h:235
const Type * getArrayPtr(const int start=0) const
Definition SbList.h:191
void remove(const int index)
Definition SbList.h:152
void removeItem(const Type item)
Definition SbList.h:144
int operator==(const SbList< Type > &l) const
Definition SbList.h:209
void copy(const SbList< Type > &l)
Definition SbList.h:92
void fit(void)
Definition SbList.h:104
void insert(const Type item, const int insertbefore)
Definition SbList.h:132
void append(const Type item)
Definition SbList.h:121
void expand(const int size)
Definition SbList.h:230
Type operator[](const int index) const
Definition SbList.h:195
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:119
void set(const int index, void *item)
Definition lists/SbPList.h:150
void expand(const int size)
Definition lists/SbPList.h:156
void * get(const int index) const
Definition lists/SbPList.h:144
int operator!=(const SbPList &l) const
Definition lists/SbPList.h:138
void append(void *item)
Definition lists/SbPList.h:87
int getLength(void) const
Definition lists/SbPList.h:103
void fit(void)
Definition SbPList.cpp:199
void removeFast(const int index)
Definition lists/SbPList.h:94
void *& operator[](const int index) const
Definition lists/SbPList.h:128
int getArraySize(void) const
Definition lists/SbPList.h:163
void truncate(const int length, const int fit=0)
Definition lists/SbPList.h:109