00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef conf_string_H
00026 #define conf_string_H
00027
00028
00029
00030
00031 #include <string>
00032
00033
00034 #include "conf/conf.h"
00035
00036 namespace IXE {
00037
00046 template <> class conf<std::string> : public VarDefault<std::string>
00047 {
00048 public:
00049 conf(char const *name, char const *default_value = "") :
00050 VarDefault<std::string>(name, default_value) { }
00051
00052 operator char const*() const { return value.c_str(); }
00053
00054 operator char*() const { return (char*)value.c_str(); }
00055
00056 conf<std::string>& operator =(char const* s) {
00057 parseValue(s);
00058 return *this;
00059 }
00060
00061 std::string operator +(char const* s) { return value + s; }
00062 conf<std::string>& operator +=(std::string const& s) {
00063 value += s;
00064 return *this;
00065 }
00066 conf<std::string>& operator +=(char const* s) {
00067 value += s;
00068 return *this;
00069 }
00070 protected:
00071 virtual void parseValue(char const*& line);
00072 };
00073
00074 }
00075
00076 #endif