ucc::shell::counteropt Class Reference

Counter option for shell parsing. More...

#include <shell.h>

Inheritance diagram for ucc::shell::counteropt:

Inheritance graph
[legend]
Collaboration diagram for ucc::shell::counteropt:

Collaboration graph
[legend]

Public Member Functions

 counteropt (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)

Protected Member Functions

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

Protected Attributes

long number

Detailed Description

Counter 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. Unlike numeric options, the short mode flag is a trigger option, and each use of the short flag is considered a counter increment.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 531 of file shell.h.


Member Function Documentation

virtual char* ucc::shell::counteropt::assign ( char *  value  )  [protected, virtual]

Used to send option into derived receiver.

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

Implements ucc::shell::Option.


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

Generated on Tue May 17 12:15:43 2011 for UCommon by  doxygen 1.5.6