HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_VariantArray Class Reference

#include <UT_Variant.h>

Public Types

using container_type = UT_Array< UT_Variant >
 
using iterator = container_type::iterator
 
using const_iterator = container_type::const_iterator
 

Public Member Functions

 UT_VariantArray (exint size=0)
 
 UT_VariantArray (std::initializer_list< UT_Variant > init)
 Construct a variant array from an initializer list. More...
 
 UT_VariantArray (const UT_VariantArray &)=default
 
 UT_VariantArray (UT_VariantArray &&)=default
 Move the variant array container from another variant array. More...
 
UT_VariantArrayoperator= (const UT_VariantArray &)=default
 
UT_VariantArrayoperator= (UT_VariantArray &&)=default
 Move the variant array container from another variant array. More...
 
bool operator== (const UT_VariantArray &o) const
 Item-wise equality comparison of the variants of the two arrays. More...
 
bool operator!= (const UT_VariantArray &o) const
 Item-wise non-equality comparison of the variants of the two arrays. More...
 
void deepCopy (const UT_VariantArray &)
 
exint size () const
 Returns the number of items in the array container. More...
 
const UT_Variantoperator[] (exint index) const
 
UT_Variantoperator[] (exint index)
 
exint append (const UT_Variant &t)
 
exint append (UT_Variant &&t)
 
iterator begin ()
 Return a writable iterator to the beginning of the array container. More...
 
const_iterator begin () const
 Return a read-only iterator to the beginning of the array container. More...
 
iterator end ()
 Return a writable iterator to the end of the array container. More...
 
const_iterator end () const
 Return a read-only iterator to the end of the array container. More...
 
const container_typecontainer () const
 Returns a read-only reference to the underlying array container. More...
 
container_typecontainer ()
 Returns a writable reference to the underlying array container. More...
 

Detailed Description

Wrapper around a shared variant array container. Modifications are shared among all wrappers referring to the same container.

Definition at line 30 of file UT_Variant.h.

Member Typedef Documentation

Definition at line 33 of file UT_Variant.h.

Constructor & Destructor Documentation

UT_VariantArray::UT_VariantArray ( exint  size = 0)

Construct a variant array of a given size. The constructed variants will all be of the unknown type.

UT_VariantArray::UT_VariantArray ( std::initializer_list< UT_Variant init)
inline

Construct a variant array from an initializer list.

Definition at line 478 of file UT_Variant.h.

UT_VariantArray::UT_VariantArray ( const UT_VariantArray )
default

Construct a variant array by referencing the variant array container from another. Only the pointer to the underlying array is copied. The two wrappers will share the same array.

UT_VariantArray::UT_VariantArray ( UT_VariantArray &&  )
default

Move the variant array container from another variant array.

Member Function Documentation

exint UT_VariantArray::append ( const UT_Variant t)
inline

Add a new variant to the array container. All instances of a array wrapper that use the same array container will see the new item.

Definition at line 82 of file UT_Variant.h.

exint UT_VariantArray::append ( UT_Variant &&  t)
inline

Add a new variant to the array container. All instances of a array wrapper that use the same array container will see the new item.

Definition at line 86 of file UT_Variant.h.

iterator UT_VariantArray::begin ( void  )
inline

Return a writable iterator to the beginning of the array container.

Definition at line 89 of file UT_Variant.h.

const_iterator UT_VariantArray::begin ( void  ) const
inline

Return a read-only iterator to the beginning of the array container.

Definition at line 92 of file UT_Variant.h.

const container_type& UT_VariantArray::container ( ) const
inline

Returns a read-only reference to the underlying array container.

Definition at line 101 of file UT_Variant.h.

container_type& UT_VariantArray::container ( )
inline

Returns a writable reference to the underlying array container.

Definition at line 104 of file UT_Variant.h.

void UT_VariantArray::deepCopy ( const UT_VariantArray )

Make a deep copy of another array container. This array wrapper will not share the array container with the other.

iterator UT_VariantArray::end ( void  )
inline

Return a writable iterator to the end of the array container.

Definition at line 95 of file UT_Variant.h.

const_iterator UT_VariantArray::end ( void  ) const
inline

Return a read-only iterator to the end of the array container.

Definition at line 98 of file UT_Variant.h.

bool UT_VariantArray::operator!= ( const UT_VariantArray o) const
inline

Item-wise non-equality comparison of the variants of the two arrays.

Definition at line 63 of file UT_Variant.h.

UT_VariantArray& UT_VariantArray::operator= ( const UT_VariantArray )
default

Copy a variant array by referencing the variant array container from another. The two variant arrays will share the same list container.

UT_VariantArray& UT_VariantArray::operator= ( UT_VariantArray &&  )
default

Move the variant array container from another variant array.

bool UT_VariantArray::operator== ( const UT_VariantArray o) const
inline

Item-wise equality comparison of the variants of the two arrays.

Definition at line 60 of file UT_Variant.h.

const UT_Variant& UT_VariantArray::operator[] ( exint  index) const
inline

Returns a read-only variant at index index. No bound-checking is performed.

Definition at line 74 of file UT_Variant.h.

UT_Variant& UT_VariantArray::operator[] ( exint  index)
inline

Returns a writable variant at index index. No bound-checking is performed.

Definition at line 78 of file UT_Variant.h.

exint UT_VariantArray::size ( void  ) const
inline

Returns the number of items in the array container.

Definition at line 70 of file UT_Variant.h.


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