HDK
|
Templated metadata class to hold specific types. More...
#include <Metadata.h>
Public Types | |
using | Ptr = SharedPtr< TypedMetadata< T >> |
using | ConstPtr = SharedPtr< const TypedMetadata< T >> |
Public Types inherited from openvdb::OPENVDB_VERSION_NAME::Metadata | |
using | Ptr = SharedPtr< Metadata > |
using | ConstPtr = SharedPtr< const Metadata > |
Public Member Functions | |
TypedMetadata () | |
TypedMetadata (const T &value) | |
TypedMetadata (const TypedMetadata< T > &other) | |
~TypedMetadata () override | |
Name | typeName () const override |
Return the type name of the metadata. More... | |
Metadata::Ptr | copy () const override |
Return a copy of the metadata. More... | |
void | copy (const Metadata &other) override |
Copy the given metadata into this metadata. More... | |
std::string | str () const override |
Return a textual representation of this metadata. More... | |
bool | asBool () const override |
Index32 | size () const override |
Return the size of this metadata in bytes. More... | |
void | setValue (const T &) |
Set this metadata's value. More... | |
T & | value () |
Return this metadata's value. More... | |
const T & | value () const |
template<> | |
std::string | str () const |
Return a textual representation of this metadata. More... | |
Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::Metadata | |
Metadata () | |
virtual | ~Metadata () |
Metadata (const Metadata &)=delete | |
Metadata & | operator= (const Metadata &)=delete |
bool | operator== (const Metadata &other) const |
Return true if the given metadata is equivalent to this metadata. More... | |
bool | operator!= (const Metadata &other) const |
Return true if the given metadata is different from this metadata. More... | |
void | read (std::istream &) |
Unserialize this metadata from a stream. More... | |
void | write (std::ostream &) const |
Serialize this metadata to a stream. More... | |
Static Public Member Functions | |
static Name | staticTypeName () |
static Metadata::Ptr | createMetadata () |
Create new metadata of this type. More... | |
static void | registerType () |
static void | unregisterType () |
static bool | isRegisteredType () |
Static Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::Metadata | |
static Metadata::Ptr | createMetadata (const Name &typeName) |
Create new metadata of the given type. More... | |
static bool | isRegisteredType (const Name &typeName) |
Return true if the given type is known by the metadata type registry. More... | |
static void | clearRegistry () |
Clear out the metadata registry. More... | |
static void | registerType (const Name &typeName, Metadata::Ptr(*createMetadata)()) |
Register the given metadata type along with a factory function. More... | |
static void | unregisterType (const Name &typeName) |
Protected Member Functions | |
void | readValue (std::istream &, Index32 numBytes) override |
Read the metadata from a stream. More... | |
void | writeValue (std::ostream &) const override |
Write the metadata to a stream. More... | |
Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::Metadata | |
void | writeSize (std::ostream &) const |
Write the size of the metadata to a stream. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::Metadata | |
static Index32 | readSize (std::istream &) |
Read the size of the metadata from a stream. More... | |
Templated metadata class to hold specific types.
Definition at line 121 of file Metadata.h.
using openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::ConstPtr = SharedPtr<const TypedMetadata<T>> |
Definition at line 125 of file Metadata.h.
using openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::Ptr = SharedPtr<TypedMetadata<T>> |
Definition at line 124 of file Metadata.h.
|
inline |
Definition at line 209 of file Metadata.h.
|
inline |
Definition at line 215 of file Metadata.h.
|
inline |
Definition at line 221 of file Metadata.h.
|
inlineoverride |
Definition at line 229 of file Metadata.h.
|
inlineoverridevirtual |
Return the boolean representation of this metadata (empty strings and zeroVals evaluate to false; most other values evaluate to true).
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 306 of file Metadata.h.
|
inlineoverridevirtual |
Return a copy of the metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 263 of file Metadata.h.
|
inlineoverridevirtual |
Copy the given metadata into this metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 272 of file Metadata.h.
|
inlinestatic |
Create new metadata of this type.
Definition at line 313 of file Metadata.h.
|
inlinestatic |
Definition at line 336 of file Metadata.h.
|
inlineoverrideprotectedvirtual |
Read the metadata from a stream.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 282 of file Metadata.h.
|
inlinestatic |
Definition at line 321 of file Metadata.h.
|
inline |
Set this metadata's value.
Definition at line 242 of file Metadata.h.
|
inlineoverridevirtual |
Return the size of this metadata in bytes.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 137 of file Metadata.h.
|
inlinestatic |
Definition at line 147 of file Metadata.h.
|
inlineoverridevirtual |
Return a textual representation of this metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 297 of file Metadata.h.
|
inlinevirtual |
Return a textual representation of this metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 344 of file Metadata.h.
|
inlineoverridevirtual |
Return the type name of the metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 235 of file Metadata.h.
|
inlinestatic |
Definition at line 329 of file Metadata.h.
|
inline |
Return this metadata's value.
Definition at line 249 of file Metadata.h.
|
inline |
Definition at line 256 of file Metadata.h.
|
inlineoverrideprotectedvirtual |
Write the metadata to a stream.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 290 of file Metadata.h.