UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
Int_Parameter Class Reference

#include <textfile_parser.hpp>

Inheritance diagram for Int_Parameter:
Parameter UnsignedInt_Parameter

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 TextFileParserparser
 

Additional Inherited Members

- Protected Member Functions inherited from Parameter
 Parameter (const char *name, bool unique=true)
 

Detailed Description

This is an example of specific parameter, that reads int value.

Constructor & Destructor Documentation

Int_Parameter::Int_Parameter ( const char *  name)
inline

Constructor for specifying parameter's name.

Member Function Documentation

void Int_Parameter::set_value ( const char *  strint)
throw (param_exception
)
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.


The documentation for this class was generated from the following file: