ExerciseStore Class Reference

#include <ExerciseStore.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

static ExerciseStoreinstance ()
static void destroyInstance ()

Private Member Functions

 ExerciseStore ()
void releaseAllExercises ()

Private Attributes

ExerciseMap_t fExerciseMap

Static Private Attributes

static ExerciseStorefInstance


Detailed Description

The ExerciseStore. Stores Exercises

© Bernhard Wagner, xmlizer.net, 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

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().

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().

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().

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().

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.


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 80 of file ExerciseStore.h.

Referenced by destroyInstance(), and instance().


The documentation for this class was generated from the following files:
Generated on Thu Jul 3 19:12:45 2008 for Exercise Framework by  doxygen 1.5.1