GEGELATI

Loading...
Searching...
No Matches
tpgFactory.h
1
37#ifndef TPG_FACTORY_H
38#define TPG_FACTORY_H
39
40#include <memory>
41
42#include "archive.h"
43#include "tpg/tpgAction.h"
44#include "tpg/tpgActionEdge.h"
45#include "tpg/tpgEdge.h"
46#include "tpg/tpgTeam.h"
47
48namespace TPG {
49
50 // Declare the TPGGraph class to be used as a parameter.
51 class TPGGraph;
52
53 // Declare the TPGExecutionEngine class to be used as a parameter.
54 class TPGExecutionEngine;
55
70 class TPGFactory
71 {
72
73 public:
75 virtual ~TPGFactory() = default;
76
82 virtual std::shared_ptr<TPGGraph> createTPGGraph(
83 const Environment& env) const;
84
90 virtual std::unique_ptr<TPGTeam> createTPGTeam() const;
91
99 virtual std::unique_ptr<TPGAction> createTPGAction(
100 const uint64_t id) const;
101
113 virtual std::unique_ptr<TPGEdge> createTPGEdge(
114 const TPGVertex* src, const TPGVertex* dest,
115 const std::shared_ptr<Program::Program> prog) const;
116
129 virtual std::unique_ptr<TPGEdge> createTPGActionEdge(
130 const TPGVertex* src, const std::shared_ptr<Program::Program> prog,
131 uint64_t actionClass) const;
132
145 virtual std::unique_ptr<TPG::TPGExecutionEngine>
146 createTPGExecutionEngine(const Environment& env,
147 Archive* arch = NULL) const;
148 };
149
150} // namespace TPG
151
152#endif // !TPG_GRAPH_ELEMENT_FACTORY_H
Archive
Definition archive.h:80
Environment
The Environment class contains all information needed to execute a Program.
Definition environment.h:86
TPG::TPGFactory
Factory for creating all elements constituting a TPG.
Definition tpgFactory.h:71
TPG::TPGFactory::createTPGEdge
virtual std::unique_ptr< TPGEdge > createTPGEdge(const TPGVertex *src, const TPGVertex *dest, const std::shared_ptr< Program::Program > prog) const
Create a TPGEdge for a TPGGraph.
Definition tpgFactory.cpp:58
TPG::TPGFactory::createTPGActionEdge
virtual std::unique_ptr< TPGEdge > createTPGActionEdge(const TPGVertex *src, const std::shared_ptr< Program::Program > prog, uint64_t actionClass) const
Create a TPGActionEdge for a TPGGraph.
Definition tpgFactory.cpp:65
TPG::TPGFactory::createTPGTeam
virtual std::unique_ptr< TPGTeam > createTPGTeam() const
Create a TPGTeam for a TPGGraph.
Definition tpgFactory.cpp:47
TPG::TPGFactory::createTPGGraph
virtual std::shared_ptr< TPGGraph > createTPGGraph(const Environment &env) const
Create a TPGGraph with this TPGFactory.
Definition tpgFactory.cpp:41
TPG::TPGFactory::createTPGExecutionEngine
virtual std::unique_ptr< TPG::TPGExecutionEngine > createTPGExecutionEngine(const Environment &env, Archive *arch=NULL) const
Create a TPGExecutionEngine for a TPGGraph produced by this TPGFactory.
Definition tpgFactory.cpp:73
TPG::TPGFactory::~TPGFactory
virtual ~TPGFactory()=default
Default virtual destructor.
TPG::TPGFactory::createTPGAction
virtual std::unique_ptr< TPGAction > createTPGAction(const uint64_t id) const
Create a TPGAction for a TPGGraph.
Definition tpgFactory.cpp:52
TPG::TPGVertex
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
TPG
Definition executionStats.h:44