--- trunk/src/utils/ParameterManager.hpp 2006/05/17 19:54:27 962 +++ trunk/src/utils/ParameterManager.hpp 2006/05/17 21:51:42 963 @@ -44,7 +44,7 @@ * * Created by Charles F. Vardeman II on 11/16/05. * @author Charles F. Vardeman II - * @version $Id: ParameterManager.hpp,v 1.2 2005-12-16 18:55:55 tim Exp $ + * @version $Id: ParameterManager.hpp,v 1.3 2006-05-17 21:51:42 tim Exp $ * */ @@ -57,9 +57,9 @@ #include #include #include +#include "config.h" - #include "utils/CaseConversion.hpp" @@ -109,15 +109,15 @@ struct ParameterTraits{ static std::string getParamType() { return "int";} }; -//double +//RealType template<> -struct ParameterTraits{ - typedef double RepType; +struct ParameterTraits{ + typedef RealType RepType; template static bool convert(T, RepType&){return false;} template static RepType convert(T v) {RepType tmp; convert(v,tmp);return tmp;} static bool convert(RepType v, RepType& r) {r=v; return true;} - static bool convert(int v, RepType& r) {r = static_cast(v); return true;} - static std::string getParamType() { return "double";} + static bool convert(int v, RepType& r) {r = static_cast(v); return true;} + static std::string getParamType() { return "RealType";} }; @@ -134,7 +134,7 @@ class ParameterBase { (public) bool empty() {return empty_;} virtual bool setData(std::string) = 0; virtual bool setData(int) = 0; - virtual bool setData(double) = 0; + virtual bool setData(RealType) = 0; virtual std::string getParamType() = 0; protected: std::string keyword_; @@ -157,8 +157,8 @@ class Parameter : public ParameterBase{ (public) return internalSetData(ival); } - virtual bool setData(double dval) { - return internalSetData(dval); + virtual bool setData(RealType dval) { + return internalSetData(dval); } virtual std::string getParamType() { return ParameterTraits::getParamType();}