Loading...
Searching...
No Matches
VdfTypedVector< TYPE > Class Template Reference

A VdfTypedVector implements a VdfVector with a specific type. More...

#include <typedVector.h>

+ Inheritance diagram for VdfTypedVector< TYPE >:

Public Member Functions

 VdfTypedVector ()
 Constructs an empty vector.
 
 VdfTypedVector (const TYPE &value)
 Constructs a new vector and initializes it with a specific value.
 
- Public Member Functions inherited from VdfVector
 VdfVector (const VdfVector &rhs)
 Copy constructor.
 
 VdfVector (const VdfVector &rhs, const VdfMask &mask)
 Copy constructor with subset copying.
 
 VdfVector (const VdfVector &rhs, const VdfMask &mask, ConstructBoxedCopyTag)
 
 VdfVector (const VdfVector &rhs, size_t size)
 Construct a vector with the same element type as rhs and of size size.
 
 VdfVector (VdfVector &&rhs)
 Move constructor.
 
 ~VdfVector ()
 Destructor.
 
size_t GetSize () const
 Returns the number of elements held in this vector.
 
bool IsEmpty () const
 Returns whether or not this vector is empty.
 
size_t GetNumStoredElements () const
 Returns the number of elements for which this vector has storage.
 
template<typename TYPE >
void Set (TYPE &&data)
 Forwards data into the vector.
 
template<typename TYPE >
void Set (const Vdf_BoxedContainer< TYPE > &data)
 Copy boxed values into the vector.
 
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)
 Move boxed values into the vector.
 
template<typename TYPE >
void Resize (size_t size)
 Allocates space for size number of elements.
 
template<typename TYPE >
void Resize (const VdfMask::Bits &bits)
 Allocates space for the elements denoted by bits.
 
void Copy (const VdfVector &rhs, const VdfMask &mask)
 Copies the contents of rhs into this vector.
 
VDF_API void Merge (const VdfVector &rhs, const VdfMask::Bits &bits)
 Merges the contents of rhs into this vector.
 
void Merge (const VdfVector &rhs, const VdfMask &mask)
 Same as Merge(), but takes a VdfMask instead of a bitset.
 
bool Share () const
 Embeds the current vector's existing implementaion into a reference counted implementaion so that the data can be shared without copying.
 
bool IsShared () const
 Returns true if the vector has been shared.
 
bool IsSharable () const
 Returns true if the vector can be shared.
 
template<typename T >
VtArray< T > ExtractAsVtArray (const size_t size, const int offset) const
 Extracts this vector's values into a VtArray<T>.
 
template<typename TYPE >
ReadWriteAccessor< TYPE > GetReadWriteAccessor () const
 GetReadWriteAccessor() allows low level access to the content of the VdfVector via the Vdf_VectorData base class.
 
template<typename TYPE >
ReadAccessor< TYPE > GetReadAccessor () const
 GetReadAccessor() allows low level read-only access to the content of of the VdfVector via the Vdf_VectorData base class.
 
template<typename TYPE >
Vdf_VectorSubrangeAccessor< TYPE > GetSubrangeAccessor () const
 Provide read-only access to the boxed subranges held by this vector.
 
template<typename TYPE >
bool Holds () const
 Checks if a vector holds a specific type.
 
VdfVectoroperator= (const VdfVector &rhs)
 Copies the content of rhs into this vector.
 
VdfVectoroperator= (VdfVector &&rhs)
 Moves the content of rhs into this vector.
 
size_t EstimateElementMemory () const
 Returns the number of bytes necessary to store a single element of this VdfVector.
 
DebugPrintable GetDebugPrintable (const VdfMask &mask) const
 Returns an ostream-able object, which can be used to debug print the contents of this VdfVector, filtered by mask.
 

Static Public Member Functions

static VdfTypedVector CreateWithSize (size_t size)
 Constructs a new vector with the specified size.
 

Additional Inherited Members

- Public Types inherited from VdfVector
enum  ConstructBoxedCopyTag { ConstructBoxedCopy }
 Copy constructor with boxing. More...
 
- Protected Attributes inherited from VdfVector
Vdf_VectorData::DataHolder _data
 

Detailed Description

template<typename TYPE>
class VdfTypedVector< TYPE >

A VdfTypedVector implements a VdfVector with a specific type.

Definition at line 22 of file typedVector.h.

Constructor & Destructor Documentation

◆ VdfTypedVector() [1/2]

VdfTypedVector ( )
inline

Constructs an empty vector.

Definition at line 31 of file typedVector.h.

◆ VdfTypedVector() [2/2]

VdfTypedVector ( const TYPE &  value)
inline

Constructs a new vector and initializes it with a specific value.

Definition at line 38 of file typedVector.h.

Member Function Documentation

◆ CreateWithSize()

static VdfTypedVector CreateWithSize ( size_t  size)
inlinestatic

Constructs a new vector with the specified size.

Definition at line 45 of file typedVector.h.


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