Container that maps names (strings) to values of arbitrary types.
More...
#include <MetaMap.h>
Inherited by GridBase, and MultiResGrid< TreeType >.
Container that maps names (strings) to values of arbitrary types.
◆ ConstMetaIterator
◆ ConstPtr
◆ MetadataMap
◆ MetaIterator
◆ Ptr
◆ MetaMap() [1/2]
◆ MetaMap() [2/2]
◆ ~MetaMap()
◆ beginMeta() [1/2]
◆ beginMeta() [2/2]
◆ clearMetadata()
◆ copyMeta()
Return a copy of this map whose fields are shared with this map.
◆ deepCopyMeta()
Return a deep copy of this map that shares no data with this map.
◆ endMeta() [1/2]
◆ endMeta() [2/2]
◆ getMetadata() [1/2]
T::Ptr getMetadata |
( |
const Name & |
name | ) |
|
|
inline |
Return a pointer to a TypedMetadata object of type T
and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.
◆ getMetadata() [2/2]
T::ConstPtr getMetadata |
( |
const Name & |
name | ) |
const |
|
inline |
Return a pointer to a TypedMetadata object of type T
and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.
◆ insertMeta() [1/2]
Insert a new metadata field or overwrite the value of an existing field.
If a field with the given name doesn't already exist, add a new field. Otherwise, if the new value's type is the same as the existing field's value type, overwrite the existing value with new value.
- Exceptions
-
TypeError | if a field with the given name already exists, but its value type is not the same as the new value's |
ValueError | if the given field name is empty. |
◆ insertMeta() [2/2]
void insertMeta |
( |
const MetaMap & |
| ) |
|
Deep copy all of the metadata fields from the given map into this map.
- Exceptions
-
TypeError | if any field in the given map has the same name as but a different value type than one of this map's fields. |
◆ metaCount()
size_t metaCount |
( |
| ) |
const |
|
inline |
◆ metaValue() [1/2]
T & metaValue |
( |
const Name & |
name | ) |
|
|
inline |
Return a reference to the value of type T
stored in the given metadata field.
- Exceptions
-
◆ metaValue() [2/2]
const T & metaValue |
( |
const Name & |
name | ) |
const |
|
inline |
◆ operator!=()
bool operator!= |
( |
const MetaMap & |
other | ) |
const |
|
inline |
Return true
if the given map is different from this map.
◆ operator=()
Assign a deep copy of another map to this map.
◆ operator==()
bool operator== |
( |
const MetaMap & |
other | ) |
const |
Return true
if the given map is equivalent to this map.
◆ operator[]() [1/2]
Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
◆ operator[]() [2/2]
Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
◆ readMeta()
void readMeta |
( |
std::istream & |
| ) |
|
Unserialize metadata from the given stream.
◆ removeMeta()
void removeMeta |
( |
const Name & |
| ) |
|
Remove the given metadata field if it exists.
◆ str()
std::string str |
( |
const std::string & |
indent = "" | ) |
const |
Return a string describing this metadata map. Prefix each line with indent.
◆ writeMeta()
void writeMeta |
( |
std::ostream & |
| ) |
const |
Serialize metadata to the given stream.
The documentation for this class was generated from the following file: