ExerciseStore.h

Go to the documentation of this file.
00001 #include "macros.h" // needs to be declared as first entry in .cpp or .h file!
00002 #ifndef __ExerciseStore__
00003 #define __ExerciseStore__
00004 #include <map>
00005 #include <string>
00006 using namespace std;
00007 
00008 class AbstractExercise;
00009 
00013 typedef map<string, AbstractExercise*> ExerciseMap_t;
00014 
00021 class ExerciseStore {
00022 public:
00030     AbstractExercise *getExercise(string key);
00031 
00039     int putExercise(string key, AbstractExercise *exercise);
00040 
00047     int putExercise(AbstractExercise *exercise);
00048 
00054     static ExerciseStore *instance();
00055 
00059     static void destroyInstance();
00060 private:
00061 
00065     ExerciseStore(){}
00066 
00070     void releaseAllExercises(); 
00071 
00075     ExerciseMap_t fExerciseMap;
00076 
00080     static ExerciseStore *fInstance;
00081 };
00082 
00083 #endif

Generated on Thu Jul 3 19:12:45 2008 for Exercise Framework by  doxygen 1.5.1