OpenVDB  3.0.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
UnknownMetadata Class Reference

Subclass to read (and ignore) data of an unregistered type. More...

#include <Metadata.h>

Inherits Metadata.

Public Types

typedef boost::shared_ptr< MetadataPtr
 
typedef boost::shared_ptr< const MetadataConstPtr
 

Public Member Functions

 UnknownMetadata ()
 
virtual ~UnknownMetadata ()
 
virtual Name typeName () const
 
virtual Metadata::Ptr copy () const
 
virtual void copy (const Metadata &)
 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 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 Metadata::Ptr createMetadata (const Name &typeName)
 Creates a new Metadata from the metadata type registry. 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 &s, 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...
 

Detailed Description

Subclass to read (and ignore) data of an unregistered type.

Member Typedef Documentation

typedef boost::shared_ptr<const Metadata> ConstPtr
inherited
typedef boost::shared_ptr<Metadata> Ptr
inherited

Constructor & Destructor Documentation

UnknownMetadata ( )
inline
virtual ~UnknownMetadata ( )
inlinevirtual

Member Function Documentation

virtual bool asBool ( ) const
inlinevirtual

Return the boolean representation of this metadata (empty strings and zeroVals evaluate to false; most other values evaluate to true).

Implements Metadata.

static void clearRegistry ( )
staticinherited

Clear out the metadata registry.

virtual Metadata::Ptr copy ( ) const
inlinevirtual
Returns
a copy of the metadata.

Implements Metadata.

virtual void copy ( const Metadata other)
inlinevirtual

Copy value from the given metadata into the curent metadata.

Implements Metadata.

static Metadata::Ptr createMetadata ( const Name typeName)
staticinherited

Creates a new Metadata from the metadata type registry.

static bool isRegisteredType ( const Name typeName)
staticinherited

Return true if the given type is known by the metadata type registry.

void read ( std::istream &  is)
inlineinherited

Read the attribute from a stream.

Index32 readSize ( std::istream &  is)
inlinestaticprotectedinherited

Read the size of the attribute from a stream.

virtual void readValue ( std::istream &  ,
Index32  numBytes 
)
protectedvirtual

Read the attribute from a stream.

Implements Metadata.

static void registerType ( const Name typeName,
Metadata::Ptr(*)()  createMetadata 
)
staticinherited

Register the given metadata type along with a factory function.

virtual Index32 size ( ) const
inlinevirtual
Returns
the size of the attribute in bytes.

Implements Metadata.

virtual std::string str ( ) const
inlinevirtual
Returns
string representation of Metadata

Implements Metadata.

virtual Name typeName ( ) const
inlinevirtual
Returns
the type name of the metadata.

Implements Metadata.

static void unregisterType ( const Name typeName)
staticinherited
void write ( std::ostream &  os) const
inlineinherited

Write the attribute to a stream.

void writeSize ( std::ostream &  os) const
inlineprotectedinherited

Write the size of the attribute to a stream.

virtual void writeValue ( std::ostream &  ) const
protectedvirtual

Write the attribute to a stream.

Implements Metadata.


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