A base class used to create parsable shell options.
More...
#include <shell.h>
Public Member Functions |
virtual char * | assign (char *value)=0 |
| Used to send option into derived receiver.
|
void | disable (void) |
| Disable a option.
|
| Option (char short_option=0, char *long_option=((void *) 0), char *value_type=((void *) 0), char *help=((void *) 0)) |
| Construct a shell parser option.
|
void | delist (OrderedIndex *index) |
| Remove our ordered object from an existing index.
|
virtual void | enlist (OrderedIndex *index) |
| List our ordered object in default strategy mode.
|
void | enlistHead (OrderedIndex *index) |
| List our ordered object at start of a linked list on an index.
|
void | enlistTail (OrderedIndex *index) |
| List our ordered object at end of a linked list on an index.
|
OrderedObject * | getNext (void) |
| Get next ordered member when iterating.
|
void | delist (LinkedObject **root) |
| Locate and remove ourselves from a list of objects.
|
void | enlist (LinkedObject **root) |
| Add our object to an existing linked list through a pointer.
|
bool | isMember (LinkedObject *list) |
| Search to see if we are a member of a specific list.
|
virtual void | release (void) |
| Release list, mark as no longer linked.
|
virtual void | retain (void) |
| Retain by marking as self referenced list.
|
ObjectProtocol * | copy (void) |
| Retain (increase retention of) object when copying.
|
void | operator++ (void) |
| Increase retention operator.
|
void | operator-- (void) |
| Decrease retention operator.
|
virtual | ~ObjectProtocol () |
| Required virtual destructor.
|
Static Public Member Functions |
static LinkedObject * | first (void) |
static void | reset (void) |
Data Fields |
char * | help_string |
char * | long_option |
char | short_option |
bool | trigger_option |
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.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 337 of file shell.h.
Constructor & Destructor Documentation
ucommon::shell::Option::Option |
( |
char |
short_option = 0 , |
|
|
char * |
long_option = ((void *) 0) , |
|
|
char * |
value_type = ((void *) 0) , |
|
|
char * |
help = ((void *) 0) |
|
) |
| |
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 char* ucommon::shell::Option::assign |
( |
char * |
value | ) |
|
|
pure virtual |
void ucommon::shell::Option::disable |
( |
void |
| ) |
|
Disable a option.
Might happen if argv0 name suggests an option is no longer actively needed.
The documentation for this class was generated from the following file: