![]() |
Zen
A cross-platform functional programming language
|
Base class for command line options. More...
#include <CmdLine.hpp>
Public Member Functions | |
| OptionBase (const z::string &sname, const z::string &lname, const z::string &desc) | |
| Default constructor. | |
| virtual void | handle (const bool &isOption, z::stringlist::iterator &it)=0 |
| Handle this option. | |
| void | show (z::stream &str, const int &w=32) const |
| Print this option on output stream. | |
Private Attributes | |
| z::string | _sname |
| Short name of option. | |
| z::string | _lname |
| Long name of option. | |
| z::string | _desc |
| Description of option. | |
Base class for command line options.
| OptionBase | ( | const z::string & | sname, |
| const z::string & | lname, | ||
| const z::string & | desc | ||
| ) | [inline] |
Default constructor.
| sname | Short name of option |
| lname | Long name of option |
| desc | Description of option |
| virtual void handle | ( | const bool & | isOption, |
| z::stringlist::iterator & | it | ||
| ) | [pure virtual] |
Handle this option.
| isOption | True if this is an option |
| it | Iterator pointing to current position in argument list |
Implemented in OptionVar< T >, and OptionCall< ObjT, T >.
| void show | ( | z::stream & | str, |
| const int & | w = 32 |
||
| ) | const [inline] |
Print this option on output stream.
| str | Output stream |
| w | Width to print in. |