42#include "environment.h"
43#include "tpg/tpgAction.h"
44#include "tpg/tpgEdge.h"
45#include "tpg/tpgFactory.h"
46#include "tpg/tpgTeam.h"
47#include "tpg/tpgVertex.h"
63 std::unique_ptr<TPGFactory> f = std::make_unique<TPGFactory>())
163 const std::vector<const TPGVertex*>
getVertices()
const;
234 const std::shared_ptr<Program::Program> prog);
241 const std::list<std::unique_ptr<TPGEdge>>&
getEdges()
const;
319 std::list<std::unique_ptr<TPGEdge>>
edges;
341 std::list<std::unique_ptr<TPGEdge>>::iterator
findEdge(
The Environment class contains all information needed to execute a Program.
Definition: environment.h:84
Class representing an Action of a TPGGraph.
Definition: tpgAction.h:52
Class representing edges of the Tangled Program Graphs.
Definition: tpgEdge.h:51
Factory for creating all elements constituting a TPG.
Definition: tpgFactory.h:34
Class for storing a Tangled-Program-Graph.
Definition: tpgGraph.h:54
const std::vector< const TPGVertex * > getVertices() const
Get vector of const pointer to the vertices of the TPGGraph.
Definition: tpgGraph.cpp:93
void clear()
Empty the TPGGraph of all its content.
Definition: tpgGraph.cpp:58
const TPGEdge & cloneEdge(const TPGEdge &edge)
Definition: tpgGraph.cpp:242
std::list< TPGVertex * > vertices
Set of TPGVertex composing the TPGGraph.
Definition: tpgGraph.h:314
const TPGTeam & addNewTeam()
Create a new TPGTeam and add it to the vertices of the TPGGraph.
Definition: tpgGraph.cpp:76
TPGGraph(const Environment &e, std::unique_ptr< TPGFactory > f=std::make_unique< TPGFactory >())
Main TPGGraph constructor.
Definition: tpgGraph.h:62
const std::unique_ptr< TPGFactory > factory
TPGFactory of the TPGGraph.
Definition: tpgGraph.h:309
const TPGEdge & addNewEdge(const TPGVertex &src, const TPGVertex &dest, const std::shared_ptr< Program::Program > prog)
Add a new TPGEdge to the TPGGraph.
Definition: tpgGraph.cpp:178
bool setEdgeSource(const TPGEdge &edge, const TPGVertex &newSrc)
Change the source of the TPGEdge to the given vertex.
Definition: tpgGraph.cpp:283
TPGGraph(TPGGraph &&model) noexcept
TPGGraph move assignment operator.
Definition: tpgGraph.h:76
TPGGraph & operator=(TPGGraph model)
assignement operator for class TPGGraph
Definition: tpgGraph.cpp:52
std::list< std::unique_ptr< TPGEdge > > edges
Set of TPGEdge composing the TPGGraph.
Definition: tpgGraph.h:319
TPGGraph(const TPGGraph &model)=delete
delete copy constructor
bool hasVertex(const TPG::TPGVertex &vertex) const
Check whether a given vertex exists in the TPGGraph.
Definition: tpgGraph.cpp:118
const TPGFactory & getFactory() const
Get a reference to the TPGFactory of the TPGGraph.
Definition: tpgGraph.cpp:71
const std::vector< const TPGVertex * > getRootVertices() const
Get vector of const pointer to the root vertices of the TPGGraph.
Definition: tpgGraph.cpp:108
virtual ~TPGGraph()
Destructor for the TPGGraph.
Definition: tpgGraph.cpp:43
const Environment & env
Environment of the TPGGraph.
Definition: tpgGraph.h:306
size_t getNbVertices() const
Get the number of TPGVertex contained in the TPGGraph.
Definition: tpgGraph.cpp:88
void removeEdge(const TPGEdge &edge)
Remove a TPGEdge from the TPGGraph.
Definition: tpgGraph.cpp:220
std::list< std::unique_ptr< TPGEdge > >::iterator findEdge(const TPGEdge *edge)
Find the non-const iterator to an edge of the graph from its const pointer.
Definition: tpgGraph.cpp:313
void removeVertex(const TPGVertex &vertex)
Remove a TPGVertex from the TPGGraph and destroy it.
Definition: tpgGraph.cpp:124
void clearProgramIntrons()
Clear all intron instructions in the Program of the TPGGraph.
Definition: tpgGraph.cpp:322
std::list< TPGVertex * >::iterator findVertex(const TPGVertex *vertex)
Find the non-const iterator to a vertex of the graph from its const pointer.
Definition: tpgGraph.cpp:307
const TPGVertex & cloneVertex(const TPGVertex &vertex)
Clone a TPGVertex of the graph and all its outgoing TPGEdge.
Definition: tpgGraph.cpp:148
friend void swap(TPGGraph &a, TPGGraph &b)
Helper function for move constructor.
Definition: tpgGraph.h:86
const std::list< std::unique_ptr< TPGEdge > > & getEdges() const
Get a const reference to the edges of the TPGGraph.
Definition: tpgGraph.cpp:215
const Environment & getEnvironment() const
Accessor to the Environment of the TPGGraph.
Definition: tpgGraph.cpp:66
bool setEdgeDestination(const TPGEdge &edge, const TPGVertex &newDest)
Change the destination of the Edge to the given target.
Definition: tpgGraph.cpp:256
const TPGAction & addNewAction(uint64_t actionID)
Create a new TPGAction and add it to the vertices of the TPGGraph.
Definition: tpgGraph.cpp:82
uint64_t getNbRootVertices() const
Get the number of rootVertices of the TPGGraph.
Definition: tpgGraph.cpp:100
Abstract class representing the vertices of a TPGGraph.
Definition: tpgVertex.h:49
Definition: tpgActionInstrumented.h:8