|
HDK
|
#include <vector.h>
Inheritance diagram for VdfVector:Classes | |
| class | DebugPrintable |
| class | ReadAccessor |
| class | ReadWriteAccessor |
Public Types | |
| enum | ConstructBoxedCopyTag { ConstructBoxedCopy } |
Public Member Functions | |
| VdfVector (const VdfVector &rhs) | |
| VdfVector (const VdfVector &rhs, const VdfMask &mask) | |
| VdfVector (const VdfVector &rhs, const VdfMask &mask, ConstructBoxedCopyTag) | |
| VdfVector (const VdfVector &rhs, size_t size) | |
| VdfVector (VdfVector &&rhs) | |
| ~VdfVector () | |
| size_t | GetSize () const |
| bool | IsEmpty () const |
| size_t | GetNumStoredElements () const |
| template<typename TYPE > | |
| void | Set (TYPE &&data) |
| template<typename TYPE > | |
| void | Set (const Vdf_BoxedContainer< TYPE > &data) |
| template<typename TYPE > | |
| void | Set (Vdf_BoxedContainer< TYPE > &data) |
| template<typename TYPE > | |
| void | Set (const Vdf_BoxedContainer< TYPE > &&data) |
| template<typename TYPE > | |
| void | Set (Vdf_BoxedContainer< TYPE > &&data) |
| template<typename TYPE > | |
| void | Resize (size_t size) |
| template<typename TYPE > | |
| void | Resize (const VdfMask::Bits &bits) |
| VDF_API void | Clear () |
| void | Copy (const VdfVector &rhs, const VdfMask &mask) |
| VDF_API void | Merge (const VdfVector &rhs, const VdfMask::Bits &bits) |
| void | Merge (const VdfVector &rhs, const VdfMask &mask) |
| bool | Share () const |
| bool | IsShared () const |
| bool | IsSharable () const |
| template<typename T > | |
| VtArray< T > | ExtractAsVtArray (const size_t size, const int offset) const |
| template<typename TYPE > | |
| ReadWriteAccessor< TYPE > | GetReadWriteAccessor () const |
| template<typename TYPE > | |
| ReadAccessor< TYPE > | GetReadAccessor () const |
| template<typename TYPE > | |
| Vdf_VectorSubrangeAccessor< TYPE > | GetSubrangeAccessor () const |
| template<typename TYPE > | |
| bool | Holds () const |
| VdfVector & | operator= (const VdfVector &rhs) |
| VdfVector & | operator= (VdfVector &&rhs) |
| size_t | EstimateElementMemory () const |
| DebugPrintable | GetDebugPrintable (const VdfMask &mask) const |
Protected Member Functions | |
| VdfVector () | |
Protected Attributes | |
| Vdf_VectorData::DataHolder | _data |
This class is used to abstract away knowledge of the cache data used for each node.
Note that data can be put into a VdfVector only atomically, no incremental adding of elements is possible.
Note that Vdf requires the availability of the default and copy constructor for the given template parameter TYPE. Additional Vdf provides default fallback values via the VdfExecutionTypeRegistry. That is to give types the ability to have empty default constructors (for speed) but at the same time have well definied values to use in case we need to provide a "default".
|
inline |
|
inline |
|
inline |
|
inline |
Destroys contents of this vector.
Resets the vector to have zero size but maintains the held type.
|
inline |
|
inline |
|
inline |
|
inline |
GetReadAccessor() allows low level read-only access to the content of of the VdfVector via the Vdf_VectorData base class. In order to get the handle to that, this method will do the correct type checking for you.
|
inline |
GetReadWriteAccessor() allows low level access to the content of the VdfVector via the Vdf_VectorData base class. In order to get the handle to that this method will do the correct type checking for you.
|
inline |
|
inline |
Provide read-only access to the boxed subranges held by this vector.
While this is a public method, only VdfSubrangeView can make use of the returned Vdf_VectorSubrangeAccessor.
|
inline |
|
inline |
|
inline |
|
inline |
| VDF_API void VdfVector::Merge | ( | const VdfVector & | rhs, |
| const VdfMask::Bits & | bits | ||
| ) |
Merges the contents of rhs into this vector. The elements copied from rhs are determined by the mask.
rhs and this vector must be type compatible. Also note, that this vector (the destination vector), must NOT be a compressed vector.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Embeds the current vector's existing implementaion into a reference counted implementaion so that the data can be shared without copying. Mutating the contents of the data holder once shared will cause detachment. Returns true if the sharing was successful.
Note: This method is not thread safe.
|
mutableprotected |