|
OpenVDB
4.0.2
|
Templated metadata class to hold specific types. More...
#include <Metadata.h>
Inherits Metadata.
Public Types | |
| using | Ptr = SharedPtr< TypedMetadata< T > > |
| using | ConstPtr = SharedPtr< const TypedMetadata< T > > |
Public Member Functions | |
| TypedMetadata () | |
| TypedMetadata (const T &value) | |
| TypedMetadata (const TypedMetadata< T > &other) | |
| virtual | ~TypedMetadata () |
| virtual Name | typeName () const |
| Return the type name of the metadata. More... | |
| virtual Metadata::Ptr | copy () const |
| Return a copy of the metadata. More... | |
| virtual void | copy (const Metadata &other) |
| Copy the given metadata into this metadata. More... | |
| virtual std::string | str () const |
| Return a textual representation of this metadata. More... | |
| virtual bool | asBool () const |
| virtual Index32 | size () const |
| 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... | |
| 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 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 | |
| virtual void | readValue (std::istream &, Index32 numBytes) |
| Read the metadata from a stream. More... | |
| virtual void | writeValue (std::ostream &) const |
| Write the metadata to a stream. More... | |
| void | writeSize (std::ostream &) const |
| Write the size of the metadata to a stream. More... | |
Static Protected Member Functions | |
| static Index32 | readSize (std::istream &) |
| Read the size of the metadata from a stream. More... | |
Templated metadata class to hold specific types.
| using ConstPtr = SharedPtr<const TypedMetadata<T> > |
| using Ptr = SharedPtr<TypedMetadata<T> > |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Return the boolean representation of this metadata (empty strings and zeroVals evaluate to false; most other values evaluate to true).
Implements Metadata.
|
staticinherited |
Clear out the metadata registry.
|
inlinevirtual |
Return a copy of the metadata.
Implements Metadata.
|
inlinevirtual |
Copy the given metadata into this metadata.
Implements Metadata.
|
staticinherited |
Create new metadata of the given type.
|
inlinestatic |
Create new metadata of this type.
|
staticinherited |
Return true if the given type is known by the metadata type registry.
|
inlinestatic |
|
inlineinherited |
Return true if the given metadata is different from this metadata.
|
inherited |
Return true if the given metadata is equivalent to this metadata.
|
inlineinherited |
Unserialize this metadata from a stream.
|
inlinestaticprotectedinherited |
Read the size of the metadata from a stream.
|
inlineprotectedvirtual |
Read the metadata from a stream.
Implements Metadata.
|
staticinherited |
Register the given metadata type along with a factory function.
|
inlinestatic |
|
inline |
Set this metadata's value.
|
inlinevirtual |
Return the size of this metadata in bytes.
Implements Metadata.
|
inlinestatic |
|
inlinevirtual |
Return a textual representation of this metadata.
Implements Metadata.
|
inlinevirtual |
Return a textual representation of this metadata.
Implements Metadata.
|
staticinherited |
|
inlinestatic |
|
inline |
Return this metadata's value.
|
inline |
|
inlineinherited |
Serialize this metadata to a stream.
|
inlineprotectedinherited |
Write the size of the metadata to a stream.
|
inlineprotectedvirtual |
Write the metadata to a stream.
Implements Metadata.
1.8.13