1 #ifndef __COMMAND_PARAMETER_H
2 #define __COMMAND_PARAMETER_H
6 #include "descriptive.h"
11 * Base class for all the Arguments and Options.
16 class Parameter : public Descriptive {
18 /** Variable indicating if current Parameter was already used or not */
22 typedef class Parameter Type;
24 * Default constructor.
26 * @param description Description of current Argument
28 Parameter(const std::string & description)
29 : Descriptive(description) {
32 virtual ~Parameter() { }
35 * Method used for handling method calls linked with this Parameter
37 virtual void handle() = 0;
40 * Method used for checking if the given user value understandable for
43 * @return true if passed value is understandable by current Parameter.
46 virtual bool understand(const std::string & ) = 0;
49 * Indicates if current Parameter is required
51 * @return false, as all Parameters are non-required by default. If you
52 * want to make Parameter as required, wrap it using Required class
54 virtual bool isRequired() {
59 * Indicates if current Parameter has been already used
61 * @return true if current Parameter has been already used. False otherwise.
63 virtual bool isUsed() {
69 #endif /* __COMMAND_PARAMETER_H */