Alexandria 2.31.4
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Pyston::GraphvizGenerator Class Reference

#include <GraphvizGenerator.h>

Inheritance diagram for Pyston::GraphvizGenerator:
Collaboration diagram for Pyston::GraphvizGenerator:

Public Member Functions

 GraphvizGenerator (const std::string &label)
void enter (const NodeBase *node) override
void exit (const NodeBase *) override
std::string str () const

Private Attributes

int64_t m_unique_id
std::stringstream m_stream
std::list< int64_tm_stack

Detailed Description

Concrete implementation of the Visitor class for the computing trees. It will generate a string representing the graph in a format compatible with graphviz.

Definition at line 32 of file GraphvizGenerator.h.

Constructor & Destructor Documentation

◆ GraphvizGenerator()

Pyston::GraphvizGenerator::GraphvizGenerator ( const std::string & label)
explicit

Constructor

Parameters
labelName of the whole graph

Definition at line 28 of file GraphvizGenerator.cpp.

References std::endl(), Pyston::escape(), m_stream, and m_unique_id.

Here is the call graph for this function:

Member Function Documentation

◆ enter()

void Pyston::GraphvizGenerator::enter ( const NodeBase * node)
overridevirtual

Called when a node is entered

Implements Pyston::Visitor.

Definition at line 32 of file GraphvizGenerator.cpp.

References std::endl(), Pyston::escape(), m_stack, m_stream, m_unique_id, and Pyston::NodeBase::repr().

Here is the call graph for this function:

◆ exit()

void Pyston::GraphvizGenerator::exit ( const NodeBase * )
overridevirtual

Called when a node is left

Implements Pyston::Visitor.

Definition at line 41 of file GraphvizGenerator.cpp.

References m_stack.

◆ str()

std::string Pyston::GraphvizGenerator::str ( ) const
Returns
The graphviz representation of the visited graph

Definition at line 45 of file GraphvizGenerator.cpp.

References m_stream.

Referenced by Example::generateGraphviz().

Member Data Documentation

◆ m_stack

std::list<int64_t> Pyston::GraphvizGenerator::m_stack
private

Definition at line 60 of file GraphvizGenerator.h.

Referenced by enter(), and exit().

◆ m_stream

std::stringstream Pyston::GraphvizGenerator::m_stream
private

Definition at line 59 of file GraphvizGenerator.h.

Referenced by enter(), GraphvizGenerator(), and str().

◆ m_unique_id

int64_t Pyston::GraphvizGenerator::m_unique_id
private

Definition at line 58 of file GraphvizGenerator.h.

Referenced by enter(), and GraphvizGenerator().


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