Slice Tools
Home
SourceForge Page
libFoundation
Home
Class Hierarchy
Class List
Class Members
Examples
|
|
FloatOptionResult Class Reference#include <OptionResult.hh>
Inheritance diagram for FloatOptionResult:
List of all members.
Detailed Description
Class for managing results of Floats.
|
Public Member Functions |
| FloatOptionResult (const std::string &optionHelp, float *result) |
| Constructor sets defaults for float class, constructs baseclass.
|
| ~FloatOptionResult () |
| Empty deconstructor.
|
void | writeDefault () |
| If a result pointer is set, prints out its value.
|
void | setVal (const std::string &name, const std::string &val) |
| Converts a string value into an float value, and writes it to the result.
|
Constructor & Destructor Documentation
FloatOptionResult::FloatOptionResult |
( |
const std::string & |
optionHelp, |
|
|
float * |
result |
|
) |
|
|
|
Constructor sets defaults for float class, constructs baseclass.
|
Member Function Documentation
void FloatOptionResult::setVal |
( |
const std::string & |
name, |
|
|
const std::string & |
val |
|
) |
[virtual] |
|
|
Converts a string value into an float value, and writes it to the result.
Increments the counter for the result being set, verifies value, saves it as the raw value, and writes the float form to the result pointer if it was set.
- See also:
- validateArgumentCount
- Exceptions:
-
InvalidOptionError | If non-float data is in value |
Implements OptionResult. |
void FloatOptionResult::writeDefault |
( |
|
) |
[virtual] |
|
|
If a result pointer is set, prints out its value.
Note: This is identical in the concrete classes, because the base class has no concept of a result pointer
Implements OptionResult. |
The documentation for this class was generated from the following files:
|