Command
0.3
|
#include <argument.h>
Public Types | |
typedef class Argument | Type |
![]() | |
typedef class Parameter | Type |
Public Member Functions | |
Argument (const std::string &description, std::function< void(ParameterType)> function) | |
virtual void | handle () |
virtual bool | understand (const std::string &argv) |
virtual unsigned int | valuePosition (const std::string &) |
![]() | |
Parameter (const std::string &description) | |
virtual void | handle ()=0 |
virtual bool | understand (const std::string &)=0 |
virtual bool | isRequired () |
virtual bool | isUsed () |
virtual bool | hungryForValue () |
virtual unsigned int | valuePosition (const std::string &)=0 |
![]() | |
Descriptive (const std::string &description) | |
const std::string & | describe () |
![]() | |
Callable (std::function< void(ParameterType)> function) | |
Protected Attributes | |
ParameterType | value |
![]() | |
bool | used = false |
![]() | |
std::function< void(ParameterType)> | func |
Additional Inherited Members | |
![]() | |
void | call (ParameterType value) |
Class responsible for handling commandline arguments. Arguments are non-named parameters of program.
Example:
|
inline |
|
inlinevirtual |
Method used for handling method calls linked with this Parameter
Implements command::Parameter.
|
inlinevirtual |
Method used for checking if Argument understands user value. If so current Argument is flagged as used and no more checks against it will be done in future.
argv | command line value against which test will be made. |
Implements command::Parameter.
|
inlinevirtual |
Implements command::Parameter.