Flow123d
JB-rel-int-test-d1b4358
|
Class manages parsing of user defined field unit. More...
#include <unit_converter_template.hh>
Public Member Functions | |
Semantic_actions () | |
Constructor. More... | |
void | new_shortcut (Iter_type begin, Iter_type end) |
Add new definition of formula. More... | |
void | new_mult_factor (Iter_type begin, Iter_type end) |
Add new factor of unit (factor is multiplying) More... | |
void | new_div_factor (Iter_type begin, Iter_type end) |
Add new factor of unit (factor is dividing) More... | |
void | new_exp (boost::int64_t i) |
Compute exponent to actual factor of unit. More... | |
void | new_multipl (double d) |
Add multipicative coeficient of unit. More... | |
void | throw_exp_not_int (Iter_type begin, Iter_type end) |
Throw exception if exponent is not in correct format. More... | |
void | throw_not_shortcut (Iter_type begin, Iter_type end) |
Throw exception if shortcut of factor is not in correct format. More... | |
void | throw_not_equating (Iter_type begin, Iter_type end) |
Throw exception if sign '=' missing in definition. More... | |
void | check_unit_data () |
Check unit_data_ object. More... | |
UnitData | unit_data () const |
Private Member Functions | |
Semantic_actions & | operator= (const Semantic_actions &) |
std::string | get_str (std::string::const_iterator begin, std::string::const_iterator end) const |
Private Attributes | |
UnitData | unit_data_ |
Full parsed data. More... | |
std::string | unit_data_key_ |
key of actual item of unit_data_ More... | |
int | factor_idx_ |
index to actual item of subvector of factors of unit_data_ More... | |
Class manages parsing of user defined field unit.
Class contains:
UnitData
for storing user defined unitFor example, unit is defined in format: "MPa/rho/g_; rho = 990*kg*m^-3; g_ = 9.8*m*s^-2"
Definition at line 73 of file unit_converter_template.hh.
|
inline |
Constructor.
Definition at line 77 of file unit_converter_template.hh.
|
inline |
Check unit_data_
object.
Method:
Definition at line 155 of file unit_converter_template.hh.
|
inlineprivate |
Definition at line 192 of file unit_converter_template.hh.
|
inline |
Add new factor of unit (factor is dividing)
Definition at line 100 of file unit_converter_template.hh.
|
inline |
Compute exponent to actual factor of unit.
Definition at line 107 of file unit_converter_template.hh.
|
inline |
Add new factor of unit (factor is multiplying)
Definition at line 93 of file unit_converter_template.hh.
|
inline |
Add multipicative coeficient of unit.
Definition at line 113 of file unit_converter_template.hh.
|
inline |
Add new definition of formula.
Definition at line 84 of file unit_converter_template.hh.
|
private |
|
inline |
Throw exception if exponent is not in correct format.
Definition at line 119 of file unit_converter_template.hh.
|
inline |
Throw exception if sign '=' missing in definition.
Definition at line 139 of file unit_converter_template.hh.
|
inline |
Throw exception if shortcut of factor is not in correct format.
Definition at line 127 of file unit_converter_template.hh.
|
inline |
Definition at line 185 of file unit_converter_template.hh.
|
private |
index to actual item of subvector of factors of unit_data_
Definition at line 200 of file unit_converter_template.hh.
|
private |
Full parsed data.
Definition at line 198 of file unit_converter_template.hh.
|
private |
key of actual item of unit_data_
Definition at line 199 of file unit_converter_template.hh.