DataStore Class Reference

The DataStore class manages the DataStacks that are being used by the framework. More...

Inheritance diagram for DataStore:

Inheritance graph
[legend]
Collaboration diagram for DataStore:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DataStore ()
 Constructor.
 ~DataStore ()
 Deconstructor.
void init ()
 Initialises the DataStore.
void clear ()
 Clears the DataStore.
void grab ()
 Increases the reference counter.
void drop ()
 Decreases the reference counter.
bool addDataStack (DataStack *stack)
 Adds the given DataStack to the DataStore.
DataStackcreateDataStack (const std::string &name, bool grab=true)
 Creates (and adds) a DataStack with the given name.
DataStackgetDataStack (const u32 id)
 Gets the DataStack with the given ID.
DataStackgetDataStack (const std::string &name)
 Gets the DataStack with the given name.
void removeDataStacks ()
 Removes all DataStacks from the DataStore.
bool removeDataStack (DataStack *stack)
 Removes the given DataStack.
bool removeDataStack (const u32 id)
 Removes the given DataStack with the given ID.
bool removeDataStack (const std::string &name)
 Removes the given DataStack with the given name.


Detailed Description

The DataStore class manages the DataStacks that are being used by the framework.

Definition at line 29 of file DataStore.h.


Constructor & Destructor Documentation

DataStore::DataStore (  ) 

Constructor.

Definition at line 23 of file DataStore.cpp.

DataStore::~DataStore (  ) 

Deconstructor.

Definition at line 29 of file DataStore.cpp.


Member Function Documentation

bool DataStore::addDataStack ( DataStack stack  ) 

Adds the given DataStack to the DataStore.

Parameters:
stack Pointer to the DataStack to add.
Returns:
True if addition was successful, false if addition was a failure.

Definition at line 58 of file DataStore.cpp.

void DataStore::clear (  ) 

Clears the DataStore.

Definition at line 40 of file DataStore.cpp.

DataStack * DataStore::createDataStack ( const std::string &  name,
bool  grab = true 
)

Creates (and adds) a DataStack with the given name.

Parameters:
name Name of the DataStack.
grab Should the DataStore add the loaded DataStack to the internal list?
Returns:
Pointer to the DataStack on success, NULL on failure.

Definition at line 76 of file DataStore.cpp.

void DataStore::drop (  )  [virtual]

Decreases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 52 of file DataStore.cpp.

DataStack * DataStore::getDataStack ( const std::string &  name  ) 

Gets the DataStack with the given name.

Returns:
Pointer to the DataStack if found, else NULL.

Definition at line 107 of file DataStore.cpp.

DataStack * DataStore::getDataStack ( const u32  id  ) 

Gets the DataStack with the given ID.

Returns:
Pointer to the DataStack if found, else NULL.

Definition at line 95 of file DataStore.cpp.

void DataStore::grab (  )  [virtual]

Increases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 46 of file DataStore.cpp.

void DataStore::init (  ) 

Initialises the DataStore.

Definition at line 35 of file DataStore.cpp.

bool DataStore::removeDataStack ( const std::string &  name  ) 

Removes the given DataStack with the given name.

Parameters:
name Name of the DataStack to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 177 of file DataStore.cpp.

bool DataStore::removeDataStack ( const u32  id  ) 

Removes the given DataStack with the given ID.

Parameters:
id ID of the DataStack to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 155 of file DataStore.cpp.

bool DataStore::removeDataStack ( DataStack stack  ) 

Removes the given DataStack.

Parameters:
stack Pointer to the DataStack to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 129 of file DataStore.cpp.

void DataStore::removeDataStacks (  ) 

Removes all DataStacks from the DataStore.

Definition at line 119 of file DataStore.cpp.


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

Generated on Fri Aug 21 23:55:13 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8