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 {
  ASSIGN , UNASSIGN , IS_NULL , IS_NOT_NULL ,
  OTHER
}
 

Public Member Functions

 Expression (const std::string expression, const AttributeRegistry &attributeRegistry, bool newTarget=false)
 Construct expression using attributeRegistry's limexHandle.
 
 Expression (const LIMEX::Handle< double > &handle, const std::string expression, const AttributeRegistry &attributeRegistry, bool newTarget=false)
 Construct expression using a custom LIMEX handle (for stochastic expressions)
 
 Expression (const Expression &)=delete
 
 Expression (Expression &&)=delete
 
Expressionoperator= (const Expression &)=delete
 
Expressionoperator= (Expression &&)=delete
 
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 LIMEX::Handle< double > & handle
 
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
ASSIGN 
UNASSIGN 
IS_NULL 
IS_NOT_NULL 
OTHER 

Definition at line 19 of file Expression.h.

Constructor & Destructor Documentation

◆ Expression() [1/4]

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

Definition at line 9 of file Expression.cpp.

◆ Expression() [2/4]

Expression::Expression ( const LIMEX::Handle< double > & handle,
const std::string expression,
const AttributeRegistry & attributeRegistry,
bool newTarget = false )

Definition at line 14 of file Expression.cpp.

◆ Expression() [3/4]

BPMNOS::Model::Expression::Expression ( const Expression & )
delete

◆ Expression() [4/4]

BPMNOS::Model::Expression::Expression ( Expression && )
delete

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 121 of file Expression.cpp.

◆ isAttribute()

const Attribute * Expression::isAttribute ( ) const

Definition at line 108 of file Expression.cpp.

◆ operator=() [1/2]

Expression & BPMNOS::Model::Expression::operator= ( const Expression & )
delete

◆ operator=() [2/2]

Expression & BPMNOS::Model::Expression::operator= ( Expression && )
delete

Member Data Documentation

◆ attributeRegistry

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

Definition at line 30 of file Expression.h.

◆ collections

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

Definition at line 38 of file Expression.h.

◆ compiled

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

Definition at line 33 of file Expression.h.

◆ expression

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

Definition at line 32 of file Expression.h.

◆ handle

const LIMEX::Handle<double>& BPMNOS::Model::Expression::handle

Definition at line 31 of file Expression.h.

◆ inputs

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

Definition at line 36 of file Expression.h.

◆ target

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

Definition at line 35 of file Expression.h.

◆ type

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

Definition at line 34 of file Expression.h.

◆ variables

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

Definition at line 37 of file Expression.h.


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