doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
idList< type > Class Template Reference

#include <List.h>

Inheritance diagram for idList< type >:
idVectorSet< type, dimension >

Public Types

typedef int cmp_t (const type *, const type *)
 
typedef type new_t (void)
 

Public Member Functions

 idList (int newgranularity=16)
 
 idList (const idList< type > &other)
 
 ~idList (void)
 
void Clear (void)
 
int Num (void) const
 
int NumAllocated (void) const
 
void SetGranularity (int newgranularity)
 
int GetGranularity (void) const
 
size_t Allocated (void) const
 
size_t Size (void) const
 
size_t MemoryUsed (void) const
 
idList< type > & operator= (const idList< type > &other)
 
const typeoperator[] (int index) const
 
typeoperator[] (int index)
 
void Condense (void)
 
void Resize (int newsize)
 
void Resize (int newsize, int newgranularity)
 
void SetNum (int newnum, bool resize=true)
 
void AssureSize (int newSize)
 
void AssureSize (int newSize, const type &initValue)
 
void AssureSizeAlloc (int newSize, new_t *allocator)
 
typePtr (void)
 
const typePtr (void) const
 
typeAlloc (void)
 
int Append (const type &obj)
 
int Append (const idList< type > &other)
 
int AddUnique (const type &obj)
 
int Insert (const type &obj, int index=0)
 
int FindIndex (const type &obj) const
 
typeFind (type const &obj) const
 
int FindNull (void) const
 
int IndexOf (const type *obj) const
 
bool RemoveIndex (int index)
 
bool Remove (const type &obj)
 
void Sort (cmp_t *compare=(cmp_t *)&idListSortCompare< type >)
 
void SortSubSection (int startIndex, int endIndex, cmp_t *compare=(cmp_t *)&idListSortCompare< type >)
 
void Swap (idList< type > &other)
 
void DeleteContents (bool clear)
 

Private Attributes

int num
 
int size
 
int granularity
 
typelist
 

Detailed Description

template<class type>
class idList< type >

Definition at line 84 of file List.h.

Member Typedef Documentation

template<class type>
typedef int idList< type >::cmp_t(const type *, const type *)

Definition at line 87 of file List.h.

template<class type>
typedef type idList< type >::new_t(void)

Definition at line 88 of file List.h.

Constructor & Destructor Documentation

template<class type >
ID_INLINE idList< type >::idList ( int  newgranularity = 16)

Definition at line 147 of file List.h.

template<class type>
ID_INLINE idList< type >::idList ( const idList< type > &  other)

Definition at line 161 of file List.h.

template<class type >
ID_INLINE idList< type >::~idList ( void  )

Definition at line 172 of file List.h.

Member Function Documentation

template<class type>
ID_INLINE int idList< type >::AddUnique ( const type obj)

Definition at line 742 of file List.h.

template<class type >
ID_INLINE type & idList< type >::Alloc ( void  )

Definition at line 624 of file List.h.

template<class type >
ID_INLINE size_t idList< type >::Allocated ( void  ) const

Definition at line 230 of file List.h.

template<class type>
ID_INLINE int idList< type >::Append ( const type obj)

Definition at line 646 of file List.h.

template<class type>
ID_INLINE int idList< type >::Append ( const idList< type > &  other)

Definition at line 718 of file List.h.

template<class type >
ID_INLINE void idList< type >::AssureSize ( int  newSize)

Definition at line 445 of file List.h.

template<class type>
ID_INLINE void idList< type >::AssureSize ( int  newSize,
const type initValue 
)

Definition at line 470 of file List.h.

template<class type >
ID_INLINE void idList< type >::AssureSizeAlloc ( int  newSize,
new_t allocator 
)

Definition at line 503 of file List.h.

template<class type >
ID_INLINE void idList< type >::Clear ( void  )

Definition at line 184 of file List.h.

template<class type >
ID_INLINE void idList< type >::Condense ( void  )

Definition at line 341 of file List.h.

template<class type >
ID_INLINE void idList< type >::DeleteContents ( bool  clear)

Definition at line 207 of file List.h.

template<class type>
ID_INLINE type * idList< type >::Find ( type const obj) const

Definition at line 782 of file List.h.

template<class type>
ID_INLINE int idList< type >::FindIndex ( const type obj) const

Definition at line 761 of file List.h.

template<class type >
ID_INLINE int idList< type >::FindNull ( void  ) const

Definition at line 804 of file List.h.

template<class type >
ID_INLINE int idList< type >::GetGranularity ( void  ) const

Definition at line 329 of file List.h.

template<class type>
ID_INLINE int idList< type >::IndexOf ( const type obj) const

Definition at line 828 of file List.h.

template<class type>
ID_INLINE int idList< type >::Insert ( const type obj,
int  index = 0 
)

Definition at line 679 of file List.h.

template<class type >
ID_INLINE size_t idList< type >::MemoryUsed ( void  ) const

Definition at line 252 of file List.h.

template<class type >
ID_INLINE int idList< type >::Num ( void  ) const

Definition at line 265 of file List.h.

template<class type >
ID_INLINE int idList< type >::NumAllocated ( void  ) const

Definition at line 277 of file List.h.

template<class type>
ID_INLINE idList< type > & idList< type >::operator= ( const idList< type > &  other)

Definition at line 533 of file List.h.

template<class type >
ID_INLINE const type & idList< type >::operator[] ( int  index) const

Definition at line 561 of file List.h.

template<class type >
ID_INLINE type & idList< type >::operator[] ( int  index)

Definition at line 577 of file List.h.

template<class type >
ID_INLINE type * idList< type >::Ptr ( void  )

Definition at line 596 of file List.h.

template<class type >
const ID_INLINE type * idList< type >::Ptr ( void  ) const

Definition at line 612 of file List.h.

template<class type>
ID_INLINE bool idList< type >::Remove ( const type obj)

Definition at line 878 of file List.h.

template<class type >
ID_INLINE bool idList< type >::RemoveIndex ( int  index)

Definition at line 849 of file List.h.

template<class type >
ID_INLINE void idList< type >::Resize ( int  newsize)

Definition at line 360 of file List.h.

template<class type >
ID_INLINE void idList< type >::Resize ( int  newsize,
int  newgranularity 
)

Definition at line 404 of file List.h.

template<class type >
ID_INLINE void idList< type >::SetGranularity ( int  newgranularity)

Definition at line 305 of file List.h.

template<class type >
ID_INLINE void idList< type >::SetNum ( int  newnum,
bool  resize = true 
)

Definition at line 289 of file List.h.

template<class type >
ID_INLINE size_t idList< type >::Size ( void  ) const

Definition at line 242 of file List.h.

template<class type >
ID_INLINE void idList< type >::Sort ( cmp_t compare = cmp_t * )&idListSortCompare<type>)

Definition at line 898 of file List.h.

template<class type >
ID_INLINE void idList< type >::SortSubSection ( int  startIndex,
int  endIndex,
cmp_t compare = cmp_t * )&idListSortCompare<type> 
)

Definition at line 916 of file List.h.

template<class type>
ID_INLINE void idList< type >::Swap ( idList< type > &  other)

Definition at line 943 of file List.h.

Member Data Documentation

template<class type>
int idList< type >::granularity
private

Definition at line 137 of file List.h.

template<class type>
type* idList< type >::list
private

Definition at line 138 of file List.h.

template<class type>
int idList< type >::num
private

Definition at line 135 of file List.h.

template<class type>
int idList< type >::size
private

Definition at line 136 of file List.h.


The documentation for this class was generated from the following file: