Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Pyston::GraphvizGenerator Class Reference

#include <GraphvizGenerator.h>

Inheritance diagram for Pyston::GraphvizGenerator:
Inheritance graph
[legend]
Collaboration diagram for Pyston::GraphvizGenerator:
Collaboration graph
[legend]

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_t > m_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(), and m_stream.

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::list< T >::back(), std::list< T >::empty(), std::endl(), Pyston::escape(), m_stack, m_stream, m_unique_id, std::list< T >::push_back(), 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, and std::list< T >::pop_back().

Here is the call graph for this function:

◆ 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, and std::stringstream::str().

Referenced by Example::generateGraphviz().

Here is the call graph for this function:

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().


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