BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
BPMNOS Namespace Reference

Namespaces

namespace  Execution
 
namespace  Keyword
 
namespace  Model
 

Classes

struct  Collection
 
struct  CollectionRegistry
 Utility class for representing collections by numeric values. More...
 
class  CSVReader
 
struct  SharedValues
 
struct  StringRegistry
 Utility class for representing strings by numeric values. More...
 
class  tuple_map
 Wrapper class around std::unordered_map for maps with tuple keys. More...
 
struct  Values
 
class  vector_map
 Wrapper class around std::unordered_map for maps with vector keys. More...
 

Typedefs

typedef BPMNOS_NUMBER_TYPE number
 
typedef std::unordered_map< std::string, std::optional< number > > ValueMap
 
typedef std::unordered_map< std::string, std::variant< std::optional< number >, std::string > > VariedValueMap
 
using RandomGenerator = std::mt19937
 
using RandomDistribution = std::function<double(RandomGenerator &)>
 
typedef std::variant< bool, int, double, std::string > Value
 

Enumerations

enum  ValueType {
  BOOLEAN , INTEGER , DECIMAL , STRING ,
  COLLECTION
}
 

Functions

std::string encodeCollection (std::string text)
 Function to replace a collection that is not preceded by an alphanumeric or underscore.
 
std::string encodeQuotedStrings (std::string text)
 
double stod (const std::string &str)
 
int stoi (const std::string &str)
 
number to_number (const std::string &valueString, const ValueType &type)
 Converts a string to a number.
 
number to_number (const Value &value, const ValueType &type)
 Converts a value to a number.
 
std::string to_string (number numberValue, const ValueType &type)
 Converts a number to a string.
 
BPMNOS::Values mergeValues (const std::vector< BPMNOS::Values > &valueSets)
 
template<class DistributionType , class... Parameters>
RandomDistribution make_distribution_impl (nlohmann::json const &input, Parameters... parameters)
 
RandomDistribution make_distribution (const std::string &jsonString)
 
RandomDistribution make_distribution (const nlohmann::json &input)
 

Typedef Documentation

◆ number

Definition at line 42 of file Number.h.

◆ RandomDistribution

using BPMNOS::RandomDistribution = std::function<double(RandomGenerator &)>

Definition at line 13 of file RandomDistributionFactory.h.

◆ RandomGenerator

using BPMNOS::RandomGenerator = std::mt19937

Definition at line 12 of file RandomDistributionFactory.h.

◆ Value

typedef std::variant< bool, int, double, std::string > BPMNOS::Value

Definition at line 10 of file Value.h.

◆ ValueMap

typedef std::unordered_map< std::string, std::optional<number> > BPMNOS::ValueMap

Definition at line 43 of file Number.h.

◆ VariedValueMap

typedef std::unordered_map< std::string, std::variant< std::optional<number>, std::string > > BPMNOS::VariedValueMap

Definition at line 59 of file Number.h.

Enumeration Type Documentation

◆ ValueType

Enumerator
BOOLEAN 
INTEGER 
DECIMAL 
STRING 
COLLECTION 

Definition at line 9 of file Value.h.

Function Documentation

◆ encodeCollection()

std::string BPMNOS::encodeCollection ( std::string text)
inline

Definition at line 14 of file encode_collection.h.

◆ encodeQuotedStrings()

std::string BPMNOS::encodeQuotedStrings ( std::string text)
inline

Definition at line 16 of file encode_quoted_strings.h.

◆ make_distribution() [1/2]

RandomDistribution BPMNOS::make_distribution ( const nlohmann::json & input)

Definition at line 11 of file RandomDistributionFactory.cpp.

◆ make_distribution() [2/2]

RandomDistribution BPMNOS::make_distribution ( const std::string & jsonString)

Definition at line 6 of file RandomDistributionFactory.cpp.

◆ make_distribution_impl()

template<class DistributionType , class... Parameters>
RandomDistribution BPMNOS::make_distribution_impl ( nlohmann::json const & input,
Parameters... parameters )

Definition at line 16 of file RandomDistributionFactory.h.

◆ mergeValues()

BPMNOS::Values BPMNOS::mergeValues ( const std::vector< BPMNOS::Values > & valueSets)

Returns merged values from a set of values

Definition at line 166 of file Number.cpp.

◆ stod()

double BPMNOS::stod ( const std::string & str)

Definition at line 37 of file Number.cpp.

◆ stoi()

int BPMNOS::stoi ( const std::string & str)

Definition at line 47 of file Number.cpp.

◆ to_number() [1/2]

number BPMNOS::to_number ( const std::string & valueString,
const ValueType & type )

Definition at line 57 of file Number.cpp.

◆ to_number() [2/2]

number BPMNOS::to_number ( const Value & value,
const ValueType & type )

Definition at line 73 of file Number.cpp.

◆ to_string()

std::string BPMNOS::to_string ( number numericValue,
const ValueType & type )

Definition at line 150 of file Number.cpp.