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::StandardOption Class Reference

#include <elm/option/StandardOption.h>

+ Inheritance diagram for elm::option::StandardOption:

Public Member Functions

 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)
 
virtual usage_t usage (void)=0
 
virtual cstring argDescription (void)=0
 
virtual void process (String arg)=0
 

Protected Member Functions

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)
 

Additional Inherited Members

- Protected Attributes inherited from elm::option::Option
cstring desc
 

Detailed Description

This abstract class factorize the handling of options (short and long) and option description.

Constructor & Destructor Documentation

elm::option::StandardOption::StandardOption ( Manager manager,
int  tag,
  ... 
)
elm::option::StandardOption::StandardOption ( Manager manager,
int  tag,
VarArg args 
)
elm::option::StandardOption::StandardOption ( Manager manager,
char  short_name,
cstring  description 
)

Build an option with a short name.

Parameters
managerParent option manager.
short_nameSingle letter name.
descriptionOption description.
Deprecated:

References elm::option::description, elm::option::end, elm::option::Option::init(), and elm::option::short_cmd.

elm::option::StandardOption::StandardOption ( Manager manager,
cstring  long_name,
cstring  description 
)

Build an option with a long name.

Parameters
managerParent option manager.
long_nameMultiple letter name.
descriptionOption description.
Deprecated:

References elm::option::description, elm::option::end, elm::option::Option::init(), and elm::option::long_cmd.

elm::option::StandardOption::StandardOption ( Manager manager,
char  short_name,
cstring  long_name,
cstring  description 
)

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

Parameters
managerParent option manager.
short_nameSingle letter name.
long_nameMultiple letter name.
descriptionOption description.
Deprecated:

References elm::option::description, elm::option::end, elm::option::Option::init(), elm::option::long_cmd, and elm::option::short_cmd.

Member Function Documentation

void elm::option::StandardOption::configure ( Manager manager,
int  tag,
VarArg args 
)
protectedvirtual

Handle a configuration tag and its value. May be override for extending the Option class but do no forget to call back the original configure() method.

Parameters
managerOwner manager.
tagCurrent tag.
argsList of arguments.

Reimplemented from elm::option::Option.

References elm::option::Option::configure(), elm::option::description, and elm::VarArg::next().

CString elm::option::StandardOption::description ( void  )
virtual

Get the description of the option.

Returns
Option description.

Reimplemented from elm::option::Option.

CString elm::option::StandardOption::longName ( void  )
virtual

Get the multi-character long name of the option.

Returns
Multi-character or an empty string if there is no long name.
Deprecated:

Reimplemented from elm::option::Option.

char elm::option::StandardOption::shortName ( void  )
virtual

Get the single-character short name of the option.

Returns
Single character or '\0' if there is no short name.
Deprecated:

Reimplemented from elm::option::Option.


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