/* * Parameter.hpp * * Created on: Apr 16, 2012 * Author: ankele */ #ifndef PARAMETER_HPP_ #define PARAMETER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "Value.hpp" #include "ParameterInterface.hpp" class ParameterException; class ParameterValueException; /** This class encapsulates a clonable, continuous value. * */ template class Parameter : public ParameterInterface, public Value { public: Parameter(const Parameter &instance); Parameter(const std::string &_name); Parameter(const std::string &_name, const T &_value); Parameter(const std::string &_name, const Validator &_Validator); Parameter(const std::string &_name, const Validator &_Validator, const T &_value); Parameter(const std::string &_name, const std::vector &_ValidValues); Parameter(const std::string &_name, const std::vector &_ValidValues, const T &_value); Parameter(const std::string &_name, const range &_ValidRange); Parameter(const std::string &_name, const range &_ValidRange, const T &_value); virtual ~Parameter(); // catch the following functions from Value to add exception information const std::string getAsString() const throw(ParameterValueException); const T & get() const throw(ParameterValueException); void set(const T & _value) throw(ParameterValueException); void setAsString(const std::string _value) throw(ParameterValueException); // comparator bool operator==(const Parameter &_instance) const throw(ParameterException); bool operator!=(const Parameter &_instance) const throw(ParameterException) { return !((*this)==(_instance)); } ParameterAsString* clone() const; //private: // TODO... Parameter(); }; #include "Parameter_impl.hpp" #endif /* PARAMETER_HPP_ */