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

#include <UT_PackedArrayOfArrays.h>

Public Types

typedef UT_Array< Tvalue_type
 

Public Member Functions

 UT_PackedArrayOfArrays ()
 
void clear ()
 
bool isEmpty () const
 
exint size () const
 Returns the number of arrays in this structure. More...
 
exint entries () const
 
int64 getMemoryUsage (bool inclusive=false) const
 
void append (const UT_Array< T > &arr)
 Adds a new array to the end of our list of arrays. More...
 
void append (const T *data, exint len)
 
void append (const UT_PackedArrayOfArrays< T > &arr, exint idx)
 
void concat (const UT_PackedArrayOfArrays< T > &arr)
 Appends an array of arrays to our list. More...
 
TappendArray (exint len)
 
const Toperator() (exint idx, exint idx_in_array) const
 From the given idxth array, return the idx_in_array element. More...
 
void extract (UT_Array< T > &result, exint idx) const
 Extracts an array into a UT_Array. More...
 
TarrayData (exint idx)
 
const TarrayData (exint idx) const
 
exint arrayLen (exint idx) const
 
void truncate (exint maxsize)
 Decreases, but never expands, to the given maxsize. More...
 
void setDataCapacity (exint capacity)
 
void setDataCapacityIfNeeded (exint capacity)
 
void setArrayCapacity (exint capacity)
 
void setArrayCapacityIfNeeded (exint capacity)
 
UT_Array< exint > & rawOffsets ()
 
const UT_Array< exint > & rawOffsets () const
 
UT_Array< T > & rawData ()
 All of the array data is in one contiguous block. More...
 
const UT_Array< T > & rawData () const
 

Protected Attributes

UT_Array< exintmyOffsets
 
UT_Array< TmyData
 

Detailed Description

template<typename T>
class UT_PackedArrayOfArrays< T >

Definition at line 22 of file UT_PackedArrayOfArrays.h.

Member Typedef Documentation

template<typename T>
typedef UT_Array<T> UT_PackedArrayOfArrays< T >::value_type

Definition at line 25 of file UT_PackedArrayOfArrays.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file UT_PackedArrayOfArrays.h.

Member Function Documentation

template<typename T>
void UT_PackedArrayOfArrays< T >::append ( const UT_Array< T > &  arr)
inline

Adds a new array to the end of our list of arrays.

Definition at line 48 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::append ( const T data,
exint  len 
)
inline

Definition at line 50 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::append ( const UT_PackedArrayOfArrays< T > &  arr,
exint  idx 
)
inline

Definition at line 58 of file UT_PackedArrayOfArrays.h.

template<typename T>
T* UT_PackedArrayOfArrays< T >::appendArray ( exint  len)
inline

Appends a new array and returns a pointer to the resulting data so it can be filled in.

Definition at line 70 of file UT_PackedArrayOfArrays.h.

template<typename T>
T* UT_PackedArrayOfArrays< T >::arrayData ( exint  idx)
inline

Definition at line 100 of file UT_PackedArrayOfArrays.h.

template<typename T>
const T* UT_PackedArrayOfArrays< T >::arrayData ( exint  idx) const
inline

Definition at line 108 of file UT_PackedArrayOfArrays.h.

template<typename T>
exint UT_PackedArrayOfArrays< T >::arrayLen ( exint  idx) const
inline

Definition at line 113 of file UT_PackedArrayOfArrays.h.

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

Definition at line 31 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::concat ( const UT_PackedArrayOfArrays< T > &  arr)
inline

Appends an array of arrays to our list.

Definition at line 62 of file UT_PackedArrayOfArrays.h.

template<typename T>
exint UT_PackedArrayOfArrays< T >::entries ( void  ) const
inline

Definition at line 38 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::extract ( UT_Array< T > &  result,
exint  idx 
) const
inline

Extracts an array into a UT_Array.

Definition at line 90 of file UT_PackedArrayOfArrays.h.

template<typename T>
int64 UT_PackedArrayOfArrays< T >::getMemoryUsage ( bool  inclusive = false) const
inline

Definition at line 40 of file UT_PackedArrayOfArrays.h.

template<typename T>
bool UT_PackedArrayOfArrays< T >::isEmpty ( ) const
inline

Definition at line 33 of file UT_PackedArrayOfArrays.h.

template<typename T>
const T& UT_PackedArrayOfArrays< T >::operator() ( exint  idx,
exint  idx_in_array 
) const
inline

From the given idxth array, return the idx_in_array element.

Definition at line 81 of file UT_PackedArrayOfArrays.h.

template<typename T>
UT_Array<T>& UT_PackedArrayOfArrays< T >::rawData ( )
inline

All of the array data is in one contiguous block.

Definition at line 152 of file UT_PackedArrayOfArrays.h.

template<typename T>
const UT_Array<T>& UT_PackedArrayOfArrays< T >::rawData ( ) const
inline

Definition at line 153 of file UT_PackedArrayOfArrays.h.

template<typename T>
UT_Array<exint>& UT_PackedArrayOfArrays< T >::rawOffsets ( )
inline

The raw offset table stores the end of each array in the data array. Each array has [rawOffsets(idx) ... rawOffsets(idx+1))

Definition at line 148 of file UT_PackedArrayOfArrays.h.

template<typename T>
const UT_Array<exint>& UT_PackedArrayOfArrays< T >::rawOffsets ( ) const
inline

Definition at line 149 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::setArrayCapacity ( exint  capacity)
inline

Definition at line 140 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::setArrayCapacityIfNeeded ( exint  capacity)
inline

Definition at line 142 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::setDataCapacity ( exint  capacity)
inline

These adjust the capacity without adjusting the entries and are useful for pre-allocing the amount when known in advance.

Definition at line 136 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::setDataCapacityIfNeeded ( exint  capacity)
inline

Definition at line 138 of file UT_PackedArrayOfArrays.h.

template<typename T>
exint UT_PackedArrayOfArrays< T >::size ( void  ) const
inline

Returns the number of arrays in this structure.

Definition at line 37 of file UT_PackedArrayOfArrays.h.

template<typename T>
void UT_PackedArrayOfArrays< T >::truncate ( exint  maxsize)
inline

Decreases, but never expands, to the given maxsize.

Definition at line 119 of file UT_PackedArrayOfArrays.h.

Member Data Documentation

template<typename T>
UT_Array<T> UT_PackedArrayOfArrays< T >::myData
protected

Definition at line 157 of file UT_PackedArrayOfArrays.h.

template<typename T>
UT_Array<exint> UT_PackedArrayOfArrays< T >::myOffsets
protected

Definition at line 156 of file UT_PackedArrayOfArrays.h.


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