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:
PtexMetaData

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 ()
 

Protected Types

typedef std::map< std::string, EntryMetaMap
 

Protected Member Functions

EntrynewEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, size_t &metaDataMemUsed)
 
EntrygetEntry (int index)
 

Protected Attributes

PtexReader_reader
 
MetaMap _map
 
std::vector< Entry * > _entries
 

Detailed Description

Definition at line 120 of file PtexReader.h.

Member Typedef Documentation

◆ MetaMap

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

Definition at line 339 of file PtexReader.h.

Constructor & Destructor Documentation

◆ MetaData()

PtexReader::MetaData::MetaData ( PtexReader reader)
inline

Definition at line 122 of file PtexReader.h.

◆ ~MetaData()

PtexReader::MetaData::~MetaData ( )
inline

Definition at line 124 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

◆ 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

◆ findKey()

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

Definition at line 138 of file PtexReader.h.

References _map.

Referenced by getValue().

◆ getEntry()

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

◆ getKey()

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

◆ 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 150 of file PtexReader.h.

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

◆ 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 236 of file PtexReader.h.

References Ptex::mdt_double.

◆ 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 226 of file PtexReader.h.

References Ptex::mdt_float.

◆ 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 206 of file PtexReader.h.

References Ptex::mdt_int16.

◆ 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 216 of file PtexReader.h.

References Ptex::mdt_int32.

◆ 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 196 of file PtexReader.h.

References Ptex::mdt_int8.

◆ getValue() [7/14]

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

Definition at line 188 of file PtexReader.h.

References findKey().

◆ 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 163 of file PtexReader.h.

References _entries, PtexReader::MetaData::Entry::data, getEntry(), Ptex::mdt_string, 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 241 of file PtexReader.h.

References Ptex::mdt_double.

◆ 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 231 of file PtexReader.h.

References Ptex::mdt_float.

◆ 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 211 of file PtexReader.h.

References Ptex::mdt_int16.

◆ 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 221 of file PtexReader.h.

References Ptex::mdt_int32.

◆ 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 201 of file PtexReader.h.

References Ptex::mdt_int8.

◆ getValue() [14/14]

template<typename T >
void PtexReader::MetaData::getValue ( int  index,
MetaDataType  requestedType,
const T *&  value,
int &  count 
)
inline

◆ newEntry()

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

◆ numKeys()

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

Query number of meta data entries stored in file.

Implements PtexMetaData.

Definition at line 127 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 125 of file PtexReader.h.

◆ selfDataSize()

size_t PtexReader::MetaData::selfDataSize ( )
inline

Definition at line 266 of file PtexReader.h.

References _entries.

Referenced by PtexReader::readMetaData().

Member Data Documentation

◆ _entries

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

Definition at line 341 of file PtexReader.h.

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

◆ _map

MetaMap PtexReader::MetaData::_map
protected

Definition at line 340 of file PtexReader.h.

Referenced by findKey(), and newEntry().

◆ _reader

PtexReader* PtexReader::MetaData::_reader
protected

Definition at line 338 of file PtexReader.h.

Referenced by getEntry().


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