* @param description Description of current Argument
* @param function Function used to handle current Argument.
*/
- Argument(std::string description, void (*function)(ArgumentType))
+ Argument(const std::string & description, void (*function)(ArgumentType))
: Parameter(description), Callable<ArgumentType>(function) {
}
virtual ~Argument() { }
* @param description Description of current Option
* @param function Function used to handle current Option.
*/
- Option(std::string name, std::string description, void (*function)(OptionType))
+ Option(std::string name, const std::string & description, void (*function)(OptionType))
: Parameter(description), Callable<OptionType>(function), name(name) {
}
virtual ~Option() { }
*
* @param description Description of current Argument
*/
- Parameter(std::string description)
+ Parameter(const std::string & description)
: Descriptive(description) {
}
virtual ~Parameter() {}
};
int main() {
-
TestCallable<bool> callable(function);
callable.callFunction(true);
class TestParameter : public command::Parameter {
public:
- TestParameter(std::string description) : Parameter(description) { }
+ TestParameter(const std::string & description) : Parameter(description) { }
virtual void handle() { }
virtual bool understand(const std::string & argVal) { }