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
00030 #ifndef EXPANDLIB_VARTYPE_TEXT_H_INCLUDED
00031 #define EXPANDLIB_VARTYPE_TEXT_H_INCLUDED
00032
00033 #include "expandlib-vartype.h"
00034
00035 namespace expander {
00036
00038
00051 template<
00052
00053 class StringType = ::std::string
00054 >
00055 class expvartype_text : public expandvartype<StringType> {
00056 protected:
00057 StringType value;
00058
00059 public:
00060
00062 expvartype_text() {}
00063
00065 expvartype_text(const StringType &s) : value(s) {}
00066
00068 expvartype_text(const _TCHAR * s) : value(s) {}
00069
00070 virtual void AppendValue(StringType &dest) const { dest.append(value.begin(), value.end()); }
00071
00072 virtual void AppendValue(StringType &dest, const FParamVectorType ¶ms, const FVarMapType &vars, ExpandResultsType &results) const { dest.append(value.begin(), value.end()); }
00073
00074 virtual void SetValue(const StringType &s) { value=s; }
00075
00077 inline StringType& get_string() { return value; }
00078 };
00079
00080 }
00081
00082 #endif //EXPANDLIB_VARTYPE_TEXT_H_INCLUDED