OpenVDB
1.2.0
|
Templated metadata class to hold specific types. More...
#include <Metadata.h>
Inherits Metadata.
Public Types | |
typedef boost::shared_ptr < TypedMetadata< T > > | Ptr |
typedef boost::shared_ptr < const TypedMetadata< T > > | ConstPtr |
Public Member Functions | |
TypedMetadata () | |
TypedMetadata (const T &value) | |
TypedMetadata (const TypedMetadata< T > &other) | |
virtual | ~TypedMetadata () |
virtual Name | typeName () const |
virtual Metadata::Ptr | copy () const |
virtual void | copy (const Metadata &other) |
Copy value from the given metadata into the curent metadata. More... | |
virtual std::string | str () const |
virtual bool | asBool () const |
virtual Index32 | size () const |
void | setValue (const T &) |
Set this metadata's value. More... | |
T & | value () |
const T & | value () const |
template<> | |
std::string | str () const |
void | read (std::istream &) |
Read the attribute from a stream. More... | |
void | write (std::ostream &) const |
Write the attribute to a stream. More... | |
Static Public Member Functions | |
static Name | staticTypeName () |
static Metadata::Ptr | createMetadata () |
Creates a new metadata of this type. More... | |
static void | registerType () |
static void | unregisterType () |
static bool | isRegisteredType () |
static Metadata::Ptr | createMetadata (const Name &typeName) |
Creates a new Metadata from the metadata type registry. More... | |
static bool | isRegisteredType (const Name &typeName) |
static void | clearRegistry () |
Clears out the metadata registry. More... | |
Protected Member Functions | |
virtual void | readValue (std::istream &, Index32 numBytes) |
Read the attribute from a stream. More... | |
virtual void | writeValue (std::ostream &) const |
Write the attribute to a stream. More... | |
void | writeSize (std::ostream &) const |
Write the size of the attribute to a stream. More... | |
Static Protected Member Functions | |
static Index32 | readSize (std::istream &) |
Read the size of the attribute from a stream. 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) |
Templated metadata class to hold specific types.
typedef boost::shared_ptr<const TypedMetadata<T> > ConstPtr |
typedef boost::shared_ptr<TypedMetadata<T> > Ptr |
|
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 |
Clears out the metadata registry.
|
inlinevirtual |
Implements Metadata.
|
inlinevirtual |
Copy value from the given metadata into the curent metadata.
Implements Metadata.
|
staticinherited |
Creates a new Metadata from the metadata type registry.
|
inlinestatic |
Creates a new metadata of this type.
|
staticinherited |
|
inlinestatic |
|
inlineinherited |
Read the attribute from a stream.
|
inlinestaticprotectedinherited |
Read the size of the attribute from a stream.
|
inlineprotectedvirtual |
Read the attribute from a stream.
Implements Metadata.
|
staticprotectedinherited |
Register the given metadata type along with a factory function.
|
inlinestatic |
Register the given metadata type and a function that knows how to create the metadata type. This way the registry will know how to create certain metadata types.
|
inline |
Set this metadata's value.
|
inlinevirtual |
Implements Metadata.
|
inlinestatic |
Static specialized function for the type name. This function must be template specialized for each type T.
|
inlinevirtual |
Implements Metadata.
|
inlinevirtual |
|
staticprotectedinherited |
|
inlinestatic |
|
inline |
|
inline |
|
inlineinherited |
Write the attribute to a stream.
|
inlineprotectedinherited |
Write the size of the attribute to a stream.
|
inlineprotectedvirtual |
Write the attribute to a stream.
Implements Metadata.