Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::option::ActionOption Class Referenceabstract

#include <elm/option/ActionOption.h>

+ Inheritance diagram for elm::option::ActionOption:

Public Member Functions

 ActionOption (Manager &manager, char short_name, CString description)
 
 ActionOption (Manager &manager, CString long_name, CString description)
 
 ActionOption (Manager &manager, char short_name, CString long_name, CString description)
 
virtual void perform (void)=0
 
virtual usage_t usage (void)
 
virtual CString argDescription (void)
 
virtual void process (String arg)
 
- Public Member Functions inherited from elm::option::StandardOption
 StandardOption (Manager &manager, int tag,...)
 
 StandardOption (Manager &manager, int tag, VarArg &args)
 
 StandardOption (Manager &manager, char short_name, cstring description)
 
 StandardOption (Manager &manager, cstring long_name, cstring description)
 
 StandardOption (Manager &manager, char short_name, cstring long_name, cstring description)
 
virtual char shortName (void)
 
virtual cstring longName (void)
 
virtual cstring description (void)
 
- Public Member Functions inherited from elm::option::Option
 Option (void)
 
 Option (const Make &make)
 
virtual ~Option (void)
 
void output (io::Output &out)
 

Additional Inherited Members

- Protected Member Functions inherited from elm::option::StandardOption
virtual void configure (Manager &manager, int tag, VarArg &args)
 
- Protected Member Functions inherited from elm::option::Option
void init (Manager &manager, int tag,...)
 
void init (Manager &manager, int tag, VarArg &args)
 
- Protected Attributes inherited from elm::option::Option
cstring desc
 

Detailed Description

This kind of option is used for performing an action when the option is encountered in the command line option. It must be first derived to assign a body to the perform() method before to be used.

Constructor & Destructor Documentation

elm::option::ActionOption::ActionOption ( Manager manager,
char  short_name,
CString  description 
)

Build an action option with a short name.

Parameters
managerParent option manager.
short_nameSingle-letter name.
descriptionOption description.
elm::option::ActionOption::ActionOption ( Manager manager,
CString  long_name,
CString  description 
)

Build an action option with a long name.

Parameters
managerParent option manager.
long_nameMultiple-letter name.
descriptionOption description.
elm::option::ActionOption::ActionOption ( Manager manager,
char  short_name,
CString  long_name,
CString  description 
)

Build an action option with a short name and a long name.

Parameters
managerParent option manager.
short_nameSingle-letter name.
long_nameMultiple-letter name.
descriptionOption description.

Member Function Documentation

CString elm::option::ActionOption::argDescription ( void  )
virtual

If the option requires an argument, get the description of the argument.

Returns
Argument description.

Implements elm::option::Option.

void elm::option::ActionOption::perform ( void  )
pure virtual

Called when the matching option is found. This pure virtual method must be overloaded in order to assign an action with the option.

Referenced by process().

void elm::option::ActionOption::process ( String  arg)
virtual

This method is called by the option manager when the option is encountered.

Parameters
argIf the option requires an argument, the value of the argument.

Implements elm::option::Option.

References perform().

usage_t elm::option::ActionOption::usage ( void  )
virtual

Get the argument usage type of this function.

Returns
Argument usage type.

Implements elm::option::Option.

References elm::option::arg_none.


The documentation for this class was generated from the following files: