A base class used to create parsable shell options.
More...
#include <shell.h>
|
virtual const char * | assign (const char *value)=0 |
| Used to send option into derived receiver.
|
|
void | disable (void) |
| Disable a 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.
|
|
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.
|
|
LinkedObject * | getNext (void) const |
| Get next effective object when iterating.
|
|
bool | is_member (LinkedObject *list) const |
| 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.
|
|
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 186 of file shell.h.
◆ Option()
ucommon::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. |
◆ assign()
virtual const char * ucommon::shell::Option::assign |
( |
const char * | value | ) |
|
|
pure virtual |
◆ disable()
void ucommon::shell::Option::disable |
( |
void | | ) |
|
Disable a option.
Might happen if argv0 name suggests an option is no longer actively needed.
◆ help_string
const char* ucommon::shell::Option::help_string |
◆ long_option
const char* ucommon::shell::Option::long_option |
◆ short_option
char ucommon::shell::Option::short_option |
◆ trigger_option
bool ucommon::shell::Option::trigger_option |
◆ uses_option
const char* ucommon::shell::Option::uses_option |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/ucommon-7.0.0-build/ucommon-7.0.0/inc/ucommon/shell.h