AtlasConfigChunk Class Reference [Atlas Resource System]

#include <atlasConfigChunk.h>

Inheritance diagram for AtlasConfigChunk:

Inheritance graph
[legend]
List of all members.

Detailed Description

A dictionary of configuration data.

This is a simple dictionary class to store configuration data in an Atlas file. For now it is a dictionary of strings.


Public Types

typedef AtlasChunk Parent

Public Member Functions

 AtlasConfigChunk ()
 ~AtlasConfigChunk ()
virtual void read (Stream *s)
 Deserialize from a stream.
virtual void write (Stream *s)
 Serialize this chunk to a stream.
virtual void process ()
 Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources.
void generate (AtlasChunk *children[4])
 Given four children, (re)generate the data for this one.
AtlasConfigChunkgenerateCopy (S32 reformat=-1)
virtual U32 getHeadSentinel ()
virtual U32 getTailSentinel ()
void setEntry (const char *key, const char *v)
bool clearEntry (const char *key)
bool getEntry (const char *key, const char *&v)

Private Attributes

DictEntrymEntryList

Classes

struct  DictEntry


Member Typedef Documentation


Constructor & Destructor Documentation

AtlasConfigChunk::AtlasConfigChunk (  ) 

AtlasConfigChunk::~AtlasConfigChunk (  ) 


Member Function Documentation

virtual void AtlasConfigChunk::read ( Stream s  )  [virtual]

Deserialize from a stream.

See also:
You probably want to use readFromStream()

Reimplemented from AtlasChunk.

virtual void AtlasConfigChunk::write ( Stream s  )  [virtual]

Serialize this chunk to a stream.

See also:
You probably want to use prepareDeferredWrite()

Reimplemented from AtlasChunk.

virtual void AtlasConfigChunk::process (  )  [virtual]

Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources.

(For instance, a texture or VB, that depend on access to GFX to initialize.)

Reimplemented from AtlasChunk.

void AtlasConfigChunk::generate ( AtlasChunk children[4]  )  [inline, virtual]

Given four children, (re)generate the data for this one.

Their order starts at topleft, clockwise, 0123.

Reimplemented from AtlasChunk.

AtlasConfigChunk* AtlasConfigChunk::generateCopy ( S32  reformat = -1  ) 

virtual U32 AtlasConfigChunk::getHeadSentinel (  )  [virtual]

Reimplemented from AtlasChunk.

virtual U32 AtlasConfigChunk::getTailSentinel (  )  [virtual]

Reimplemented from AtlasChunk.

void AtlasConfigChunk::setEntry ( const char *  key,
const char *  v 
)

bool AtlasConfigChunk::clearEntry ( const char *  key  ) 

bool AtlasConfigChunk::getEntry ( const char *  key,
const char *&  v 
)


Member Data Documentation