00001 #ifndef ANSWER_STRUCT
00002 #define ANSWER_STRUCT
00003
00004 #include "ace/Map_Manager.h"
00005 #include "ace/Synch.h"
00006 #include "ace/Process_Semaphore.h"
00007
00008 #include <set>
00009 #include <map>
00010
00011
00012 namespace ztt{
00013 namespace dcs{
00014
00015
00016 class AnswerStruct
00017 {
00018 public:
00022 AnswerStruct(void):mut(){};
00026 ~AnswerStruct(void){
00027
00028 idMap.clear();
00029 mut.remove();
00030 };
00037 void setAnswerStruct(const int key,const std::map<int, char*>& id);
00043 int findAnswerID(const int& id);
00050 std::map<int,char*> freeAnswerStruct(const int& key);
00051 private:
00055
00056 ACE_Thread_Mutex mut;
00060 std::map<int,std::map<int,char*> > idMap;
00065 AnswerStruct& operator=(const AnswerStruct&){return *this;};
00066 AnswerStruct(const AnswerStruct&){};
00067
00068 };
00069
00070 }}
00071 #endif