HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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...
 
void concat (UT_PackedArrayOfArrays< T > &&arr)
 Moves 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
 
UT_Span< const Tspan (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
 
UT_IteratorRange< T * > arrayRange (exint idx)
 
UT_IteratorRange< const T * > arrayRange (exint idx) const
 

Detailed Description

template<typename T>
class UT_PackedArrayOfArrays< T >

Definition at line 25 of file UT_PackedArrayOfArrays.h.

Member Typedef Documentation

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

Definition at line 28 of file UT_PackedArrayOfArrays.h.

Constructor & Destructor Documentation

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

Definition at line 30 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 51 of file UT_PackedArrayOfArrays.h.

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

Definition at line 53 of file UT_PackedArrayOfArrays.h.

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

Definition at line 61 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 94 of file UT_PackedArrayOfArrays.h.

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

Definition at line 124 of file UT_PackedArrayOfArrays.h.

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

Definition at line 132 of file UT_PackedArrayOfArrays.h.

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

Definition at line 137 of file UT_PackedArrayOfArrays.h.

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

Returns an iterator range for the specified array.

Definition at line 148 of file UT_PackedArrayOfArrays.h.

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

Returns an iterator range for the specified array.

Definition at line 150 of file UT_PackedArrayOfArrays.h.

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

Definition at line 34 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 65 of file UT_PackedArrayOfArrays.h.

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

Moves an array of arrays to our list.

Definition at line 72 of file UT_PackedArrayOfArrays.h.

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

Definition at line 41 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 114 of file UT_PackedArrayOfArrays.h.

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

Definition at line 43 of file UT_PackedArrayOfArrays.h.

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

Definition at line 36 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 105 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 188 of file UT_PackedArrayOfArrays.h.

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

Definition at line 189 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 184 of file UT_PackedArrayOfArrays.h.

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

Definition at line 185 of file UT_PackedArrayOfArrays.h.

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

Definition at line 176 of file UT_PackedArrayOfArrays.h.

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

Definition at line 178 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 172 of file UT_PackedArrayOfArrays.h.

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

Definition at line 174 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 40 of file UT_PackedArrayOfArrays.h.

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

Definition at line 141 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 155 of file UT_PackedArrayOfArrays.h.


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