Ptex: PtexReader::MetaData Class Reference

Ptex

Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
PtexReader::MetaData Class Reference

`#include <PtexReader.h>`

Inheritance diagram for PtexReader::MetaData:

## Classes
class | LargeMetaData
struct | Entry

## Public Member Functions
| MetaData (PtexReader *reader)
| ~MetaData ()
virtual void | release ()
| Release resources held by this pointer (pointer becomes invalid).
virtual int | numKeys ()
| Query number of meta data entries stored in file.
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.
virtual void | getValue (int index, const char *&value)
| Query the value of a given meta data entry by index.
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.
virtual void | getValue (int index, const int8_t *&value, int &count)
| Query the value of a given meta data entry by index.
virtual void | getValue (const char *key, const int16_t *&value, int &count)
| Query the value of a given meta data entry.
virtual void | getValue (int index, const int16_t *&value, int &count)
| Query the value of a given meta data entry by index.
virtual void | getValue (const char *key, const int32_t *&value, int &count)
| Query the value of a given meta data entry.
virtual void | getValue (int index, const int32_t *&value, int &count)
| Query the value of a given meta data entry by index.
virtual void | getValue (const char *key, const float *&value, int &count)
| Query the value of a given meta data entry.
virtual void | getValue (int index, const float *&value, int &count)
| Query the value of a given meta data entry by index.
virtual void | getValue (const char *key, const double *&value, int &count)
| Query the value of a given meta data entry.
virtual void | getValue (int index, const double *&value, int &count)
| Query the value of a given meta data entry by index.
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.
virtual bool | findKey (const char *key, int &index, Ptex::MetaDataType &type)=0
| Query the index and type of a meta data entry by name.

## 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.

## Protected Attributes
PtexReader * | _reader
MetaMap | _map
std::vector< Entry * > | _entries

## Detailed Description

Definition at line 123 of file PtexReader.h.

## Member Typedef Documentation

## ◆ MetaMap

typedef std::map<std::string, Entry> PtexReader::MetaData::MetaMap
| protected

Definition at line 342 of file PtexReader.h.

## Constructor & Destructor Documentation

## ◆ MetaData()

PtexReader::MetaData::MetaData | ( | PtexReader * | reader | ) |
| inline

Definition at line 125 of file PtexReader.h.

References _reader, and PtexReader::PtexReader().

## ◆ ~MetaData()

PtexReader::MetaData::~MetaData | ( |  | ) |
| inline

Definition at line 127 of file PtexReader.h.

## Member Function Documentation

## ◆ addEntry()

void PtexReader::MetaData::addEntry | ( | uint8_t | keysize,
|  | const char * | key,
|  | uint8_t | datatype,
|  | uint32_t | datasize,
|  | const void * | data,
|  | size_t & | metaDataMemUsed )
| inline

Definition at line 249 of file PtexReader.h.

References PtexReader::MetaData::Entry::data, PtexReader::datatype(), and newEntry().

Referenced by PtexReader::readMetaDataBlock().

## ◆ addLmdEntry()

void PtexReader::MetaData::addLmdEntry | ( | uint8_t | keysize,
|  | const char * | key,
|  | uint8_t | datatype,
|  | uint32_t | datasize,
|  | FilePos | filepos,
|  | uint32_t | zipsize,
|  | size_t & | metaDataMemUsed )
| inline

Definition at line 258 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().

## ◆ findKey()

virtual bool PtexReader::MetaData::findKey | ( | const char * | key,
|  | int & | index,
|  | MetaDataType & | type )
| inlinevirtual

Definition at line 141 of file PtexReader.h.

References _map.

Referenced by getValue(), and getValue().

## ◆ getEntry()

PtexReader::MetaData::Entry * PtexReader::MetaData::getEntry | ( | int | index | ) |
| protected

Definition at line 345 of file PtexReader.cpp.

References _entries, _reader, PtexReader::MetaData::Entry::data, PtexReader::MetaData::LargeMetaData::data(), PtexReader::MetaData::Entry::datasize, PtexReader::MetaData::Entry::isLmd, PtexReader::MetaData::Entry::lmdData, PtexReader::MetaData::Entry::lmdPos, and PtexReader::MetaData::Entry::lmdZipSize.

Referenced by getValue(), getValue(), and getValue().

## ◆ getKey()

virtual void PtexReader::MetaData::getKey | ( | int | index,
|  | const char *& | key,
|  | MetaDataType & | type )
| inlinevirtual

Definition at line 131 of file PtexReader.h.

References _entries, PtexReader::MetaData::Entry::key, and PtexReader::MetaData::Entry::type.

