29 #ifndef MU_PARSER_INT_H
30 #define MU_PARSER_INT_H
52 static int Round(
value_type v) {
return (
int)(v + ((v >= 0) ? 0.5 : -0.5)); };
91 class change_dec_sep :
public std::numpunct<TChar>
95 explicit change_dec_sep(
char_type cDecSep,
char_type cThousandsSep = 0,
int nGroup = 3)
96 :std::numpunct<TChar>()
97 , m_cDecPoint(cDecSep)
98 , m_cThousandsSep(cThousandsSep)
104 virtual char_type do_decimal_point()
const
109 virtual char_type do_thousands_sep()
const
111 return m_cThousandsSep;
114 virtual std::string do_grouping()
const
121 return std::string(1, (
char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
136 virtual void InitConst();
137 virtual void InitCharSets();
virtual void InitFun()
Initialize the default functions.
virtual void InitOprt()
Initialize operators.
This file contains the class definition of the muparser engine.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Mathematical expressions parser.
Namespace for mathematical applications.
string_type::value_type char_type
The character type used by the parser.
Mathematical expressions parser (base parser engine).