A cross-platform functional programming language

OptionCall< ObjT, T > Class Template Reference

Base class for option functions. More...

#include <CmdLine.hpp>

Inheritance diagram for OptionCall< ObjT, T >:

List of all members.

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.

Detailed Description

template<typename ObjT, typename T>
class zbl::OptionCall< ObjT, T >

Base class for option functions.

Constructor & Destructor Documentation

OptionCall ( const z::string sname,
const z::string lname,
const z::string desc,
ObjT &(ObjT::*)(const T &val)  fn,
ObjT &  obj 
) [inline]

Default constructor.

snameShort name of option
lnameLong name of option
descDescription of option
fnFunction to call for this option
objObject on which to call this function

Member Function Documentation

virtual void handle ( const bool &  isOption,
z::stringlist::iterator &  it 
) [inline, virtual]

Handle this option.

isOptionTrue if this is an option
itIterator pointing to current position in argument list

Implements OptionBase.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines