| [2eded3e] | 1 | /* | 
|---|
|  | 2 | * Parameter_vector.hpp | 
|---|
|  | 3 | * | 
|---|
|  | 4 | *  Created on: Mar 31, 2017 | 
|---|
|  | 5 | *      Author: heber | 
|---|
|  | 6 | */ | 
|---|
|  | 7 |  | 
|---|
|  | 8 |  | 
|---|
|  | 9 | #ifndef PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ | 
|---|
|  | 10 | #define PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ | 
|---|
|  | 11 |  | 
|---|
|  | 12 | // include config.h | 
|---|
|  | 13 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 14 | #include <config.h> | 
|---|
|  | 15 | #endif | 
|---|
|  | 16 |  | 
|---|
|  | 17 | #include "LinearAlgebra/Vector.hpp" | 
|---|
|  | 18 |  | 
|---|
|  | 19 | #include "Parameters/Parameter.hpp" | 
|---|
|  | 20 |  | 
|---|
|  | 21 | template <> | 
|---|
|  | 22 | class Parameter<Vector> : | 
|---|
|  | 23 | public ParameterInterface, | 
|---|
|  | 24 | public ValueInterface<Vector> | 
|---|
|  | 25 | { | 
|---|
|  | 26 | public: | 
|---|
|  | 27 | Parameter(const Parameter<Vector> &instance); | 
|---|
|  | 28 | Parameter(const std::string &_name); | 
|---|
|  | 29 | Parameter(const std::string &_name, const Vector &_value); | 
|---|
|  | 30 | Parameter(const std::string &_name, const Validator<Vector> &_Validator); | 
|---|
|  | 31 | Parameter(const std::string &_name, const Validator<Vector> &_Validator, const Vector &_value); | 
|---|
|  | 32 | Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues); | 
|---|
|  | 33 | Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues, const Vector &_value); | 
|---|
|  | 34 | Parameter(const std::string &_name, const range<Vector> &_ValidRange); | 
|---|
|  | 35 | Parameter(const std::string &_name, const range<Vector> &_ValidRange, const Vector &_value); | 
|---|
|  | 36 | virtual ~Parameter(); | 
|---|
|  | 37 |  | 
|---|
|  | 38 | // wrap the following functions from ValueAsString to add exception information | 
|---|
|  | 39 | bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException); | 
|---|
|  | 40 | const std::string getAsString() const throw(ParameterValueException); | 
|---|
|  | 41 | const std::string getAsStringUnvalidated() const throw(ParameterValueException); | 
|---|
|  | 42 | void setAsString(const std::string &_value) throw(ParameterValueException); | 
|---|
|  | 43 |  | 
|---|
|  | 44 | // wrap the following functions from Value<Vector> to add exception information | 
|---|
|  | 45 | bool isValid(const Vector &_value) const throw(ParameterValidatorException); | 
|---|
|  | 46 | const Vector & get() const throw(ParameterValueException); | 
|---|
|  | 47 | const Vector & getUnvalidated() const throw(ParameterValueException); | 
|---|
|  | 48 | void set(const Vector & _value) throw(ParameterValueException); | 
|---|
|  | 49 | bool isSet() const | 
|---|
|  | 50 | { return value.isSet(); } | 
|---|
|  | 51 |  | 
|---|
|  | 52 | const Validator<Vector> & getValidator() const | 
|---|
|  | 53 | { return value.getValidator(); } | 
|---|
|  | 54 | Validator<Vector> & getValidator() | 
|---|
|  | 55 | { return value.getValidator(); } | 
|---|
|  | 56 |  | 
|---|
|  | 57 | // comparator | 
|---|
|  | 58 | bool operator==(const Parameter<Vector> &_instance) const throw(ParameterException); | 
|---|
|  | 59 | bool operator!=(const Parameter<Vector> &_instance) const throw(ParameterException) | 
|---|
|  | 60 | { return !((*this)==(_instance)); } | 
|---|
|  | 61 |  | 
|---|
|  | 62 | ParameterInterface* clone() const; | 
|---|
|  | 63 |  | 
|---|
|  | 64 | //private: // TODO... | 
|---|
|  | 65 | Parameter(); | 
|---|
|  | 66 |  | 
|---|
|  | 67 | private: | 
|---|
|  | 68 | //!> contained value of this parameter | 
|---|
|  | 69 | Value<Vector> value; | 
|---|
|  | 70 | }; | 
|---|
|  | 71 |  | 
|---|
|  | 72 |  | 
|---|
|  | 73 | #endif /* PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ */ | 
|---|