#include <ExerciseStore.h>
Public Member Functions | |
AbstractExercise * | getExercise (string key) |
int | putExercise (string key, AbstractExercise *exercise) |
int | putExercise (AbstractExercise *exercise) |
Static Public Member Functions | |
static ExerciseStore * | instance () |
static void | destroyInstance () |
Private Member Functions | |
ExerciseStore () | |
void | releaseAllExercises () |
Private Attributes | |
ExerciseMap_t | fExerciseMap |
Static Private Attributes | |
static ExerciseStore * | fInstance |
© Bernhard Wagner, xmlizer.net, 2002.
Definition at line 21 of file ExerciseStore.h.
ExerciseStore::ExerciseStore | ( | ) | [inline, private] |
Default constructor. Private: Singleton Design Pattern
Definition at line 65 of file ExerciseStore.h.
Referenced by instance().
AbstractExercise * ExerciseStore::getExercise | ( | string | key | ) |
Retrieves an Exercise from the store.
key | The key to retrieve the Exercise for |
Definition at line 13 of file ExerciseStore.cpp.
References fExerciseMap.
Referenced by Driver::instantiate().
int ExerciseStore::putExercise | ( | string | key, | |
AbstractExercise * | exercise | |||
) |
Stores an Exercise in the store.
key | The key under which to store the Exercise | |
exercise | The Exercise to store |
Definition at line 17 of file ExerciseStore.cpp.
References fExerciseMap.
Referenced by AbstractExercise::init(), and putExercise().
int ExerciseStore::putExercise | ( | AbstractExercise * | exercise | ) |
Stores an Exercise in the store.
exercise | The Exercise to store |
Definition at line 23 of file ExerciseStore.cpp.
References AbstractExercise::getName(), and putExercise().
ExerciseStore * ExerciseStore::instance | ( | ) | [static] |
Retrieves the one and only instance of ExerciseStore. (Singleton Design Pattern)
Definition at line 28 of file ExerciseStore.cpp.
References ExerciseStore(), and fInstance.
Referenced by AbstractExercise::init(), and Driver::instantiate().
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().
void ExerciseStore::releaseAllExercises | ( | ) | [private] |
Releaeses all Exercises in this store.
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 80 of file ExerciseStore.h.
Referenced by destroyInstance(), and instance().