16#include "SoShaderSystem.h"
49 ptrsSize =
pl.ptrsSize;
50 ptrs =
new Type[ptrsSize];
52 for(
int i = 0;
i < nPtrs;
i++)
63 if(nPtrs + 1 > ptrsSize) expand(nPtrs + 1);
64 ptrs[nPtrs++] = value;
68 int find(
const Type &value)
const {
69 for(
int i = 0;
i < nPtrs;
i++)
87 ptrs[
i] = ptrs[
i - 1];
96 for(
int i = which;
i < nPtrs - 1;
i++)
97 ptrs[
i] = ptrs[
i + 1];
118 for(
int i = 0;
i < nPtrs;
i++)
119 ptrs[
i] =
pl.ptrs[
i];
128 if(
i >= nPtrs) grow(
i);
134 return pl.nPtrs == nPtrs ? compare(
pl) :
FALSE;
137 return pl.nPtrs == nPtrs ? ! compare(
pl) :
TRUE;
154 int compare(
const SbList &
pl)
const {
155 for(
int i = 0;
i < nPtrs;
i++)
156 if((*
this)[
i] !=
pl[
i])
169 void grow(
int max)
const {
175 SoDebugError::post(
"(internal) SbList::grow",
"newSize <= oldSize!");
189 void setSize(
int size) {
190 if(size > ptrsSize) expand(size);
196 void expand(
int size) {
200 while(size > ptrsSize) {
206 SoDebugError::post(
"SbList::expand",
"Attempt to expand list beyond capacity;\n A core dump is likely");
214 if(ptrs !=
nullptr) {
215 for(
int i = 0;
i < nPtrs;
i++)
This contains the definition of the SbList generic pointer list class; an SbList is a list of (void *...
SbList & operator=(const SbList &pl)
void append(const Type &value)
Type & operator[](int i) const
int operator==(const SbList &pl) const
void copy(const SbList &pl)
int find(const Type &value) const
int operator!=(const SbList &pl) const
void insert(const Type &value, int addBefore)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.