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

#include <UT_Variant.h>

Public Types

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

Public Member Functions

 UT_VariantMap ()
 Construct a default, empty container. More...
 
 UT_VariantMap (std::initializer_list< container_type::value_type > init)
 Construct a new container from a list of key/value pairs. More...
 
 UT_VariantMap (const UT_VariantMap &)=default
 
 UT_VariantMap (UT_VariantMap &&)=default
 Move the variant map container from another variant map wrapper. More...
 
UT_VariantMapoperator= (const UT_VariantMap &)=default
 
UT_VariantMapoperator= (UT_VariantMap &&)=default
 Move the variant map container from another variant map wrapper. More...
 
bool operator== (const UT_VariantMap &o) const
 Item-wise equality comparison of the keys and variants of the two maps. More...
 
bool operator!= (const UT_VariantMap &o) const
 
void deepCopy (const UT_VariantMap &)
 
const UT_Variantoperator[] (const UT_StringRef &key) const
 
UT_Variantoperator[] (const UT_StringHolder &key)
 
const_iterator find (const UT_StringRef &key) const
 
iterator find (const UT_StringRef &key)
 
bool contains (const UT_StringRef &key) const
 
bool erase (const UT_StringRef &key)
 
iterator erase (const_iterator it)
 
iterator begin ()
 Return a writable iterator to the beginning of the map container. More...
 
const_iterator begin () const
 Return a read-only iterator to the beginning of the map container. More...
 
iterator end ()
 Return a writable iterator to the end of the map container. More...
 
const_iterator end () const
 Return a read-only iterator to the end of the map container. More...
 
const container_typecontainer () const
 Returns a read-only reference to the underlying map container. More...
 
container_typecontainer ()
 Returns a writable reference to the underlying map container. More...
 

Detailed Description

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

Definition at line 112 of file UT_Variant.h.

Member Typedef Documentation

Constructor & Destructor Documentation

UT_VariantMap::UT_VariantMap ( )

Construct a default, empty container.

UT_VariantMap::UT_VariantMap ( std::initializer_list< container_type::value_type init)
inline

Construct a new container from a list of key/value pairs.

Definition at line 490 of file UT_Variant.h.

UT_VariantMap::UT_VariantMap ( const UT_VariantMap )
default

Construct a variant map by referencing the variant map container from another. The two map wrappers will share the same map.

UT_VariantMap::UT_VariantMap ( UT_VariantMap &&  )
default

Move the variant map container from another variant map wrapper.

Member Function Documentation

UT_VariantMap::iterator UT_VariantMap::begin ( void  )
inline

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

Definition at line 541 of file UT_Variant.h.

UT_VariantMap::const_iterator UT_VariantMap::begin ( void  ) const
inline

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

Definition at line 547 of file UT_Variant.h.

const container_type& UT_VariantMap::container ( ) const
inline

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

Definition at line 191 of file UT_Variant.h.

container_type& UT_VariantMap::container ( )
inline

Returns a writable reference to the underlying map container.

Definition at line 194 of file UT_Variant.h.

bool UT_VariantMap::contains ( const UT_StringRef key) const
inline

Returns true if the item associated with key exists in the map container.

Definition at line 168 of file UT_Variant.h.

void UT_VariantMap::deepCopy ( const UT_VariantMap )

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

UT_VariantMap::iterator UT_VariantMap::end ( void  )
inline

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

Definition at line 553 of file UT_Variant.h.

UT_VariantMap::const_iterator UT_VariantMap::end ( void  ) const
inline

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

Definition at line 559 of file UT_Variant.h.

bool UT_VariantMap::erase ( const UT_StringRef key)
inline

Erase the item associated with the key. If the item existed and was successfully erased, this function returns true.

Definition at line 529 of file UT_Variant.h.

UT_VariantMap::iterator UT_VariantMap::erase ( const_iterator  it)
inline

Erase the item pointed to by the iterator it. The returned iterator will point to the next item after the one deleted.

Definition at line 535 of file UT_Variant.h.

UT_VariantMap::const_iterator UT_VariantMap::find ( const UT_StringRef key) const
inline

Returns a read-only iterator pointing to the item associated with key. If the item doesn't exist, this will be the value of end.

Definition at line 523 of file UT_Variant.h.

UT_VariantMap::iterator UT_VariantMap::find ( const UT_StringRef key)
inline

Returns a writable iterator pointing to the item associated with key. If the item doesn't exist, this will be the value of end.

Definition at line 517 of file UT_Variant.h.

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

Item-wise non-equality comparison of the keys and variants of the two maps.

Definition at line 144 of file UT_Variant.h.

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

Copy a variant map by referencing the variant map container from another. The two map wrappers will share the same map container.

UT_VariantMap& UT_VariantMap::operator= ( UT_VariantMap &&  )
default

Move the variant map container from another variant map wrapper.

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

Item-wise equality comparison of the keys and variants of the two maps.

Definition at line 499 of file UT_Variant.h.

const UT_Variant & UT_VariantMap::operator[] ( const UT_StringRef key) const
inline

Returns a read-only variant associated with key. No error checking is performed. If the key doesn't exist, the behavior is undefined.

Definition at line 505 of file UT_Variant.h.

UT_Variant & UT_VariantMap::operator[] ( const UT_StringHolder key)
inline

Returns a writable variant associated with key. No error checking is performed. If the key doesn't exist, the behavior is undefined.

Definition at line 511 of file UT_Variant.h.


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