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

Member Typedef Documentation

Definition at line 175 of file Metadata.h.

Definition at line 174 of file Metadata.h.

Constructor & Destructor Documentation

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

Definition at line 259 of file Metadata.h.

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

Definition at line 265 of file Metadata.h.

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

Definition at line 271 of file Metadata.h.

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

Definition at line 279 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 356 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 313 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 322 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 363 of file Metadata.h.

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

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

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

Definition at line 371 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 292 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 187 of file Metadata.h.

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

Definition at line 197 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 347 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 394 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 285 of file Metadata.h.

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

Definition at line 379 of file Metadata.h.

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

Return this metadata's value.

Definition at line 299 of file Metadata.h.

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

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


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