00001 #ifndef HEADER_ENVIRON_H
00002 #define HEADER_ENVIRON_H
00003
00004 class Path;
00005 class BaseMsg;
00006
00007 #include "NoCopy.h"
00008
00009 #include <string>
00010 #include <map>
00011
00012
00013
00014
00015 class Environ : public NoCopy {
00016 private:
00017 typedef std::map<std::string,std::string> t_values;
00018 typedef std::multimap<std::string,BaseMsg*> t_watchers;
00019 t_values m_values;
00020 t_watchers m_watchers;
00021 public:
00022 virtual ~Environ();
00023 void store(const Path &file);
00024
00025 void setParam(const std::string &name, const std::string &value);
00026 void setParam(const std::string &name, long value);
00027
00028 std::string getParam(const std::string &name,
00029 const std::string &implicit="") const;
00030 int getAsInt(const std::string &name,
00031 int implicit=0) const;
00032 bool getAsBool(const std::string &name,
00033 bool implicit=false) const;
00034
00035 void addWatcher(const std::string &name, BaseMsg *msg);
00036 void removeWatchers(const std::string &listenerName);
00037 std::string toString() const;
00038 std::string getHelpInfo() const;
00039 };
00040
00041 #endif