OpenVDB: UnknownMetadata Class Reference

OpenVDB 3.2.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< Metadata > | Ptr
typedef boost::shared_ptr< const Metadata > | ConstPtr

## Public Member Functions
| UnknownMetadata ()
virtual | ~UnknownMetadata ()
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 &)
| 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...
bool | operator== (const Metadata &other) const
| Return `true` if the given metadata is equivalent to this metadata. More...
bool | operator!= (const Metadata &other) const
| Return `true` if the given metadata is different from this metadata. More...
void | read (std::istream &)
| Unserialize this metadata from a stream. More...
void | write (std::ostream &) const
| Serialize this metadata to a stream. More...

## Static Public Member Functions
static Metadata::Ptr | createMetadata (const Name &typeName)
| Create new metadata of the given type. 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 metadata from a stream. More...
virtual void | writeValue (std::ostream &) const
| Write the metadata to a stream. More...
void | writeSize (std::ostream &) const
| Write the size of the metadata to a stream. More...

## Static Protected Member Functions
static Index32 | readSize (std::istream &)
| Read the size of the metadata from a stream. More...

## Detailed Description

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

## Member Typedef Documentation

## § ConstPtr

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

## § Ptr

typedef boost::shared_ptr<Metadata> Ptr
| inherited

## Constructor & Destructor Documentation

## § UnknownMetadata()

UnknownMetadata | ( |  | ) |
| inline

## § ~UnknownMetadata()

virtual ~UnknownMetadata | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## § asBool()

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.

## § clearRegistry()

static void clearRegistry | ( |  | ) |
| staticinherited

Clear out the metadata registry.

## § copy() [1/2]

virtual Metadata::Ptr copy | ( |  | ) | const
| inlinevirtual

Return a copy of the metadata.

Implements Metadata.

## § copy() [2/2]

virtual void copy | ( | const Metadata & | other | ) |
| inlinevirtual

Copy the given metadata into this metadata.

Implements Metadata.

## § createMetadata()

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

Create new metadata of the given type.

## § isRegisteredType()

static bool isRegisteredType | ( | const Name & | typeName | ) |
| staticinherited

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

## § operator!=()

bool operator!= | ( | const Metadata & | other | ) | const
| inlineinherited

Return `true` if the given metadata is different from this metadata.

## § operator==()

bool operator== | ( | const Metadata & | other | ) | const
| inherited

Return `true` if the given metadata is equivalent to this metadata.

## § read()

void read | ( | std::istream & | is | ) |
| inlineinherited

Unserialize this metadata from a stream.

## § readSize()

Index32 readSize | ( | std::istream & | is | ) |
| inlinestaticprotectedinherited

Read the size of the metadata from a stream.

## § readValue()

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

Read the metadata from a stream.

Implements Metadata.

## § registerType()

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

Register the given metadata type along with a factory function.

## § size()

virtual Index32 size | ( |  | ) | const
| inlinevirtual

Return the size of this metadata in bytes.

Implements Metadata.

## § str()

virtual std::string str | ( |  | ) | const
| inlinevirtual

Return a textual representation of this metadata.

Implements Metadata.

## § typeName()

virtual Name typeName | ( |  | ) | const
| inlinevirtual

Return the type name of the metadata.

Implements Metadata.

## § unregisterType()

static void unregisterType | ( | const Name & | typeName | ) |
| staticinherited

## § write()

void write | ( | std::ostream & | os | ) | const
| inlineinherited

Serialize this metadata to a stream.

## § writeSize()

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

Write the size of the metadata to a stream.

## § writeValue()

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

Write the metadata to a stream.

Implements Metadata.

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

- metadata/Metadata.h