/* * StringParameter.hpp * * Created on: Sep 30, 2011 * Author: heber */ #ifndef STRINGPARAMETER_HPP_ #define STRINGPARAMETER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "ValueInterface.hpp" #include "Parameter.hpp" /** This class encapsulates a string value * * This is for consistency, as there is no invalid string to be got from and * stored in a string, in the sense of ContinuousParameter. * */ class StringParameter : public Parameter, virtual public ValueInterface { public: StringParameter(const std::string &_name); StringParameter(const std::string &_name, const std::string &_value); virtual ~StringParameter(); // ValueInterface implemenations bool isValid(const std::string _value) const; const std::string get() const; void set(const std::string _value); // comparator bool operator==(const StringParameter &_instance) const; bool operator!=(const StringParameter &_instance) const { return !((*this)==(_instance)); } Parameter* clone() const; private: //!> whether value has been set or not bool ValueSet; //!> encapsulated value std::string value; }; #endif /* STRINGPARAMETER_HPP_ */