HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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)
 
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...
 

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

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

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 138 of file Metadata.h.

Member Typedef Documentation

Definition at line 142 of file Metadata.h.

Definition at line 141 of file Metadata.h.

Constructor & Destructor Documentation

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

Definition at line 226 of file Metadata.h.

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

Definition at line 232 of file Metadata.h.

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

Definition at line 238 of file Metadata.h.

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

Definition at line 246 of file Metadata.h.

Member Function Documentation

template<typename T >
bool openvdb::OPENVDB_VERSION_NAME::TypedMetadata< T >::asBool ( ) const
inlinevirtual

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 323 of file Metadata.h.

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

Return a copy of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 280 of file Metadata.h.

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

Copy the given metadata into this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 289 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 330 of file Metadata.h.

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

Definition at line 353 of file Metadata.h.

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

Read the metadata from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 299 of file Metadata.h.

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

Definition at line 338 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 259 of file Metadata.h.

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

Return the size of this metadata in bytes.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 154 of file Metadata.h.

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

Definition at line 164 of file Metadata.h.

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

Return a textual representation of this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 314 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 361 of file Metadata.h.

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

Return the type name of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 252 of file Metadata.h.

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

Definition at line 346 of file Metadata.h.

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

Return this metadata's value.

Definition at line 266 of file Metadata.h.

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

Definition at line 273 of file Metadata.h.

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

Write the metadata to a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Definition at line 307 of file Metadata.h.


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