eRPC Generator (erpcgen)  Rev. 1.12.0
NXP Semiconductors
erpcgen::AstPrinter Class Reference

Dumps an AST tree. More...

#include <AstNode.hpp>

Public Member Functions

 AstPrinter (AstNode *root)
 This function is constructor of AstPrinter class. More...
 
void dispatch ()
 This function call for dispatch function. More...
 
void dispatch (AstNode *node, int childIndex=0)
 This function call for print AstNode tree information and dispatch children. More...
 
void print (AstNode *node, int childIndex=0)
 This function print AstNode information. More...
 

Protected Member Functions

void printIndent (int indent) const
 This function call for print indent. More...
 

Protected Attributes

AstNodem_root
 
int m_depth
 
std::stack< int > m_depthStack
 

Detailed Description

Dumps an AST tree.

Constructor & Destructor Documentation

erpcgen::AstPrinter::AstPrinter ( AstNode root)
inlineexplicit

This function is constructor of AstPrinter class.

This function set root node to given node and depth to 0.

Parameters
[in]rootPointer to root node.

Member Function Documentation

void erpcgen::AstPrinter::dispatch ( )
inline

This function call for dispatch function.

This function call for dispatch with parameters root node and 0 number.

See also
void dispatch(AstNode * node, int childIndex=0)
void AstPrinter::dispatch ( AstNode node,
int  childIndex = 0 
)

This function call for print AstNode tree information and dispatch children.

Parameters
[in]nodeNode to print.
[in]childIndexChild node index.
See also
void dispatch()
void print()
void AstPrinter::print ( AstNode node,
int  childIndex = 0 
)

This function print AstNode information.

Parameters
[in]nodeNode to print.
[in]childIndexChild node index.
void AstPrinter::printIndent ( int  indent) const
protected

This function call for print indent.

Parameters
[in]indentNumber of spaces.

Member Data Documentation

int erpcgen::AstPrinter::m_depth
protected

Depth of AstNode tree.

std::stack<int> erpcgen::AstPrinter::m_depthStack
protected

Vector of depth.

AstNode* erpcgen::AstPrinter::m_root
protected

Root of AstNode tree.


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