4 #ifndef OPENVDB_METADATA_METAMAP_HAS_BEEN_INCLUDED 5 #define OPENVDB_METADATA_METAMAP_HAS_BEEN_INCLUDED 43 void readMeta(std::istream&);
45 void writeMeta(std::ostream&)
const;
58 void insertMeta(
const MetaMap&);
61 void removeMeta(
const Name&);
73 template<
typename T>
typename T::Ptr getMetadata(
const Name&);
74 template<
typename T>
typename T::ConstPtr getMetadata(
const Name&)
const;
80 template<
typename T> T& metaValue(
const Name&);
81 template<
typename T>
const T& metaValue(
const Name&)
const;
94 std::string str(
const std::string& indent =
"")
const;
122 return (iter == mMeta.end() ?
Metadata::Ptr() : iter->second);
129 return (iter == mMeta.end() ?
Metadata::Ptr() : iter->second);
137 inline typename T::Ptr
141 if (iter == mMeta.end())
return typename T::Ptr{};
147 if (iter->second->typeName() == T::staticTypeName()) {
148 return StaticPtrCast<T, Metadata>(iter->second);
150 return typename T::Ptr{};
154 inline typename T::ConstPtr
158 if (iter == mMeta.end())
return typename T::ConstPtr{};
164 if (iter->second->typeName() == T::staticTypeName()) {
165 return StaticPtrCast<const T, const Metadata>(iter->second);
167 return typename T::ConstPtr{};
176 MetaMap::getValidTypedMetadata(
const Name &name)
const 187 m = StaticPtrCast<TypedMetadata<T>,
Metadata>(iter->second);
217 #endif // OPENVDB_METADATA_METAMAP_HAS_BEEN_INCLUDED
#define OPENVDB_THROW(exception, message)
Definition: Exceptions.h:74
std::shared_ptr< T > SharedPtr
Definition: Types.h:114
Definition: Exceptions.h:13
Definition: Exceptions.h:64
std::string Name
Definition: Name.h:19
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
std::ostream & operator<<(std::ostream &, const MetaMap &)
Write a MetaMap to an output stream.
bool operator==(const Vec3< T0 > &v0, const Vec3< T1 > &v1)
Equality operator, does exact floating point comparisons.
Definition: Vec3.h:473
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:212
Definition: Exceptions.h:60