OpenVDB
12.0.0
|
Store a buffer of data that can be optionally used during reading for faster delayed-load I/O performance. More...
#include <openvdb/io/DelayedLoadMetadata.h>
Inherits Metadata.
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... | |
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 Name | staticTypeName () |
static Metadata::Ptr | createMetadata () |
static void | registerType () |
static void | unregisterType () |
static bool | isRegisteredType () |
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 | |
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... | |
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... | |
Store a buffer of data that can be optionally used during reading for faster delayed-load I/O performance.
using CompressedSizeType = int64_t |
using ConstPtr = SharedPtr<const DelayedLoadMetadata> |
using MaskType = int8_t |
using Ptr = SharedPtr<DelayedLoadMetadata> |
|
default |
DelayedLoadMetadata | ( | const DelayedLoadMetadata & | other | ) |
|
overridedefault |
|
overridevirtual |
Return the boolean representation of this metadata (empty strings and zeroVals evaluate to false; most other values evaluate to true).
Implements Metadata.
void clear | ( | ) |
Delete the contents of the mask and compressed size arrays.
|
staticinherited |
Clear out the metadata registry.
|
overridevirtual |
Return a copy of the metadata.
Implements Metadata.
|
overridevirtual |
Copy the given metadata into this metadata.
Implements Metadata.
|
inlinestatic |
|
staticinherited |
Create new metadata of the given type.
bool empty | ( | ) | const |
Return true
if both arrays are empty.
CompressedSizeType getCompressedSize | ( | size_t | index | ) | const |
Return the compressed size value for a specific index.
MaskType getMask | ( | size_t | index | ) | const |
Return the mask value for a specific index.
|
inlinestatic |
|
staticinherited |
Return true
if the given type is known by the metadata type registry.
|
inlineinherited |
Return true
if the given metadata is different from this metadata.
|
inherited |
Return true
if the given metadata is equivalent to this metadata.
|
inlineinherited |
Unserialize this metadata from a stream.
|
inlinestaticprotectedinherited |
Read the size of the metadata from a stream.
|
overrideprotectedvirtual |
Read the metadata from a stream.
Implements Metadata.
|
inlinestatic |
|
staticinherited |
Register the given metadata type along with a factory function.
void resizeCompressedSize | ( | size_t | size | ) |
Resize the compressed size array.
void resizeMask | ( | size_t | size | ) |
Resize the mask array.
void setCompressedSize | ( | size_t | index, |
const CompressedSizeType & | value | ||
) |
Set the compressed size value for a specific index.
void setMask | ( | size_t | index, |
const MaskType & | value | ||
) |
Set the mask value for a specific index.
|
overridevirtual |
Return the size of this metadata in bytes.
Implements Metadata.
|
inlinestatic |
|
overridevirtual |
Return a textual representation of this metadata.
Implements Metadata.
|
inlinestatic |
|
staticinherited |
|
inlineinherited |
Serialize this metadata to a stream.
|
inlineprotectedinherited |
Write the size of the metadata to a stream.
|
overrideprotectedvirtual |
Write the metadata to a stream.
Implements Metadata.