A cross-platform functional programming language

OptionBase Class Reference

Base class for command line options. More...

#include <CmdLine.hpp>

Inheritance diagram for OptionBase:
OptionCall< ObjT, T > OptionVar< T >

List of all members.

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.

Detailed Description

Base class for command line options.

Constructor & Destructor Documentation

OptionBase ( const z::string sname,
const z::string lname,
const z::string desc 
) [inline]

Default constructor.

snameShort name of option
lnameLong name of option
descDescription of option

Member Function Documentation

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

Handle this option.

isOptionTrue if this is an option
itIterator 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.

strOutput stream
wWidth to print in.

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