ucc::shell::Option Class Reference

A base class used to create parsable shell options. More...

#include <shell.h>

Inheritance diagram for ucc::shell::Option:
Inheritance graph
[legend]
Collaboration diagram for ucc::shell::Option:
Collaboration graph
[legend]

Public Member Functions

virtual const char * assign (const char *value)=0
 Used to send option into derived receiver.
 Option (char short_option=0, const char *long_option=NULL, const char *value_type=NULL, const char *help=NULL)
 Construct a shell parser option.

Static Public Member Functions

static LinkedObjectfirst (void)

Data Fields

const char * help_string
const char * long_option
char short_option
const char * uses_option

Detailed Description

A base class used to create parsable shell options.

The virtual is invoked when the shell option is detected. Both short and long forms of argument parsing are supported. An instance of a derived class is created to perform the argument parsing.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 279 of file shell.h.


Constructor & Destructor Documentation

ucc::shell::Option::Option ( char  short_option = 0,
const char *  long_option = NULL,
const char *  value_type = NULL,
const char *  help = NULL 
)

Construct a shell parser option.

Parameters:
short_option for single character code.
long_option for extended string.
value_type if -x value or -long=yyy.
help string, future use.

Member Function Documentation

virtual const char* ucc::shell::Option::assign ( const char *  value  )  [pure virtual]

Used to send option into derived receiver.

Parameters:
value option that was received.
Returns:
NULL or error string to use.

Implemented in ucc::shell::stringopt, ucc::shell::charopt, and ucc::shell::numericopt.


The documentation for this class was generated from the following file:
Generated on Tue Jul 6 08:22:47 2010 for UCommon by  doxygen 1.6.3