QContainer.hh
Go to the documentation of this file.00001
00011 #ifndef __QCONTAINER_HH_
00012 #define __QCONTAINER_HH_
00013
00014 #include <map>
00015 #include <string>
00016
00017 #include "QObject.hh"
00018 #include "QCuore.hh"
00019
00020 Q_BEGIN_NAMESPACE
00021
00022 class QContainer {
00023 public:
00025 QContainer() {;}
00027 virtual ~QContainer();
00034 void SetQObject(const std::string& key, QObject* obj) {fQObjectMap[key] = obj ;}
00041 void SetInt(const std::string& key, int obj) {fIntMap[key] = obj ;}
00048 void SetDouble(const std::string& key, double obj) {fDoubleMap[key] = obj ;}
00055 void SetString(const std::string& key, const std::string &obj) {fStringMap[key] = obj ;}
00061 QObject* GetQObject(const std::string& key) {return fQObjectMap[key];}
00067 int GetInt(const std::string& key) {return fIntMap[key];}
00073 double GetDouble(const std::string& key) {return fDoubleMap[key];}
00079 std::string GetString(const std::string& key) {return fStringMap[key];}
00080
00081 void Clear();
00082 private:
00084 std::map<std::string, QObject*> fQObjectMap;
00085 std::map<std::string, QObject*>::iterator fQObjIter;
00087 std::map<std::string, double> fDoubleMap;
00088 std::map<std::string, double>::iterator fDIter;
00090 std::map<std::string, int> fIntMap;
00091 std::map<std::string, int>::iterator fIIter;
00093 std::map<std::string, std::string> fStringMap;
00094 std::map<std::string, std::string>::iterator fSIter;
00095
00096
00097 };
00098
00099 Q_END_NAMESPACE
00100
00101 #endif