Ptex: PtexReader::MetaData Class Reference

Ptex

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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
struct | Entry
class | LargeMetaData

## Public Member Functions
| MetaData (MetaData **parent, PtexCacheImpl *cache, int size, PtexReader *reader)
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 n, const char *&key, MetaDataType &type)
| Query the name and type of a meta data entry. More...
virtual void | getValue (const char *key, const char *&value)
| Query the value of a given meta data entry. More...
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 (const char *key, const int16_t *&value, int &count)
| Query the value of a given meta data entry. 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 (const char *key, const float *&value, int &count)
| Query the value of a given meta data entry. More...
virtual void | getValue (const char *key, const double *&value, int &count)
| Query the value of a given meta data entry. More...
void | addEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, void *data)
void | addLmdEntry (uint8_t keysize, const char *key, uint8_t datatype, uint32_t datasize, FilePos filepos, uint32_t zipsize)
Public Member Functions inherited from PtexCachedData
| PtexCachedData (void **parent, PtexCacheImpl *cache, int size)
void | ref ()
void | unref ()
Public Member Functions inherited from PtexLruItem
bool | inuse ()
void | orphan ()

## 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)
Entry * | getEntry (const char *key)
Protected Member Functions inherited from PtexCachedData
void | incSize (int size)
virtual | ~PtexCachedData ()
Protected Member Functions inherited from PtexLruItem
| PtexLruItem (void **parent=0)
virtual | ~PtexLruItem ()
Protected Member Functions inherited from PtexMetaData
virtual | ~PtexMetaData ()
| Destructor not for public use. Use release() instead. More...

## Protected Attributes
PtexReader * | _reader
MetaMap | _map
safevector< Entry * > | _entries
std::vector< LargeMetaData * > | _lmdRefs
Protected Attributes inherited from PtexCachedData
PtexCacheImpl * | _cache

## Additional Inherited Members
Static Public Member Functions inherited from PtexLruItem
template<typename T >
static void | orphanList (T &list)

## Detailed Description

Definition at line 110 of file PtexReader.h.

## Member Typedef Documentation

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

Definition at line 263 of file PtexReader.h.

## Constructor & Destructor Documentation

PtexReader::MetaData::MetaData | ( | MetaData ** | parent,
|  | PtexCacheImpl * | cache,
|  | int | size,
|  | PtexReader * | reader
| ) |  |
| inline

Definition at line 112 of file PtexReader.h.

## Member Function Documentation

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

Definition at line 188 of file PtexReader.h.

References PtexReader::MetaData::Entry::data.

Referenced by PtexReader::readMetaDataBlock().

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

Definition at line 196 of file PtexReader.h.

References PtexReader::MetaData::Entry::isLmd, PtexReader::MetaData::Entry::lmdData, PtexReader::MetaData::Entry::lmdPos, and PtexReader::MetaData::Entry::lmdZipSize.

Referenced by PtexReader::readLargeMetaDataHeaders().

PtexReader::MetaData::Entry * PtexReader::MetaData::getEntry | ( | const char * | key | ) |
| protected

Definition at line 265 of file PtexReader.cpp.

References PtexCachedData::_cache, _lmdRefs, _map, _reader, PtexCacheImpl::cachelock, PtexReader::MetaData::LargeMetaData::data(), PtexReader::MetaData::Entry::data, PtexReader::MetaData::Entry::datasize, PtexReader::MetaData::Entry::isLmd, PtexReader::MetaData::Entry::lmdData, PtexReader::MetaData::Entry::lmdPos, PtexReader::MetaData::Entry::lmdZipSize, PtexInternal::_SpinLock::lock(), PtexReader::readlock, PtexReader::readZipBlock(), PtexCachedData::ref(), PtexReader::seek(), and PtexInternal::_SpinLock::unlock().

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

Query the name and type of a meta data entry.

Implements PtexMetaData.

Definition at line 127 of file PtexReader.h.

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

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

References PtexReader::MetaData::Entry::data.

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

References PtexReader::MetaData::Entry::data, and PtexReader::MetaData::Entry::datasize.

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

References PtexReader::MetaData::Entry::data, and PtexReader::MetaData::Entry::datasize.

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

References PtexReader::MetaData::Entry::data, and PtexReader::MetaData::Entry::datasize.

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

References PtexReader::MetaData::Entry::data, and PtexReader::MetaData::Entry::datasize.

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

References PtexReader::MetaData::Entry::data, and PtexReader::MetaData::Entry::datasize.

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

Definition at line 246 of file PtexReader.h.

References PtexReader::MetaData::Entry::clear(), PtexReader::MetaData::Entry::datasize, PtexReader::MetaData::Entry::key, and PtexReader::MetaData::Entry::type.

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

Query number of meta data entries stored in file.

Implements PtexMetaData.

Definition at line 126 of file PtexReader.h.

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

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

Implements PtexMetaData.

Definition at line 115 of file PtexReader.h.

## Member Data Documentation

safevector<Entry*> PtexReader::MetaData::_entries
| protected

Definition at line 265 of file PtexReader.h.

std::vector<LargeMetaData*> PtexReader::MetaData::_lmdRefs
| protected

Definition at line 266 of file PtexReader.h.

Referenced by getEntry().

MetaMap PtexReader::MetaData::_map
| protected

Definition at line 264 of file PtexReader.h.

Referenced by getEntry().

PtexReader* PtexReader::MetaData::_reader
| protected

Definition at line 262 of file PtexReader.h.

Referenced by getEntry().

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

- PtexReader.h
- PtexReader.cpp