HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter Class Reference

Class to help with insertion of keyed string values into metadata. More...

#include <AttributeArrayString.h>

Public Types

using UniquePtr = std::unique_ptr< StringMetaInserter >
 

Public Member Functions

 StringMetaInserter (MetaMap &metadata)
 
bool hasKey (const Name &key) const
 Returns true if key exists. More...
 
bool hasIndex (Index index) const
 Returns true if index exists. More...
 
Index insert (const Name &name, Index hint=Index(0))
 Insert the string into the metadata using the hint if non-zero. More...
 
void resetCache ()
 Reset the cache from the metadata. More...
 

Detailed Description

Class to help with insertion of keyed string values into metadata.

Definition at line 96 of file AttributeArrayString.h.

Member Typedef Documentation

using openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::UniquePtr = std::unique_ptr<StringMetaInserter>

Definition at line 99 of file AttributeArrayString.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::StringMetaInserter ( MetaMap metadata)
explicit

Member Function Documentation

bool openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::hasIndex ( Index  index) const

Returns true if index exists.

bool openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::hasKey ( const Name key) const

Returns true if key exists.

Index openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::insert ( const Name name,
Index  hint = Index(0) 
)

Insert the string into the metadata using the hint if non-zero.

Parameters
namethe string to insert
hintrequested index to use if non-zero and not already in use
Note
the hint can be used to insert non-sequentially so as to avoid an expensive re-indexing of string keys
Returns
the chosen index which will match hint if the hint was used
void openvdb::OPENVDB_VERSION_NAME::points::StringMetaInserter::resetCache ( )

Reset the cache from the metadata.


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