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

Class to compute a string->index map from all string:N metadata. More...

#include <AttributeArrayString.h>

Public Types

using UniquePtr = std::unique_ptr< StringMetaCache >
 
using ValueMap = std::unordered_map< Name, Index >
 

Public Member Functions

 StringMetaCache ()=default
 
 StringMetaCache (const MetaMap &metadata)
 
bool empty () const
 Return true if no string elements in metadata. More...
 
size_t size () const
 Returns the number of string elements in metadata. More...
 
void reset (const MetaMap &metadata)
 Clears and re-populates the cache. More...
 
void insert (const Name &key, Index index)
 Insert a new element in the cache. More...
 
const ValueMapmap () const
 Retrieve the value map (string -> index) More...
 

Detailed Description

Class to compute a string->index map from all string:N metadata.

Definition at line 56 of file AttributeArrayString.h.

Member Typedef Documentation

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

Definition at line 59 of file AttributeArrayString.h.

using openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::ValueMap = std::unordered_map<Name, Index>

Definition at line 60 of file AttributeArrayString.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::StringMetaCache ( )
default
openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::StringMetaCache ( const MetaMap metadata)
explicit

Member Function Documentation

bool openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::empty ( void  ) const
inline

Return true if no string elements in metadata.

Definition at line 66 of file AttributeArrayString.h.

void openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::insert ( const Name key,
Index  index 
)

Insert a new element in the cache.

const ValueMap& openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::map ( ) const
inline

Retrieve the value map (string -> index)

Definition at line 77 of file AttributeArrayString.h.

void openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::reset ( const MetaMap metadata)

Clears and re-populates the cache.

size_t openvdb::OPENVDB_VERSION_NAME::points::StringMetaCache::size ( void  ) const
inline

Returns the number of string elements in metadata.

Definition at line 68 of file AttributeArrayString.h.


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