/* * Parameter_vector.hpp * * Created on: Mar 31, 2017 * Author: heber */ #ifndef PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ #define PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "LinearAlgebra/Vector.hpp" #include "Parameters/Parameter.hpp" template <> class Parameter : public ParameterInterface, public ValueInterface { public: Parameter(const Parameter &instance); Parameter(const std::string &_name); Parameter(const std::string &_name, const Vector &_value); Parameter(const std::string &_name, const Validator &_Validator); Parameter(const std::string &_name, const Validator &_Validator, const Vector &_value); Parameter(const std::string &_name, const std::vector &_ValidValues); Parameter(const std::string &_name, const std::vector &_ValidValues, const Vector &_value); Parameter(const std::string &_name, const range &_ValidRange); Parameter(const std::string &_name, const range &_ValidRange, const Vector &_value); virtual ~Parameter(); // wrap the following functions from ValueAsString to add exception information bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException); const std::string getAsString() const throw(ParameterValueException); const std::string getAsStringUnvalidated() const throw(ParameterValueException); void setAsString(const std::string &_value) throw(ParameterValueException); // wrap the following functions from Value to add exception information bool isValid(const Vector &_value) const throw(ParameterValidatorException); const Vector & get() const throw(ParameterValueException); const Vector & getUnvalidated() const throw(ParameterValueException); void set(const Vector & _value) throw(ParameterValueException); bool isSet() const { return value.isSet(); } const Validator & getValidator() const { return value.getValidator(); } Validator & getValidator() { return value.getValidator(); } // comparator bool operator==(const Parameter &_instance) const throw(ParameterException); bool operator!=(const Parameter &_instance) const throw(ParameterException) { return !((*this)==(_instance)); } ParameterInterface* clone() const; //private: // TODO... Parameter(); private: //!> contained value of this parameter Value value; }; #endif /* PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ */