Diana
0.8.3
|
#include <CapeParameter.hpp>
Public Member Functions | |
virtual const Common::Types::CapeString & | DefaultValue () const =0 throw (Common::Error::ECapeUnknown) |
virtual const Common::Types::CapeArrayString & | OptionList () const =0 throw (Common::Error::ECapeUnknown) |
virtual Common::Types::CapeBoolean | RestrictedToList () const =0 throw (Common::Error::ECapeUnknown) |
virtual Common::Types::CapeBoolean | Validate (Common::Types::CapeString value, Common::Types::CapeString &message)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ICapeOptionParameterSpec &pspec) |
Option parameter specification. Specification defines options list and default value.
virtual const Common::Types::CapeString& DefaultValue | ( | ) | const throw (Common::Error::ECapeUnknown) [pure virtual] |
Gets the default value that the parameter will take. Since it does not indicate an index of the option list, it is allowed to set any default value when the optionList is empty.
Implemented in DianaOptionParameterSpec.
virtual const Common::Types::CapeArrayString& OptionList | ( | ) | const throw (Common::Error::ECapeUnknown) [pure virtual] |
Gets the list of possible values that the parameter may take. If attribute restrictedToList is false, then the parameter may also accept other values.
Implemented in DianaOptionParameterSpec.
virtual Common::Types::CapeBoolean RestrictedToList | ( | ) | const throw (Common::Error::ECapeUnknown) [pure virtual] |
States whether the parameter allows to set values different to the ones contained in the option list.
Implemented in DianaOptionParameterSpec.
virtual Common::Types::CapeBoolean Validate | ( | Common::Types::CapeString | value, |
Common::Types::CapeString & | message | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl) [pure virtual] |
Validates whether the string argument is accepted by the parameter as a valid value. It returns a flag to indicate the success or failure of the validation together with a text message which can be used to convey the reasoning to the client/user.
value | the value of the parameter to validate |
message | message conveying information regarding the validation |
Implemented in DianaOptionParameterSpec.
std::ostream& operator<< | ( | std::ostream & | os, |
const ICapeOptionParameterSpec & | pspec | ||
) | [friend] |
ostream output operator for the ICapeOptionParameterSpec class.