Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <TextReprVisitor.h>
Public Member Functions | |
TextReprVisitor (std::ostream &out_stream) | |
void | enter (const NodeBase *base) override |
void | exit (const NodeBase *node) override |
Protected Attributes | |
std::ostream & | m_stream |
std::list< std::list< std::string > > | m_stack |
Visit a computation tree, and generate a (more or less) human readable representation of it
Definition at line 31 of file TextReprVisitor.h.
|
explicit |
Constructor
out_stream | Serialize into this stream |
Definition at line 24 of file TextReprVisitor.cpp.
|
overridevirtual |
Called when a node is entered
Implements Pyston::Visitor.
Definition at line 26 of file TextReprVisitor.cpp.
References m_stack, and std::list< T >::push_back().
|
overridevirtual |
Called when a node is left
Implements Pyston::Visitor.
Definition at line 30 of file TextReprVisitor.cpp.
References std::string::back(), std::list< T >::back(), std::list< T >::empty(), std::string::front(), m_stack, m_stream, std::list< T >::pop_back(), Pyston::NodeBase::repr(), std::string::size(), and std::ostringstream::str().
|
protected |
Definition at line 52 of file TextReprVisitor.h.
|
protected |
Definition at line 51 of file TextReprVisitor.h.
Referenced by exit().