This is a helper class which defines one command-line argument which is bound with some specific variable. It is an extension of the "argelement" class defined in terms of a template whose parameter is the type of the variable which is to be set based on the value provided in the command line.
More...
#include <capd/auxil/arg.h>
|
| argunit (const char *_name, type &_value) |
| The constructor of a command line argument bound with one variable. More...
|
|
| argunit (const char *_name, type &_value, type defaultvalue) |
| The constructor of a command line argument bound with one variable which has a default value if none found in the command line. More...
|
|
| argunit (const char *_name, type *_value, int &_count, int _size) |
| The constructor of a command line argument bound with an array of the given size. More...
|
|
| argunit (const char *_name, type *_value, int &_count, int _size, type defaultvalue) |
| The constructor of a command line argument bound with an array of the given size; a default value is provided. More...
|
|
int | setvalue (char *str, char *next) |
| Sets the argument value from the text string. More...
|
|
void | restore () |
| Restores the previous argument value (except for tables). More...
|
|
void | show (std::ostream &out) const |
| Displays the value and some information. More...
|
|
const char * | getname () const |
| Returns the name of the command-line argument. More...
|
|
char * | getvalue (char *str) |
| Returns the argument's value string from the argument string or returns 0 if it is not this argument. More...
|
|
void | resetflags () |
| Resets the flags. More...
|
|
void | set (int flag) |
| Sets the given flag. More...
|
|
void | unset (int flag) |
| Unsets (clears) the given flag. More...
|
|
bool | get (int flag) const |
| Returns the value of the given flag. More...
|
|
template<class type>
class capd::auxil::argunit< type >
This is a helper class which defines one command-line argument which is bound with some specific variable. It is an extension of the "argelement" class defined in terms of a template whose parameter is the type of the variable which is to be set based on the value provided in the command line.
◆ argunit() [1/4]
The constructor of a command line argument bound with one variable.
◆ argunit() [2/4]
The constructor of a command line argument bound with one variable which has a default value if none found in the command line.
◆ argunit() [3/4]
The constructor of a command line argument bound with an array of the given size.
◆ argunit() [4/4]
The constructor of a command line argument bound with an array of the given size; a default value is provided.
◆ get()
bool capd::auxil::argelement::get |
( |
int |
flag | ) |
const |
|
inlineinherited |
Returns the value of the given flag.
◆ getname()
const char * capd::auxil::argelement::getname |
( |
| ) |
const |
|
inlineinherited |
Returns the name of the command-line argument.
◆ getvalue()
char * capd::auxil::argelement::getvalue |
( |
char * |
str | ) |
|
|
inherited |
Returns the argument's value string from the argument string or returns 0 if it is not this argument.
◆ resetflags()
void capd::auxil::argelement::resetflags |
( |
| ) |
|
|
inlineinherited |
◆ restore()
◆ set()
void capd::auxil::argelement::set |
( |
int |
flag | ) |
|
|
inlineinherited |
◆ setvalue()
◆ show()
◆ unset()
void capd::auxil::argelement::unset |
( |
int |
flag | ) |
|
|
inlineinherited |
Unsets (clears) the given flag.
The documentation for this class was generated from the following file: