29 #ifndef __STATICLIST_H__
30 #define __STATICLIST_H__
41 template<
class type,
int size>
50 int Num(
void )
const;
51 int Max(
void )
const;
55 size_t Size(
void )
const;
87 template<
class type,
int size>
97 template<
class type,
int size>
107 template<
class type,
int size>
118 template<
class type,
int size>
135 template<
class type,
int size>
139 for( i = 0; i <
size; i++ ) {
147 memset( list, 0,
sizeof( list ) );
158 template<
class type,
int size>
170 template<
class type,
int size>
180 template<
class type,
int size>
190 template<
class type,
int size>
200 template<
class type,
int size>
202 return num *
sizeof( list[ 0 ] );
212 template<
class type,
int size>
227 template<
class type,
int size>
232 return list[
index ];
243 template<
class type,
int size>
248 return list[
index ];
262 template<
class type,
int size>
278 template<
class type,
int size>
290 template<
class type,
int size>
296 return &list[
num++ ];
308 template<
class type,
int size>
331 template<
class type,
int size>
343 }
else if ( index >
num ) {
365 template<
class type,
int size>
373 for( i = 0; i <
n; i++ ) {
387 template<
class type,
int size>
391 index = FindIndex( obj );
393 index = Append( obj );
406 template<
class type,
int size>
410 for( i = 0; i <
num; i++ ) {
411 if ( list[ i ] == obj ) {
427 template<
class type,
int size>
431 i = FindIndex( obj );
449 template<
class type,
int size>
453 for( i = 0; i <
num; i++ ) {
454 if ( list[ i ] ==
NULL ) {
473 template<
class type,
int size>
477 index = objptr - list;
494 template<
class type,
int size>
501 if ( ( index < 0 ) || ( index >=
num ) ) {
506 for( i = index; i <
num; i++ ) {
507 list[
i ] = list[ i + 1 ];
522 template<
class type,
int size>
526 index = FindIndex( obj );
528 return RemoveIndex( index );
541 template<
class type,
int size>
assert(prefInfo.fullscreenBtn)
void Swap(idStaticList< type, size > &other)
GLuint GLuint GLsizei GLenum type
bool Remove(const type &obj)
int AddUnique(const type &obj)
size_t MemoryUsed(void) const
int FindIndex(const type &obj) const
const type & operator[](int index) const
int Insert(const type &obj, int index)
int IndexOf(const type *obj) const
int Append(const type &obj)
type * Find(type const &obj) const
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
void DeleteContents(bool clear)
size_t Allocated(void) const
bool RemoveIndex(int index)