HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_TempBuffer< T > Class Template Reference

#include <GA_TempBuffer.h>

Public Member Functions

 GA_TempBuffer ()
 
 ~GA_TempBuffer ()
 
void clear ()
 Clear all entries. More...
 
GA_Size entries () const
 How many elements in the buffer. More...
 
GA_Size getCapacity () const
 Query the reserved capacity. More...
 
void reserve (GA_Size size, bool setsize=false)
 Reserve storage. More...
 
void append (const T &value)
 Append an element to the array. More...
 
void setValue (GA_Size i, const T &value)
 Set an item in the buffer to the given value. More...
 
const TremoveLast ()
 Return the last entry and remove it from the list. More...
 
void truncate (GA_Size sz)
 
exint removeMatchingItems (const T &value)
 
void removeIndex (exint index)
 
const Tdata () const
 
Tdata (GA_Size size)
 
void swap (GA_Size i0, GA_Size i1)
 
const TgetValue (GA_Size i) const
 
const Toperator() (GA_Size i) const
 
const Tlast () const
 

Detailed Description

template<typename T>
class GA_TempBuffer< T >

Template class to hold an array of temporary objects.

These arrays have a temporary buffer. When the buffer fills, the array will grow by allocating off the heap. The buffers are implemented for simple POD objects.

Definition at line 35 of file GA_TempBuffer.h.

Constructor & Destructor Documentation

template<typename T>
GA_TempBuffer< T >::GA_TempBuffer ( )
inline

Definition at line 38 of file GA_TempBuffer.h.

template<typename T>
GA_TempBuffer< T >::~GA_TempBuffer ( )
inline

Definition at line 43 of file GA_TempBuffer.h.

Member Function Documentation

template<typename T>
void GA_TempBuffer< T >::append ( const T value)
inline

Append an element to the array.

Definition at line 77 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::clear ( )
inline

Clear all entries.

Definition at line 49 of file GA_TempBuffer.h.

template<typename T>
const T* GA_TempBuffer< T >::data ( ) const
inline

Definition at line 142 of file GA_TempBuffer.h.

template<typename T>
T* GA_TempBuffer< T >::data ( GA_Size  size)
inline

Definition at line 143 of file GA_TempBuffer.h.

template<typename T>
GA_Size GA_TempBuffer< T >::entries ( ) const
inline

How many elements in the buffer.

Definition at line 61 of file GA_TempBuffer.h.

template<typename T>
GA_Size GA_TempBuffer< T >::getCapacity ( ) const
inline

Query the reserved capacity.

Definition at line 64 of file GA_TempBuffer.h.

template<typename T>
const T& GA_TempBuffer< T >::getValue ( GA_Size  i) const
inline

Return the value from the array

Definition at line 92 of file GA_TempBuffer.h.

template<typename T>
const T& GA_TempBuffer< T >::last ( ) const
inline

Return the value from the array

Definition at line 98 of file GA_TempBuffer.h.

template<typename T>
const T& GA_TempBuffer< T >::operator() ( GA_Size  i) const
inline

Return the value from the array

Definition at line 97 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::removeIndex ( exint  index)
inline

Definition at line 134 of file GA_TempBuffer.h.

template<typename T>
const T& GA_TempBuffer< T >::removeLast ( )
inline

Return the last entry and remove it from the list.

Definition at line 106 of file GA_TempBuffer.h.

template<typename T>
exint GA_TempBuffer< T >::removeMatchingItems ( const T value)
inline

Definition at line 116 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::reserve ( GA_Size  size,
bool  setsize = false 
)
inline

Reserve storage.

Definition at line 67 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::setValue ( GA_Size  i,
const T value 
)
inline

Set an item in the buffer to the given value.

Definition at line 85 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::swap ( GA_Size  i0,
GA_Size  i1 
)
inline

Definition at line 149 of file GA_TempBuffer.h.

template<typename T>
void GA_TempBuffer< T >::truncate ( GA_Size  sz)
inline

Definition at line 112 of file GA_TempBuffer.h.


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