Public Member Functions | Data Fields

CacheArray< T > Struct Template Reference

#include <P_CacheArray.h>

Public Member Functions

 CacheArray (const T *val, int initial_size=0)
 ~CacheArray ()
 operator const T * () const
 operator T * ()
T & operator[] (int idx)
T & operator() (int idx)
T * detach ()
int length ()
void clear ()
void set_length (int i)
void resize (int new_size)

Data Fields

T * data
fast_data [FAST_DATA_SIZE]
const T * default_val
int size
int pos

Detailed Description

template<class T>
struct CacheArray< T >

Definition at line 30 of file P_CacheArray.h.


Constructor & Destructor Documentation

template<class T>
TS_INLINE CacheArray< T >::CacheArray ( const T *  val,
int  initial_size = 0 
)

Definition at line 57 of file P_CacheArray.h.

References CacheArray< T >::resize().

template<class T >
TS_INLINE CacheArray< T >::~CacheArray (  ) 

Definition at line 74 of file P_CacheArray.h.

References CacheArray< T >::data, and CacheArray< T >::fast_data.


Member Function Documentation

template<class T >
TS_INLINE void CacheArray< T >::clear (  ) 
template<class T >
TS_INLINE T * CacheArray< T >::detach (  ) 

Definition at line 123 of file P_CacheArray.h.

References CacheArray< T >::data, and T.

template<class T >
TS_INLINE int CacheArray< T >::length (  ) 

Definition at line 133 of file P_CacheArray.h.

References CacheArray< T >::pos.

template<class T >
TS_INLINE CacheArray< T >::operator const T * (  )  const

Definition at line 83 of file P_CacheArray.h.

References CacheArray< T >::data.

template<class T >
TS_INLINE CacheArray< T >::operator T * (  ) 

Definition at line 90 of file P_CacheArray.h.

References T.

template<class T >
TS_INLINE T & CacheArray< T >::operator() ( int  idx  ) 
template<class T >
TS_INLINE T & CacheArray< T >::operator[] ( int  idx  ) 

Definition at line 95 of file P_CacheArray.h.

References CacheArray< T >::data, and T.

template<class T >
TS_INLINE void CacheArray< T >::resize ( int  new_size  ) 
template<class T>
void CacheArray< T >::set_length ( int  i  )  [inline]

Definition at line 42 of file P_CacheArray.h.


Field Documentation

template<class T>
T* CacheArray< T >::data
template<class T>
const T* CacheArray< T >::default_val

Definition at line 51 of file P_CacheArray.h.

Referenced by CacheArray< T >::resize().

template<class T>
T CacheArray< T >::fast_data[FAST_DATA_SIZE]
template<class T>
int CacheArray< T >::pos
template<class T>
int CacheArray< T >::size

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