Zen
A cross-platform functional programming language
|
Base class for option functions. More...
#include <CmdLine.hpp>
Public Member Functions | |
OptionCall (const z::string &sname, const z::string &lname, const z::string &desc, ObjT &(ObjT::*fn)(const T &val), ObjT &obj) | |
Default constructor. | |
virtual void | handle (const bool &isOption, z::stringlist::iterator &it) |
Handle this option. | |
Private Attributes | |
ObjT &(ObjT::* | _fn )(const T &val) |
Function to call for this option. | |
ObjT & | _obj |
Object on which to call this function. |
Base class for option functions.
OptionCall | ( | const z::string & | sname, |
const z::string & | lname, | ||
const z::string & | desc, | ||
ObjT &(ObjT::*)(const T &val) | fn, | ||
ObjT & | obj | ||
) | [inline] |
Default constructor.
sname | Short name of option |
lname | Long name of option |
desc | Description of option |
fn | Function to call for this option |
obj | Object on which to call this function |
virtual void handle | ( | const bool & | isOption, |
z::stringlist::iterator & | it | ||
) | [inline, virtual] |
Handle this option.
isOption | True if this is an option |
it | Iterator pointing to current position in argument list |
Implements OptionBase.