| 66 |  | template<typename T> static bool    convert(T v, RepType& r){return false;} // !NB everything is ok | 
| 67 |  | template<typename T> static RepType convert(T v)            {RepType tmp; convert(v,tmp);return tmp;} | 
| 68 |  | static bool convert(RepType v, RepType& r) { r = v; return true;} | 
| 69 | + | static std::string getParamType() { return "string";} | 
| 70 |  | }; | 
| 71 |  | //bool | 
| 72 |  | template<> | 
| 87 |  |  | 
| 88 |  | return result; | 
| 89 |  | } | 
| 90 | + | static std::string getParamType() { return "bool";} | 
| 91 |  | }; | 
| 92 |  |  | 
| 93 |  | //int | 
| 97 |  | template<typename T> static bool    convert(T, RepType&){return false;} | 
| 98 |  | template<typename T> static RepType convert(T v)        {RepType tmp; convert(v,tmp);return tmp;} | 
| 99 |  | static bool convert(RepType v, RepType& r)            { r=v; return true;} | 
| 100 | + | static std::string getParamType() { return "int";} | 
| 101 |  | }; | 
| 102 |  |  | 
| 103 |  | //double | 
| 108 |  | template<typename T> static RepType convert(T v)        {RepType tmp; convert(v,tmp);return tmp;} | 
| 109 |  | static bool convert(RepType v, RepType& r)            {r=v; return true;} | 
| 110 |  | static bool convert(int v, RepType& r)                {r = static_cast<double>(v); return true;} | 
| 111 | + | static std::string getParamType() { return "double";} | 
| 112 |  | }; | 
| 113 |  |  | 
| 114 |  |  | 
| 115 |  | class ParameterBase { | 
| 116 |  | public: | 
| 117 |  | ParameterBase() : keyword_(), optional_(false), defaultValue_(false), empty_(true) {} | 
| 118 | + | virtual ~ParameterBase() {} | 
| 119 |  | bool isOptional() {return optional_;} | 
| 120 |  | void setOptional(bool optional) {optional_ = optional;} | 
| 121 |  | bool hasDefaultValue() {return defaultValue_;} | 
| 126 |  | virtual bool setData(std::string) = 0; | 
| 127 |  | virtual bool setData(int) = 0; | 
| 128 |  | virtual bool setData(double) = 0; | 
| 129 | < |  | 
| 129 | > | virtual std::string getParamType() = 0; | 
| 130 |  | protected: | 
| 131 |  | std::string keyword_; | 
| 132 |  | bool optional_; | 
| 144 |  | virtual bool setData(std::string sval) { | 
| 145 |  | return internalSetData<std::string>(sval); | 
| 146 |  | } | 
| 147 | < | virtual bool setData(int ial) { | 
| 148 | < | return internalSetData<int>(ial); | 
| 147 | > | virtual bool setData(int ival) { | 
| 148 | > | return internalSetData<int>(ival); | 
| 149 |  | } | 
| 150 |  |  | 
| 151 |  | virtual bool setData(double dval) { | 
| 152 |  | return internalSetData<double>(dval); | 
| 153 |  | } | 
| 154 |  |  | 
| 155 | + | virtual std::string getParamType() { return ParameterTraits<ParamType>::getParamType();} | 
| 156 |  | private: | 
| 157 |  | template<class T> bool internalSetData(T data) { | 
| 158 |  | ParamType tmp; | 
| 239 |  | DeclareParameter(SurfaceTension, double); | 
| 240 |  | DeclareParameter(PrintPressureTensor, bool); | 
| 241 |  | DeclareParameter(ElectrostaticSummationMethod, std::string); | 
| 242 | + | DeclareParameter(ScreeningMethod, std::string); | 
| 243 |  | DeclareParameter(DampingAlpha, double); | 
| 244 |  | DeclareParameter(CutoffPolicy, std::string); | 
| 245 |  | DeclareParameter(CompressDumpFile, bool); |