## ◆ getValue() [1/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const char *& | value )
| 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 153 of file PtexReader.h.

References PtexReader::MetaData::Entry::data, findKey(), getEntry(), and PtexReader::MetaData::Entry::type.

Referenced by getValue(), getValue(), getValue(), getValue(), getValue(), getValue(), getValue(), getValue(), getValue(), getValue(), and getValue().

## ◆ getValue() [2/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const double *& | value,
|  | int & | count )
| 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 239 of file PtexReader.h.

References getValue().

## ◆ getValue() [3/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const float *& | value,
|  | int & | count )
| 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 229 of file PtexReader.h.

References getValue().

## ◆ getValue() [4/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const int16_t *& | value,
|  | int & | count )
| 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 209 of file PtexReader.h.

References getValue().

## ◆ getValue() [5/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const int32_t *& | value,
|  | int & | count )
| 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 219 of file PtexReader.h.

References getValue().

## ◆ getValue() [6/14]

virtual void PtexReader::MetaData::getValue | ( | const char * | key,
|  | const int8_t *& | value,
|  | int & | count )
| 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 199 of file PtexReader.h.

References getValue().

## ◆ getValue() [7/14]

template<typename T>

void PtexReader::MetaData::getValue | ( | const char * | key,
|  | MetaDataType | requestedType,
|  | const T *& | value,
|  | int & | count )
| inline

Definition at line 191 of file PtexReader.h.

References findKey(), and getValue().

## ◆ getValue() [8/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const char *& | value )
| 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 166 of file PtexReader.h.

References _entries, PtexReader::MetaData::Entry::data, getEntry(), and PtexReader::MetaData::Entry::type.

## ◆ getValue() [9/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const double *& | value,
|  | int & | count )
| 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 244 of file PtexReader.h.

References getValue().

## ◆ getValue() [10/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const float *& | value,
|  | int & | count )
| 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 234 of file PtexReader.h.

References getValue().

## ◆ getValue() [11/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const int16_t *& | value,
|  | int & | count )
| 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 214 of file PtexReader.h.

References getValue().

## ◆ getValue() [12/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const int32_t *& | value,
|  | int & | count )
| 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 224 of file PtexReader.h.

References getValue().

## ◆ getValue() [13/14]

virtual void PtexReader::MetaData::getValue | ( | int | index,
|  | const int8_t *& | value,
|  | int & | count )
| 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 204 of file PtexReader.h.

References getValue().

## ◆ getValue() [14/14]

template<typename T>

void PtexReader::MetaData::getValue | ( | int | index,
|  | MetaDataType | requestedType,
|  | const T *& | value,
|  | int & | count )
| inline

Definition at line 175 of file PtexReader.h.

References _entries, PtexReader::MetaData::Entry::data, PtexReader::MetaData::Entry::datasize, getEntry(), and PtexReader::MetaData::Entry::type.

## ◆ newEntry()

Entry * PtexReader::MetaData::newEntry | ( | uint8_t | keysize,
|  | const char * | key,
|  | uint8_t | datatype,
|  | uint32_t | datasize,
|  | size_t & | metaDataMemUsed )
| inlineprotected

Definition at line 316 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().

## ◆ numKeys()

virtual int PtexReader::MetaData::numKeys | ( |  | ) |
| inlinevirtual

Query number of meta data entries stored in file.

Implements PtexMetaData.

Definition at line 130 of file PtexReader.h.

References _entries.

## ◆ release()

virtual void PtexReader::MetaData::release | ( |  | ) |
| inlinevirtual

Release resources held by this pointer (pointer becomes invalid).

Implements PtexMetaData.

Definition at line 128 of file PtexReader.h.

## ◆ selfDataSize()

size_t PtexReader::MetaData::selfDataSize | ( |  | ) |
| inline

Definition at line 269 of file PtexReader.h.

References _entries.

Referenced by PtexReader::readMetaData().

## Member Data Documentation

## ◆ _entries

std::vector<Entry*> PtexReader::MetaData::_entries
| protected

Definition at line 344 of file PtexReader.h.

Referenced by getEntry(), getKey(), getValue(), getValue(), newEntry(), numKeys(), and selfDataSize().

## ◆ _map

MetaMap PtexReader::MetaData::_map
| protected

Definition at line 343 of file PtexReader.h.

Referenced by findKey(), and newEntry().

## ◆ _reader

PtexReader* PtexReader::MetaData::_reader
| protected

Definition at line 341 of file PtexReader.h.

Referenced by getEntry(), and MetaData().

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

- PtexReader.h
- PtexReader.cpp