AtlasResourceConfigTOC Class Reference [Atlas Resource System]

#include <atlasResourceConfigTOC.h>

Inheritance diagram for AtlasResourceConfigTOC:

Inheritance graph
[legend]
List of all members.

Detailed Description

Atlas resource TOC subclass for configuration data.

We abuse some of the semantics around TOCs for this class; we need to be able to store arbitrary configuration data in the atlas file (for instance, to give texture schema information), but the header area is of fixed size.

This makes supporting, say, variable numbers of source textures difficult.

So we use a config TOC to store an arbitrary number of configuration chunks. It's not a quadtree, but most of the resource TOC logic is not predicated on quadtrees anyway, so we should be OK.

Note that we inherit privately, so that you have to use our config API.


Public Types

typedef AtlasResourceTOC<
AtlasResourceConfigStub
Parent

Public Member Functions

 AtlasResourceConfigTOC ()
void load (bool forceReload=false)
 Since we're dealing with small datasets (ie, config data), we don't want the normal paging semantics.
void initialize (U32 maxConfigCount)
bool getConfig (const char *name, AtlasConfigChunk *&acc)
void addConfig (const char *name, AtlasConfigChunk *acc)
AtlasResourceTOC< AtlasResourceConfigStub > * castToResourceTOC ()

Private Attributes

bool mAreConfigsLoaded


Member Typedef Documentation


Constructor & Destructor Documentation

AtlasResourceConfigTOC::AtlasResourceConfigTOC (  )  [inline]


Member Function Documentation

void AtlasResourceConfigTOC::load ( bool  forceReload = false  ) 

Since we're dealing with small datasets (ie, config data), we don't want the normal paging semantics.

Therefore, call load() to get all config data into memory and ready for access.

This is a convenience method (unless you specify a forced reload), since the other methods in this class will request data be loaded if it's not already.

void AtlasResourceConfigTOC::initialize ( U32  maxConfigCount  ) 

bool AtlasResourceConfigTOC::getConfig ( const char *  name,
AtlasConfigChunk *&  acc 
)

void AtlasResourceConfigTOC::addConfig ( const char *  name,
AtlasConfigChunk acc 
)

AtlasResourceTOC<AtlasResourceConfigStub>* AtlasResourceConfigTOC::castToResourceTOC (  )  [inline]


Member Data Documentation