Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ExerciseStore Class Reference

#include <ExerciseStore.h>

List of all members.

Public Methods

AbstractExercisegetExercise (string key)
int putExercise (string key, AbstractExercise *exercise)
int putExercise (AbstractExercise *exercise)

Static Public Methods

ExerciseStore * instance ()
void destroyInstance ()

Private Methods

 ExerciseStore ()
void releaseAllExercises ()

Private Attributes

ExerciseMap_t fExerciseMap

Static Private Attributes

ExerciseStore * fInstance


Detailed Description

The ExerciseStore. Stores Exercises

© Bernhard Wagner, xmlizer.biz, 2002.

Definition at line 21 of file ExerciseStore.h.


Constructor & Destructor Documentation

ExerciseStore::ExerciseStore   [inline, private]
 

Default constructor. Private: Singleton Design Pattern

Definition at line 65 of file ExerciseStore.h.

Referenced by instance().


Member Function Documentation

void ExerciseStore::destroyInstance   [static]
 

Destroys the one and only instance of ExerciseStore.

Definition at line 35 of file ExerciseStore.cpp.

References fInstance.

Referenced by Driver::~Driver().

AbstractExercise * ExerciseStore::getExercise string    key
 

Retrieves an Exercise from the store.

Parameters:
key  The key to retrieve the Exercise for
Returns:
The Exercise found for the given key. 0 if no Exercise was found.

Definition at line 13 of file ExerciseStore.cpp.

References fExerciseMap.

Referenced by Driver::instantiate().

ExerciseStore * ExerciseStore::instance   [static]
 

Retrieves the one and only instance of ExerciseStore. (Singleton Design Pattern)

Returns:
The one and only instance of ExerciseStore.

Definition at line 28 of file ExerciseStore.cpp.

References ExerciseStore(), and fInstance.

Referenced by AbstractExercise::init(), and Driver::instantiate().

int ExerciseStore::putExercise AbstractExercise   exercise
 

Stores an Exercise in the store.

Parameters:
exercise  The Exercise to store
Returns:
always 0.

Definition at line 23 of file ExerciseStore.cpp.

References AbstractExercise::getName(), and putExercise().

int ExerciseStore::putExercise string    key,
AbstractExercise   exercise
 

Stores an Exercise in the store.

Parameters:
key  The key under which to store the Exercise
exercise  The Exercise to store
Returns:
always 0.

Definition at line 17 of file ExerciseStore.cpp.

References fExerciseMap.

Referenced by AbstractExercise::init(), and putExercise().

void ExerciseStore::releaseAllExercises   [private]
 

Releaeses all Exercises in this store.


Member Data Documentation

ExerciseMap_t ExerciseStore::fExerciseMap [private]
 

The map storing the Exercises.

Definition at line 75 of file ExerciseStore.h.

Referenced by getExercise(), and putExercise().

ExerciseStore * ExerciseStore::fInstance [static, private]
 

The one and only instance of ExerciseStore. (Singleton Design Pattern)

Definition at line 39 of file ExerciseStore.cpp.

Referenced by destroyInstance(), and instance().


The documentation for this class was generated from the following files:
Generated on Sat Jul 19 18:19:54 2003 for Exercise Framework by doxygen1.2.18