This is a helper class which defines common properties of a command-line argument bound with any type of a variable.
More...
#include <capd/auxil/arg.h>
|
| argelement (const char *_name) |
| The constructor. More...
|
|
virtual | ~argelement () |
| The destructor. 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...
|
|
virtual int | setvalue (char *str, char *next)=0 |
| Sets the value of this argument according to the string. If necessary, the next argument may be used. Returns: 0 = Ok, -1 = Error, 1 = next used. More...
|
|
virtual void | restore ()=0 |
| Restores the previous argument value (except for tables). More...
|
|
virtual void | show (std::ostream &out) const =0 |
| Outputs the argument element to the output stream. 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...
|
|
This is a helper class which defines common properties of a command-line argument bound with any type of a variable.
◆ argelement()
capd::auxil::argelement::argelement |
( |
const char * |
_name | ) |
|
|
inline |
◆ ~argelement()
capd::auxil::argelement::~argelement |
( |
| ) |
|
|
inlinevirtual |
◆ get()
bool capd::auxil::argelement::get |
( |
int |
flag | ) |
const |
|
inline |
Returns the value of the given flag.
◆ getname()
const char * capd::auxil::argelement::getname |
( |
| ) |
const |
|
inline |
Returns the name of the command-line argument.
◆ getvalue()
char * capd::auxil::argelement::getvalue |
( |
char * |
str | ) |
|
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 |
( |
| ) |
|
|
inline |
◆ restore()
virtual void capd::auxil::argelement::restore |
( |
| ) |
|
|
pure virtual |
◆ set()
void capd::auxil::argelement::set |
( |
int |
flag | ) |
|
|
inline |
◆ setvalue()
virtual int capd::auxil::argelement::setvalue |
( |
char * |
str, |
|
|
char * |
next |
|
) |
| |
|
pure virtual |
Sets the value of this argument according to the string. If necessary, the next argument may be used. Returns: 0 = Ok, -1 = Error, 1 = next used.
Implemented in capd::auxil::argunit< type >.
◆ show()
virtual void capd::auxil::argelement::show |
( |
std::ostream & |
out | ) |
const |
|
pure virtual |
◆ unset()
void capd::auxil::argelement::unset |
( |
int |
flag | ) |
|
|
inline |
Unsets (clears) the given flag.
The documentation for this class was generated from the following files: