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_VAR_H_INCLUDED
00031 #define EXPANDLIB_VAR_H_INCLUDED
00032
00033 #include <string>
00034 #include <vector>
00035 #include <map>
00036
00037 #include "expandlib-results.h"
00038 #include "expandlib-exceptions.h"
00039
00040 namespace expander {
00041
00043
00046 template<
00047
00048 class StringType = ::std::string
00049 >
00050 class expandvartype {
00051 protected:
00052 typedef ::std::vector<StringType> FParamVectorType;
00053 typedef ::std::map<StringType, ::expander::expandvartype<StringType>*> FVarMapType;
00054
00055 public:
00057
00061 virtual void AppendValue(StringType &dest) const = 0;
00062
00064
00067 virtual void AppendValue(StringType &dest, const FParamVectorType ¶ms, const FVarMapType &vars, ExpandResultsType &results) const = 0;
00068
00070
00072 virtual void SetValue(const StringType &s) = 0;
00073 };
00074
00075 }
00076
00077 #endif //EXPANDLIB_VAR_H_INCLUDED