38#ifndef TPG_GRAPH_DOT_EXPORTER_H
39#define TPG_GRAPH_DOT_EXPORTER_H
45#include "program/line.h"
46#include "program/program.h"
47#include "tpg/tpgAbstractEngine.h"
48#include "tpg/tpgAction.h"
49#include "tpg/tpgEdge.h"
50#include "tpg/tpgGraph.h"
51#include "tpg/tpgTeam.h"
52#include "tpg/tpgVertex.h"
157 if ((
pFile = fopen(filePath,
"w")) == NULL) {
158 throw std::runtime_error(
"Could not open file " +
159 std::string(filePath));
206 if ((
pFile = fopen(newFilePath,
"w")) == NULL) {
208 throw std::runtime_error(
"Could not open file " +
209 std::string(newFilePath));
Class used to export a TPGGraph into a text file with the dot format.
Definition: tpgGraphDotExporter.h:60
TPGGraphDotExporter & operator=(const TPGGraphDotExporter &other)=delete
std::string offset
Character chain used to control the indentation of the exported file.
Definition: tpgGraphDotExporter.h:71
void setNewFilePath(const char *newFilePath)
Set a new file for the exporter.
Definition: tpgGraphDotExporter.h:200
TPGGraphDotExporter(const char *filePath, const TPG::TPGGraph &graph)
Constructor for the exporter.
Definition: tpgGraphDotExporter.h:154
void printTPGGraphHeader()
Prints header content in the dot file.
Definition: tpgGraphDotExporter.cpp:134
uint64_t printTPGAction(const TPG::TPGAction &action)
Print the dot content for the given TPGAction.
Definition: tpgGraphDotExporter.cpp:58
FILE * pFile
File in which the dot content is written during export.
Definition: tpgGraphDotExporter.h:65
void printTPGEdge(const TPG::TPGEdge &edge)
Prints the dot content for the given TPGEdge. Prints the program index followed by its contants if th...
Definition: tpgGraphDotExporter.cpp:67
void printTPGGraphFooter()
Prints footer content in the dot file.
Definition: tpgGraphDotExporter.cpp:150
void printTPGTeam(const TPG::TPGTeam &team)
Print the dot content for the given TPGTeam.
Definition: tpgGraphDotExporter.cpp:42
void print()
Print the TPGGraph given when constructing the TPGGraphDotExporter into a dot file.
Definition: tpgGraphDotExporter.cpp:179
~TPGGraphDotExporter()
Definition: tpgGraphDotExporter.h:185
void printProgram(const Program::Program &program)
Prints the dot content for the given Program.
Definition: tpgGraphDotExporter.cpp:105
TPGGraphDotExporter(const TPGGraphDotExporter &other)=delete
The Program class contains a list of program lines that can be executed within a well defined Environ...
Definition: program.h:53
Abstract Class in charge of managing maps to give a unique ID for vertex and a program of a TPGGraph.
Definition: tpgAbstractEngine.h:49
TPGAbstractEngine(const TPG::TPGGraph &tpg)
Constructor for the abstract engine.
Definition: tpgAbstractEngine.h:110
Class representing an Action of a TPGGraph.
Definition: tpgAction.h:52
Class representing edges of the Tangled Program Graphs.
Definition: tpgEdge.h:51
Class for storing a Tangled-Program-Graph.
Definition: tpgGraph.h:54
Definition: parametersParser.h:51
Definition: tpgActionInstrumented.h:8