00001 // $Id: SLConfig.hpp,v 1.2 2004/04/01 19:05:48 mr_lex Exp $ 00002 #ifndef SL_CONFIG_HPP 00003 #define SL_CONFIG_HPP 00004 00005 #include <iostream> 00006 00007 #include <boost/shared_ptr.hpp> 00008 00009 #include "segusoland.hpp" 00010 #include "SLString.hpp" 00011 #include "SLException.hpp" 00012 00013 SL_NAMESPACE_BEGIN 00014 00015 00029 class SLConfig { 00030 public: 00035 class NotFoundException : public SLException 00036 { 00037 public: 00039 NotFoundException(const SLString &e) : 00040 SLException(e) 00041 {}; 00042 }; 00043 00047 SLConfig(); 00048 00052 const SLString &get(const SLString &varName) const 00053 throw(SLConfig::NotFoundException); 00054 00058 void set(const SLString &varName, const SLString &value); 00059 00064 void humanListing(std::ostream &out) const; 00065 00066 protected: 00070 class Data; 00071 00076 boost::shared_ptr<Data> _shared_ptr; 00077 00078 }; // class SLConfig 00079 00080 SL_NAMESPACE_END 00081 #endif // #ifndef SL_CONFIG_HPP 00082 // $Log: SLConfig.hpp,v $ 00083 // Revision 1.2 2004/04/01 19:05:48 mr_lex 00084 // cosmetic changes 00085 // 00086 // Revision 1.1 2004/04/01 11:09:19 mr_lex 00087 // NEW: 1st import 00088 // 00089