plll
1.0
|
Stores the value of one command line argument. More...
#include <arguments.hpp>
Public Member Functions | |
double | getFloat () const |
Return floating point value. More... | |
long | getInteger () const |
Return integer value. More... | |
const std::string & | getText () const |
Returns the raw text value. More... | |
bool | hasOverflow () const |
Checks for overflows. More... | |
bool | isEmpty () const |
Tests whether value is empty. More... | |
bool | isFloat () const |
Informs whether the result is a floating point number. More... | |
bool | isInteger () const |
Informs whether the result is an integer. | |
bool | isText () const |
Returns whether the value is text. More... | |
Stores the value of one command line argument.
Definition at line 66 of file arguments.hpp.
|
inline |
Return floating point value.
Returns the (native) floating point value, or 0 in case isFloat()
returns false
. Undefined in case of hasOverflow() == true
.
Definition at line 173 of file arguments.hpp.
|
inline |
Return integer value.
Returns the (native) integer value, or 0 in case isInteger()
returns false
. Undefined in case of hasOverflow() == true
.
Definition at line 152 of file arguments.hpp.
|
inline |
Returns the raw text value.
Returns the raw text value of the command line argument, i.e. the part after =
in --blah=value
. In case no =
was found, -blah
(for --blah
) or blah
(for -blah
) itself is returned.
Definition at line 120 of file arguments.hpp.
|
inline |
Checks for overflows.
Informs in case of an integer or floating point number whether an overflow occured while casting to a native type. In case this returns true
, one should use getText()
and parse the result using plll::arithmetic::Integer
respectively plll::arithmetic::Real
.
Definition at line 133 of file arguments.hpp.
|
inline |
Tests whether value is empty.
Allows to test whether the command line argument had a value or not. An argument of the type --blah
will have isEmpty() == true
, while an argument of the type --blah=
will have isEmpty() == false
.
Definition at line 97 of file arguments.hpp.
|
inline |
Informs whether the result is a floating point number.
Informs whether the result is a floating point number.
Definition at line 162 of file arguments.hpp.
|
inline |
Returns whether the value is text.
Informs whether the command line argument's value is not an integer, floating point number or anything else which could be parsed.
Definition at line 108 of file arguments.hpp.