UNIVERS
15.3
UNIVERS base processing software API
|
#include <textfile_parser.hpp>
Public Member Functions | |
Int_Parameter (const char *name) | |
void | set_value (const char *strint) throw (param_exception) |
int | get_value () const |
Public Member Functions inherited from Parameter | |
const std::string & | get_name () const |
bool | is_inited () const |
bool | is_unique () const |
Protected Attributes | |
int | value |
Protected Attributes inherited from Parameter | |
bool | is_init |
bool | is_uniq |
const TextFileParser * | parser |
Additional Inherited Members | |
Protected Member Functions inherited from Parameter | |
Parameter (const char *name, bool unique=true) | |
This is an example of specific parameter, that reads int value.
|
inline |
Constructor for specifying parameter's name.
|
inlinevirtual |
Reads value from given char string. Here we need to parse integer value from string. Note, that at this moment strint has no spaces or tabs (or other predefined delimeters) at it's begin and end. If there is something wrong with given string we need to throw param_exception. Each specific Parameter subclass has value field of proper type. For this class type of this field must be int. After parsing you will able to get this value by method get_value(). (See example.cpp).
Implements Parameter.
Reimplemented in UnsignedInt_Parameter.