Functions | |
bool | parseBoolean (bool versatile, const char *s, const char *stop=0) throw (ParseException) |
Produce a boolean value from the contents of a string. | |
int | parseInteger (bool acceptSign, const char *s, const char *stop=0) throw (ParseException) |
Produce an integer value from the contents of a string. | |
double | parseDouble (const char *s, const char *stop=0) throw (ParseException) |
Produce a floating point value from the contents of a string. | |
string | parseString (const char *s, const char *stop) throw (ParseException) |
Produce a non-empty string value from the contents of a string. |
|
Produce a boolean value from the contents of a string.
/^(true|false)$/i
In versatile mode it becomes:
/^(true|false|[0-9]+|y|n|yes|no|on|off)$/i
Definition at line 49 of file parse_values.C. References parseInteger(). Referenced by Archon::Utilities::Options::Parser< T >::parse(). |
|
Produce a floating point value from the contents of a string.
/^(\+|-)?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(e(\+|-)?[0-9]+)?$/i
Definition at line 102 of file parse_values.C. References parseInteger(). Referenced by Archon::Utilities::Options::Parser< T >::parse(). |
|
Produce an integer value from the contents of a string.
/^[0-9]+$/
When signs are allowed it becomes:
/^(\+|-)?[0-9]+$/
Definition at line 71 of file parse_values.C. Referenced by Archon::Utilities::Options::Parser< T >::parse(), parseBoolean(), and parseDouble(). |
|
Produce a non-empty string value from the contents of a string.
/^.+$/
Definition at line 153 of file parse_values.C. |