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

#include <GA_MergeOffsetMap.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 23 of file GA_MergeOffsetMap.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file GA_TempBuffer.h.

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

Definition at line 42 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 76 of file GA_TempBuffer.h.

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

Clear all entries.

Definition at line 48 of file GA_TempBuffer.h.

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

Definition at line 141 of file GA_TempBuffer.h.

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

Definition at line 142 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 60 of file GA_TempBuffer.h.

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

Query the reserved capacity.

Definition at line 63 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 91 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 97 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 96 of file GA_TempBuffer.h.

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

Definition at line 133 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 105 of file GA_TempBuffer.h.

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

Definition at line 115 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 66 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 84 of file GA_TempBuffer.h.

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

Definition at line 148 of file GA_TempBuffer.h.

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

Definition at line 111 of file GA_TempBuffer.h.


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