BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
BPMNOS::Model::Expression Class Reference

Class representing a mathematical expression. More...

Detailed Description

Definition at line 17 of file Expression.h.

#include <Expression.h>

Public Types

enum class  Type { UNASSIGN , IS_NULL , IS_NOT_NULL , OTHER }
 

Public Member Functions

 Expression (const std::string expression, const AttributeRegistry &attributeRegistry, bool newTarget=false)
 
const AttributeisAttribute () const
 Returns pointer to the attribute if and only if expression contains nothing else.
 
template<typename DataType >
std::optional< BPMNOS::numberexecute (const BPMNOS::Values &status, const DataType &data, const BPMNOS::Values &globals) const
 

Public Attributes

const AttributeRegistryattributeRegistry
 
const std::string expression
 
const LIMEX::Expression< double > compiled
 
const Type type
 
std::optional< const Attribute * > target
 
std::set< const Attribute * > inputs
 Vector containing all input attributes and collections used by the expression.
 
std::vector< const Attribute * > variables
 Vector containing all input attributes used by the expression.
 
std::vector< const Attribute * > collections
 Vector containing all input collections used by the expression.
 

Member Enumeration Documentation

◆ Type

Enumerator
UNASSIGN 
IS_NULL 
IS_NOT_NULL 
OTHER 

Definition at line 19 of file Expression.h.

Constructor & Destructor Documentation

◆ Expression()

Expression::Expression ( const std::string expression,
const AttributeRegistry & attributeRegistry,
bool newTarget = false )

Definition at line 8 of file Expression.cpp.

Member Function Documentation

◆ execute()

template<typename DataType >
std::optional< BPMNOS::number > Expression::execute ( const BPMNOS::Values & status,
const DataType & data,
const BPMNOS::Values & globals ) const

Definition at line 111 of file Expression.cpp.

◆ isAttribute()

const Attribute * Expression::isAttribute ( ) const

Definition at line 98 of file Expression.cpp.

Member Data Documentation

◆ attributeRegistry

const AttributeRegistry& BPMNOS::Model::Expression::attributeRegistry

Definition at line 21 of file Expression.h.

◆ collections

std::vector<const Attribute*> BPMNOS::Model::Expression::collections

Definition at line 28 of file Expression.h.

◆ compiled

const LIMEX::Expression<double> BPMNOS::Model::Expression::compiled

Definition at line 23 of file Expression.h.

◆ expression

const std::string BPMNOS::Model::Expression::expression

Definition at line 22 of file Expression.h.

◆ inputs

std::set<const Attribute*> BPMNOS::Model::Expression::inputs

Definition at line 26 of file Expression.h.

◆ target

std::optional<const Attribute*> BPMNOS::Model::Expression::target

Definition at line 25 of file Expression.h.

◆ type

const Type BPMNOS::Model::Expression::type

Definition at line 24 of file Expression.h.

◆ variables

std::vector<const Attribute*> BPMNOS::Model::Expression::variables

Definition at line 27 of file Expression.h.


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