OpenVDB
1.1.0
|
Provides functionality storing type agnostic metadata information. Grids and other structures can inherit from this to attain metadata functionality. More...
#include <MetaMap.h>
Inherited by GridBase.
Public Types | |
typedef boost::shared_ptr < MetaMap > | Ptr |
typedef boost::shared_ptr < const MetaMap > | ConstPtr |
typedef std::map< Name, Metadata::Ptr > | MetadataMap |
typedef MetadataMap::iterator | MetaIterator |
typedef MetadataMap::const_iterator | ConstMetaIterator |
Public Member Functions | |
MetaMap () | |
Constructor. | |
MetaMap (const MetaMap &other) | |
virtual | ~MetaMap () |
Destructor. | |
MetaMap::Ptr | copyMeta () const |
Return a copy of this map whose fields are shared with this map. | |
MetaMap::Ptr | deepCopyMeta () const |
Return a deep copy of this map that shares no data with this map. | |
MetaMap & | operator= (const MetaMap &) |
Assign to this map a deep copy of another map. | |
void | readMeta (std::istream &) |
Read in all the Meta information the given stream. | |
void | writeMeta (std::ostream &) const |
Write out all the Meta information to the given stream. | |
void | insertMeta (const Name &name, const Metadata &metadata) |
void | removeMeta (const Name &name) |
template<typename T > | |
T & | metaValue (const Name &name) |
template<typename T > | |
const T & | metaValue (const Name &name) const |
MetaIterator | beginMeta () |
Functions for iterating over the Metadata. | |
MetaIterator | endMeta () |
ConstMetaIterator | beginMeta () const |
ConstMetaIterator | endMeta () const |
void | clearMetadata () |
size_t | metaCount () const |
bool | empty () const |
std::string | str () const |
Metadata::Ptr | operator[] (const Name &) |
Metadata::ConstPtr | operator[] (const Name &) const |
template<typename T > | |
T::Ptr | getMetadata (const Name &name) |
template<typename T > | |
T::ConstPtr | getMetadata (const Name &name) const |
Provides functionality storing type agnostic metadata information. Grids and other structures can inherit from this to attain metadata functionality.
typedef MetadataMap::const_iterator ConstMetaIterator |
typedef std::map<Name, Metadata::Ptr> MetadataMap |
typedef MetadataMap::iterator MetaIterator |
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
Functions for iterating over the Metadata.
|
inline |
|
inline |
MetaMap::Ptr copyMeta | ( | ) | const |
Return a copy of this map whose fields are shared with this map.
MetaMap::Ptr deepCopyMeta | ( | ) | const |
Return a deep copy of this map that shares no data with this map.
|
inline |
Reimplemented in Grid< _TreeType >, Grid< DualTreeT >, and GridBase.
|
inline |
|
inline |
|
inline |
|
inline |
Insert a new metadata or overwrite existing. If Metadata with given name doesn't exist, a new Metadata field is added. If it does exist and given metadata is of the same type, then overwrite existing with new value. If it does exist and not of the same type, then throw an exception.
name | the name of the metadata. |
metadata | the actual metadata to store. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void readMeta | ( | std::istream & | ) |
Read in all the Meta information the given stream.
void removeMeta | ( | const Name & | name | ) |
Removes an existing metadata field from the grid. If the metadata with the given name doesn't exist, do nothing.
name | the name of the metadata field to remove. |
std::string str | ( | ) | const |
void writeMeta | ( | std::ostream & | ) | const |
Write out all the Meta information to the given stream.