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...
|
| 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.