Ptex
|
#include <PtexReader.h>
Classes | |
struct | Entry |
class | LargeMetaData |
Public Member Functions | |
MetaData (PtexReader *reader) | |
~MetaData () | |
virtual void | release () |
Release resources held by this pointer (pointer becomes invalid). More... | |
virtual int | numKeys () |
Query number of meta data entries stored in file. More... | |
virtual void | getKey (int index, const char *&key, MetaDataType &type) |
virtual bool | findKey (const char *key, int &index, MetaDataType &type) |
virtual void | getValue (const char *key, const char *&value) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const char *&value) |
Query the value of a given meta data entry by index. More... | |
template<typename T > | |
void | getValue (int index, MetaDataType requestedType, const T *&value, int &count) |
template<typename T > | |
void | getValue (const char *key, MetaDataType requestedType, const T *&value, int &count) |
virtual void | getValue (const char *key, const int8_t *&value, int &count) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const int8_t *&value, int &count) |
Query the value of a given meta data entry by index. More... | |
virtual void | getValue (const char *key, const int16_t *&value, int &count) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const int16_t *&value, int &count) |
Query the value of a given meta data entry by index. More... | |
virtual void | getValue (const char *key, const int32_t *&value, int &count) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const int32_t *&value, int &count) |
Query the value of a given meta data entry by index. More... | |
virtual void | getValue (const char *key, const float *&value, int &count) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const float *&value, int &count) |
Query the value of a given meta data entry by index. More... | |
virtual void | getValue (const char *key, const double *&value, int &count) |
Query the value of a given meta data entry. More... | |
virtual void | getValue (int index, const double *&value, int &count) |
Query the value of a given meta data entry by index. More... | |
void | addEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, const void *data, size_t &metaDataMemUsed) |
void | addLmdEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, FilePos filepos, uint32_t zipsize, size_t &metaDataMemUsed) |
size_t | selfDataSize () |
Public Member Functions inherited from PtexMetaData | |
virtual void | getKey (int index, const char *&key, Ptex::MetaDataType &type)=0 |
Query the name and type of a meta data entry. More... | |
virtual bool | findKey (const char *key, int &index, Ptex::MetaDataType &type)=0 |
Query the index and type of a meta data entry by name. More... | |
Protected Types | |
typedef std::map< std::string, Entry > | MetaMap |
Protected Member Functions | |
Entry * | newEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, size_t &metaDataMemUsed) |
Entry * | getEntry (int index) |
Protected Member Functions inherited from PtexMetaData | |
virtual | ~PtexMetaData () |
Destructor not for public use. Use release() instead. More... | |
Protected Attributes | |
PtexReader * | _reader |
MetaMap | _map |
std::vector< Entry * > | _entries |
Definition at line 120 of file PtexReader.h.
|
protected |
Definition at line 339 of file PtexReader.h.
|
inline |
Definition at line 122 of file PtexReader.h.
|
inline |
Definition at line 124 of file PtexReader.h.
|
inline |
Definition at line 246 of file PtexReader.h.
References PtexReader::MetaData::Entry::data, PtexReader::datatype(), and newEntry().
Referenced by PtexReader::readMetaDataBlock().
|
inline |
Definition at line 255 of file PtexReader.h.
References PtexReader::datatype(), PtexReader::MetaData::Entry::isLmd, PtexReader::MetaData::Entry::lmdData, PtexReader::MetaData::Entry::lmdPos, PtexReader::MetaData::Entry::lmdZipSize, and newEntry().
Referenced by PtexReader::readLargeMetaDataHeaders().
|
inlinevirtual |
|
protected |
Definition at line 343 of file PtexReader.cpp.
References _entries, _reader, PtexReader::MetaData::LargeMetaData::data(), PtexReader::MetaData::Entry::data, PtexReader::MetaData::Entry::datasize, PtexReader::increaseMemUsed(), PtexReader::MetaData::Entry::isLmd, PtexReader::MetaData::Entry::lmdData, PtexReader::MetaData::Entry::lmdPos, PtexReader::MetaData::Entry::lmdZipSize, PtexReader::readlock, PtexReader::readZipBlock(), and PtexReader::seek().
Referenced by getValue().
|
inlinevirtual |
Definition at line 128 of file PtexReader.h.
References _entries, PtexReader::MetaData::Entry::key, and PtexReader::MetaData::Entry::type.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 150 of file PtexReader.h.
References PtexReader::MetaData::Entry::data, findKey(), getEntry(), Ptex::mdt_string, and PtexReader::MetaData::Entry::type.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 236 of file PtexReader.h.
References Ptex::mdt_double.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 226 of file PtexReader.h.
References Ptex::mdt_float.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 206 of file PtexReader.h.
References Ptex::mdt_int16.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 216 of file PtexReader.h.
References Ptex::mdt_int32.
|
inlinevirtual |
Query the value of a given meta data entry.
If the key doesn't exist or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 196 of file PtexReader.h.
References Ptex::mdt_int8.
|
inline |
Definition at line 188 of file PtexReader.h.
References findKey().
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 163 of file PtexReader.h.
References _entries, PtexReader::MetaData::Entry::data, getEntry(), Ptex::mdt_string, and PtexReader::MetaData::Entry::type.
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 241 of file PtexReader.h.
References Ptex::mdt_double.
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 231 of file PtexReader.h.
References Ptex::mdt_float.
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 211 of file PtexReader.h.
References Ptex::mdt_int16.
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 221 of file PtexReader.h.
References Ptex::mdt_int32.
|
inlinevirtual |
Query the value of a given meta data entry by index.
If the index is out of range or the type doesn't match, value is set to null
Implements PtexMetaData.
Definition at line 201 of file PtexReader.h.
References Ptex::mdt_int8.
|
inline |
Definition at line 172 of file PtexReader.h.
References _entries, PtexReader::MetaData::Entry::data, PtexReader::MetaData::Entry::datasize, getEntry(), and PtexReader::MetaData::Entry::type.
|
inlineprotected |
Definition at line 313 of file PtexReader.h.
References _entries, _map, PtexReader::MetaData::Entry::clear(), PtexReader::MetaData::Entry::datasize, PtexReader::datatype(), PtexReader::MetaData::Entry::index, PtexReader::MetaData::Entry::key, and PtexReader::MetaData::Entry::type.
Referenced by addEntry(), and addLmdEntry().
|
inlinevirtual |
Query number of meta data entries stored in file.
Implements PtexMetaData.
Definition at line 127 of file PtexReader.h.
References _entries.
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Implements PtexMetaData.
Definition at line 125 of file PtexReader.h.
|
inline |
Definition at line 266 of file PtexReader.h.
References _entries.
Referenced by PtexReader::readMetaData().
|
protected |
Definition at line 341 of file PtexReader.h.
Referenced by getEntry(), getKey(), getValue(), newEntry(), numKeys(), and selfDataSize().
|
protected |
Definition at line 340 of file PtexReader.h.
Referenced by findKey(), and newEntry().
|
protected |
Definition at line 338 of file PtexReader.h.
Referenced by getEntry().