Text option for shell parsing.
More...
#include <shell.h>
|
| | operator bool () const |
| | operator const char * () const |
| bool | operator! () const |
| const char * | operator* () const |
| stringopt & | operator= (const char *string) |
| void | set (const char *string) |
|
| stringopt (char short_option, const char *long_option=NULL, const char *help=NULL, const char *type="text", const char *def_text=NULL) |
| 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.
|
|
| virtual const char * | assign (const char *value) |
| | Used to send option into derived receiver.
|
| | LinkedObject () |
| | Construct base class unattached to anyone.
|
|
| LinkedObject (const LinkedObject &from) |
| | LinkedObject (LinkedObject **root) |
| | Construct base class attached to a chain of objects.
|
Text option for shell parsing.
This offers a quick-use class to parse a shell flag, along with a numeric text that may be saved and a use counter, as multiple invocations is an error.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 295 of file shell.h.
◆ assign()
| virtual const char * ucommon::shell::stringopt::assign |
( |
const char * | value | ) |
|
|
protectedvirtual |
Used to send option into derived receiver.
- Parameters
-
| value | option that was received. |
- Returns
- NULL or error string to use.
Implements ucommon::shell::Option.
◆ operator bool()
| ucommon::shell::stringopt::operator bool |
( |
| ) |
const |
|
inline |
◆ operator const char *()
| ucommon::shell::stringopt::operator const char * |
( |
| ) |
const |
|
inline |
◆ operator!()
| bool ucommon::shell::stringopt::operator! |
( |
| ) |
const |
|
inline |
◆ operator*()
| const char * ucommon::shell::stringopt::operator* |
( |
| ) |
const |
|
inline |
◆ operator=()
| stringopt & ucommon::shell::stringopt::operator= |
( |
const char * | string | ) |
|
|
inline |
◆ set()
| void ucommon::shell::stringopt::set |
( |
const char * | string | ) |
|
|
inline |
◆ text
| const char* ucommon::shell::stringopt::text |
|
protected |
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