|
Alembic 1.8.11
|
#include <MetaData.h>
Public Types | |
| typedef Alembic::Util::TokenMap | token_map_type |
| typedef token_map_type::key_type | key_type |
| typedef token_map_type::data_type | data_type |
| typedef token_map_type::value_type | value_type |
| typedef token_map_type::const_reference | const_reference |
| typedef token_map_type::const_iterator | const_iterator |
| typedef token_map_type::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
| MetaData () | |
| MetaData (const MetaData &iCopy) | |
| MetaData & | operator= (const MetaData &iCopy) |
| void | deserialize (const std::string &iFrom) |
| std::string | serialize () const |
| size_t | size () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | rend () const |
| void | set (const std::string &iKey, const std::string &iData) |
| void | setUnique (const std::string &iKey, const std::string &iData) |
| std::string | get (const std::string &iKey) const |
| std::string | getRequired (const std::string &iKey) const |
| void | append (const MetaData &iMetaData) |
| void | appendOnlyUnique (const MetaData &iMetaData) |
| void | appendUnique (const MetaData &iMetaData) |
| bool | matches (const MetaData &iMetaData) const |
| bool | matchesOverlap (const MetaData &iMetaData) const |
| bool | matchesExactly (const MetaData &iMetaData) const |
The MetaData class lies at the core of Alembic's notion of "Object and Property Identity". It is a refinement of the idea of Protocol (for Objects) and Interpretation (for Properties) in OpenGTO. It is, essentially, an UNORDERED, UNIQUE DICTIONARY of strings. It turns itself into a regular string for serialization and deserialization. This is not a virtual class, nor is it intended to be used as a base for derivation. It is explicitly declared and implemented as part of the AbcCoreAbstract library. It is composed (not inherited) from Alembic::Util::TokenMap. In order to not have duplicated (and possibly conflicting) policy implementation, we present this class here as a MOSTLY-WRITE-ONCE interface, with selective exception throwing behavior for failed writes.
| typedef token_map_type::const_iterator Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData::const_iterator |
const_iterator typedef this dereferences to a const value_type reference.
| typedef token_map_type::const_reference Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData::const_reference |
Const reference type This is what the iterators dereference to.
| typedef token_map_type::const_reverse_iterator Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData::const_reverse_iterator |
const_reverse_iterator typedef this dereferences to a const value_type instance.
Data type. Data is associated with a key, with each key being unique.
Key type. Keys are unique within each MetaData instance.
| typedef Alembic::Util::TokenMap Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData::token_map_type |
Our internals are handled by a TokenMap, which we expose through these typedefs.
| typedef token_map_type::value_type Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData::value_type |
Value-type This is what the MetaData class "contains", when viewed as a standard container.
|
inline |
Default constructor creates an empty dictionary. ...
|
inline |
Copy constructor copies another MetaData. ...
|
inline |
append appends the given MetaData to this class. Duplicates are overwritten.
|
inline |
append appends the given MetaData to this class. Duplicate keys are ignored, and the original value remains untouched
|
inline |
append appends the given MetaData to this class. Duplicate values will cause an exception to be thrown.
|
inline |
Returns a const_iterator corresponding to the beginning of the MetaData or the end of the MetaData if empty.
|
inline |
Deserialization will replace the contents of this class with the parsed contents of a string. It will just clear the contents first. It will throw an exception if the string is mal-formed.
|
inline |
Returns a const_iterator corresponding to the end of the MetaData.
|
inline |
get returns the value, or an empty string if it is not set. ...
|
inline |
getRequired returns the value, and throws an exception if it is not found.
|
inline |
The matches function returns true if each of the fields in the passed iMetaData are found in this instance and have the same values. it returns false otherwise. This is not the same as "equals", because this MetaData may contain fields that are not included in the passed iMetaData. This should be the default "matching" function.
|
inline |
the matchesExactly function returns true if we're exactly equal in every field. This is a rarely useful concept with MetaData. It is for this reason that we explicitly do not overload the == operator.
|
inline |
The matchesExisting function returns true if, for each of the fields in the passed iMetaData, we have either no entry, or the same entry.
|
inline |
Assignment operator copies the contents of another MetaData instance.
|
inline |
Returns a const_reverse_iterator corresponding to the beginning of the MetaData or the end of the MetaData if empty.
|
inline |
Returns an const_reverse_iterator corresponding to the end of the MetaData.
|
inline |
Serialization will convert the contents of this MetaData into a single string.
|
inline |
set lets you set a key/data pair. This will silently overwrite an existing value.
|
inline |
setUnique lets you set a key/data pair, but throws an exception if you attempt to change the value of an existing field. It is fine if you set the same value.