UCommon
Public Member Functions | Protected Member Functions | Protected Attributes
ucommon::shell::numericopt Class Reference

Numeric option for shell parsing. More...

#include <shell.h>

Inheritance diagram for ucommon::shell::numericopt:
Inheritance graph
[legend]
Collaboration diagram for ucommon::shell::numericopt:
Collaboration graph
[legend]

Public Member Functions

 numericopt (char short_option, char *long_option=((void *) 0), char *help=((void *) 0), char *type="numeric", long def_value=0)
 operator bool ()
 operator long ()
bool operator! ()
long operator* ()
void set (long value)
- Public Member Functions inherited from ucommon::shell::Option
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.
- Public Member Functions inherited from ucommon::OrderedObject
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.
OrderedObjectgetNext (void)
 Get next ordered member when iterating.
- Public Member Functions inherited from ucommon::LinkedObject
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.
- Public Member Functions inherited from ucommon::ObjectProtocol
ObjectProtocolcopy (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.

Protected Member Functions

virtual char * assign (char *value)
 Used to send option into derived receiver.

Protected Attributes

long number

Additional Inherited Members

- Static Public Member Functions inherited from ucommon::shell::Option
static LinkedObjectfirst (void)
static void reset (void)
- Data Fields inherited from ucommon::shell::Option
char * help_string
char * long_option
char short_option
bool trigger_option
char * uses_option

Detailed Description

Numeric option for shell parsing.

This offers a quick-use class to parse a shell flag, along with a numeric value 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 499 of file shell.h.


Member Function Documentation

virtual char* ucommon::shell::numericopt::assign ( char *  value)
protectedvirtual

Used to send option into derived receiver.

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

Implements ucommon::shell::Option.


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