UCommon

shell::numericopt Class Reference

Numeric option for shell parsing. More...

#include <shell.h>

Inheritance diagram for shell::numericopt:
Collaboration diagram for shell::numericopt:

Public Member Functions

 numericopt (char short_option, const char *long_option=NULL, const char *help=NULL, const char *type="numeric", long def_value=0)
 operator bool ()
 operator long ()
bool operator! ()
long operator* ()
void set (long value)

Protected Member Functions

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

Protected Attributes

long number

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@gnutelephony.org>
Examples:

shell.cpp.

Definition at line 481 of file shell.h.


Member Function Documentation

virtual const char* shell::numericopt::assign ( const char *  value) [protected, virtual]

Used to send option into derived receiver.

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

Implements shell::Option.


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