18#ifndef BPMNOS_NUMBER_TYPE
19#define BPMNOS_NUMBER_REP int64_t
20#define BPMNOS_NUMBER_SCALE 16
21#define BPMNOS_NUMBER_TYPE cnl::scaled_integer< BPMNOS_NUMBER_REP, cnl::power<-BPMNOS_NUMBER_SCALE> >
28 return std::hash<BPMNOS_NUMBER_REP>()(cnl::unwrap(value));
32#define BPMNOS_NUMBER_PRECISION (1.0 / (1 << BPMNOS_NUMBER_SCALE))
35#ifndef BPMNOS_NUMBER_PRECISION
36#define BPMNOS_NUMBER_PRECISION 1e-6
43 typedef std::unordered_map< std::string, std::optional<number> >
ValueMap;
47 struct Values : std::vector<std::optional<number>> {
52 struct SharedValues : std::vector< std::reference_wrapper< std::optional<number> > > {
59 typedef std::unordered_map< std::string, std::variant< std::optional<number>, std::string > >
VariedValueMap;
61 double stod(
const std::string& str);
62 int stoi(
const std::string& str);
#define BPMNOS_NUMBER_TYPE
std::unordered_map< std::string, std::optional< number > > ValueMap
std::unordered_map< std::string, std::variant< std::optional< number >, std::string > > VariedValueMap
std::string to_string(number numericValue, const ValueType &type)
Converts a number to a string.
number to_number(const std::string &valueString, const ValueType &type)
Converts a string to a number.
BPMNOS_NUMBER_TYPE number
double stod(const std::string &str)
BPMNOS::Values mergeValues(const std::vector< BPMNOS::Values > &valueSets)
int stoi(const std::string &str)
std::variant< bool, int, double, std::string > Value
std::size_t operator()(const BPMNOS_NUMBER_TYPE &value) const