HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata Class Reference

Store a buffer of data that can be optionally used during reading for faster delayed-load I/O performance. More...

#include <DelayedLoadMetadata.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata:

Public Types

using Ptr = SharedPtr< DelayedLoadMetadata >
 
using ConstPtr = SharedPtr< const DelayedLoadMetadata >
 
using MaskType = int8_t
 
using CompressedSizeType = int64_t
 

Public Member Functions

 DelayedLoadMetadata ()=default
 
 DelayedLoadMetadata (const DelayedLoadMetadata &other)
 
 ~DelayedLoadMetadata () override=default
 
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 &) 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 clear ()
 Delete the contents of the mask and compressed size arrays. More...
 
bool empty () const
 Return true if both arrays are empty. More...
 
void resizeMask (size_t size)
 Resize the mask array. More...
 
void resizeCompressedSize (size_t size)
 Resize the compressed size array. More...
 
MaskType getMask (size_t index) const
 Return the mask value for a specific index. More...
 
void setMask (size_t index, const MaskType &value)
 Set the mask value for a specific index. More...
 
CompressedSizeType getCompressedSize (size_t index) const
 Return the compressed size value for a specific index. More...
 
void setCompressedSize (size_t index, const CompressedSizeType &value)
 Set the compressed size value for a specific index. More...
 

Static Public Member Functions

static Name staticTypeName ()
 
static Metadata::Ptr createMetadata ()
 
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

Store a buffer of data that can be optionally used during reading for faster delayed-load I/O performance.

Definition at line 21 of file DelayedLoadMetadata.h.

Member Typedef Documentation

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::DelayedLoadMetadata ( )
default
openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::DelayedLoadMetadata ( const DelayedLoadMetadata other)
openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::~DelayedLoadMetadata ( )
overridedefault

Member Function Documentation

bool openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::asBool ( ) const
overridevirtual

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.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::clear ( )

Delete the contents of the mask and compressed size arrays.

Metadata::Ptr openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::copy ( ) const
overridevirtual

Return a copy of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::copy ( const Metadata other)
overridevirtual

Copy the given metadata into this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

static Metadata::Ptr openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::createMetadata ( )
inlinestatic

Definition at line 42 of file DelayedLoadMetadata.h.

bool openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::empty ( ) const

Return true if both arrays are empty.

CompressedSizeType openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::getCompressedSize ( size_t  index) const

Return the compressed size value for a specific index.

Note
throws if index is out-of-range or DelayedLoadMask not registered
MaskType openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::getMask ( size_t  index) const

Return the mask value for a specific index.

Note
throws if index is out-of-range or DelayedLoadMask not registered
static bool openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::isRegisteredType ( )
inlinestatic

Definition at line 59 of file DelayedLoadMetadata.h.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::readValue ( std::istream &  ,
Index32  numBytes 
)
overrideprotectedvirtual

Read the metadata from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

static void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::registerType ( )
inlinestatic

Definition at line 48 of file DelayedLoadMetadata.h.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::resizeCompressedSize ( size_t  size)

Resize the compressed size array.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::resizeMask ( size_t  size)

Resize the mask array.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::setCompressedSize ( size_t  index,
const CompressedSizeType value 
)

Set the compressed size value for a specific index.

Note
throws if index is out-of-range
void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::setMask ( size_t  index,
const MaskType value 
)

Set the mask value for a specific index.

Note
throws if index is out-of-range
Index32 openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::size ( ) const
overridevirtual

Return the size of this metadata in bytes.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

static Name openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::staticTypeName ( )
inlinestatic

Definition at line 40 of file DelayedLoadMetadata.h.

std::string openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::str ( ) const
overridevirtual

Return a textual representation of this metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

Name openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::typeName ( ) const
overridevirtual

Return the type name of the metadata.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.

static void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::unregisterType ( )
inlinestatic

Definition at line 54 of file DelayedLoadMetadata.h.

void openvdb::OPENVDB_VERSION_NAME::io::DelayedLoadMetadata::writeValue ( std::ostream &  ) const
overrideprotectedvirtual

Write the metadata to a stream.

Implements openvdb::OPENVDB_VERSION_NAME::Metadata.


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