HDK
|
Subclass to hold raw data of an unregistered type. More...
#include <Metadata.h>
Public Types | |
using | ByteVec = std::vector< uint8_t > |
![]() | |
using | Ptr = SharedPtr< Metadata > |
using | ConstPtr = SharedPtr< const Metadata > |
Public Member Functions | |
UnknownMetadata (const Name &typ="<unknown>") | |
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 &) 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 ByteVec &bytes) |
const ByteVec & | value () const |
![]() | |
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... | |
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... | |
![]() | |
void | writeSize (std::ostream &) const |
Write the size of the metadata to a stream. More... | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
static Index32 | readSize (std::istream &) |
Read the size of the metadata from a stream. More... | |
Subclass to hold raw data of an unregistered type.
Definition at line 92 of file Metadata.h.
using openvdb::OPENVDB_VERSION_NAME::UnknownMetadata::ByteVec = std::vector<uint8_t> |
Definition at line 95 of file Metadata.h.
|
inlineexplicit |
Definition at line 97 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 103 of file Metadata.h.
|
overridevirtual |
Return a copy of the metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Copy the given metadata into this metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
|
overrideprotectedvirtual |
Read the metadata from a stream.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 106 of file Metadata.h.
|
inlineoverridevirtual |
Return the size of this metadata in bytes.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 104 of file Metadata.h.
|
inlineoverridevirtual |
Return a textual representation of this metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 102 of file Metadata.h.
|
inlineoverridevirtual |
Return the type name of the metadata.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.
Definition at line 99 of file Metadata.h.
|
inline |
Definition at line 107 of file Metadata.h.
|
overrideprotectedvirtual |
Write the metadata to a stream.
Implements openvdb::OPENVDB_VERSION_NAME::Metadata.