GEGELATI

Loading...
Searching...
No Matches
programExecutionEngine.h
1
38#ifndef PROGRAM_EXECUTION_ENGINE_H
39#define PROGRAM_EXECUTION_ENGINE_H
40
41#include <type_traits>
42
43#include "data/primitiveTypeArray.h"
44#include "data/untypedSharedPtr.h"
45#include "program/program.h"
46#include "program/programEngine.h"
47
48namespace Program {
52 class ProgramExecutionEngine : public ProgramEngine
53 {
54 protected:
56 ProgramExecutionEngine() = delete;
57
58 public:
67 ProgramExecutionEngine(const Environment& env) : ProgramEngine(env){};
68
84 template <class T>
85 ProgramExecutionEngine(
86 const Program& prog,
87 const std::vector<std::reference_wrapper<T>>& dataSrc)
88 : ProgramEngine(prog, dataSrc){};
89
99 ProgramExecutionEngine(const Program& prog)
100 : ProgramExecutionEngine(prog,
101 prog.getEnvironment().getDataSources()){};
102
108 void executeCurrentLine();
109
124 double executeProgram(const bool ignoreException = false);
125
127 virtual void processLine() override;
128 };
129}; // namespace Program
130#endif
Environment
The Environment class contains all information needed to execute a Program.
Definition environment.h:86
Program::ProgramEngine
This abstract class is the base class for any program engine (generation and execution)
Definition programEngine.h:55
Program::ProgramEngine::getDataSources
const std::vector< std::reference_wrapper< const Data::DataHandler > > & getDataSources() const
Get the DataHandler of the ProgramExecutionEngine.
Definition programEngine.cpp:93
Program::ProgramExecutionEngine
Class in charge of executing a Program within its Environment.
Definition programExecutionEngine.h:53
Program::ProgramExecutionEngine::executeProgram
double executeProgram(const bool ignoreException=false)
Execute the program completely and returns the content of register 0.
Definition programExecutionEngine.cpp:57
Program::ProgramExecutionEngine::ProgramExecutionEngine
ProgramExecutionEngine()=delete
Default constructor is deleted.
Program::ProgramExecutionEngine::processLine
virtual void processLine() override
inherited from Program::ProgramEngine
Definition programExecutionEngine.cpp:71
Program::ProgramExecutionEngine::executeCurrentLine
void executeCurrentLine()
Execute the current line of the program.
Definition programExecutionEngine.cpp:41
Program::ProgramExecutionEngine::ProgramExecutionEngine
ProgramExecutionEngine(const Program &prog, const std::vector< std::reference_wrapper< T > > &dataSrc)
Constructor of the class.
Definition programExecutionEngine.h:85
Program::ProgramExecutionEngine::ProgramExecutionEngine
ProgramExecutionEngine(const Program &prog)
Constructor of the class.
Definition programExecutionEngine.h:99
Program::ProgramExecutionEngine::ProgramExecutionEngine
ProgramExecutionEngine(const Environment &env)
Constructor of the class.
Definition programExecutionEngine.h:67
Program
Definition line.h:44