HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T > Class Template Reference

Templated metadata class to hold specific types. More...

#include <Metadata.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >:

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)
 
 ~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...
 

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 ()
 

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...
 

Additional Inherited Members

Detailed Description

template<typename T>
class openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >

Templated metadata class to hold specific types.

Definition at line 121 of file Metadata.h.

Member Typedef Documentation

Definition at line 125 of file Metadata.h.

Definition at line 124 of file Metadata.h.

Constructor & Destructor Documentation

template<typename T >
openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::TypedMetadata ( )
inline

Definition at line 209 of file Metadata.h.

template<typename T >
openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::TypedMetadata ( const T &  value)
inline

Definition at line 215 of file Metadata.h.

template<typename T >
openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::TypedMetadata ( const TypedMetadata< T > &  other)
inline

Definition at line 221 of file Metadata.h.

template<typename T >
openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::~TypedMetadata ( )
inlineoverride

Definition at line 229 of file Metadata.h.

Member Function Documentation

template<typename T >
bool openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::asBool ( ) const
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.

template<typename T >
Metadata::Ptr openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::copy ( ) const
inlineoverridevirtual

Return a copy of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 263 of file Metadata.h.

template<typename T >
void openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::copy ( const Metadata other)
inlineoverridevirtual

Copy the given metadata into this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 272 of file Metadata.h.

template<typename T >
Metadata::Ptr openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::createMetadata ( )
inlinestatic

Create new metadata of this type.

Definition at line 313 of file Metadata.h.

template<typename T >
bool openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::isRegisteredType ( )
inlinestatic

Definition at line 336 of file Metadata.h.

void openvdb::OPENVDB_VERSION_NAME::StringMetadata::readValue ( std::istream &  ,
Index32  numBytes 
)
inlineoverrideprotectedvirtual

Read the metadata from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 282 of file Metadata.h.

template<typename T >
void openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::registerType ( )
inlinestatic

Definition at line 321 of file Metadata.h.

template<typename T >
void openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::setValue ( const T &  val)
inline

Set this metadata's value.

Definition at line 242 of file Metadata.h.

Index32 openvdb::OPENVDB_VERSION_NAME::StringMetadata::size ( ) const
inlineoverridevirtual

Return the size of this metadata in bytes.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 137 of file Metadata.h.

template<typename T>
static Name openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::staticTypeName ( )
inlinestatic

Definition at line 147 of file Metadata.h.

std::string openvdb::OPENVDB_VERSION_NAME::StringMetadata::str ( ) const
inlineoverridevirtual

Return a textual representation of this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 297 of file Metadata.h.

template<>
std::string openvdb::OPENVDB_VERSION_NAME::TypedMetadata< bool >::str ( ) const
inlinevirtual

Return a textual representation of this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 344 of file Metadata.h.

template<typename T >
Name openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::typeName ( ) const
inlineoverridevirtual

Return the type name of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 235 of file Metadata.h.

template<typename T >
void openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::unregisterType ( )
inlinestatic

Definition at line 329 of file Metadata.h.

template<typename T >
T & openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::value ( )
inline

Return this metadata's value.

Definition at line 249 of file Metadata.h.

template<typename T >
const T & openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::value ( ) const
inline

Definition at line 256 of file Metadata.h.

void openvdb::OPENVDB_VERSION_NAME::StringMetadata::writeValue ( std::ostream &  ) const
inlineoverrideprotectedvirtual

Write the metadata to a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 290 of file Metadata.h.


The documentation for this class was generated from the following file: