| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
erpcgen::AstPrinter Class Reference

Dumps an AST tree. More...

`#include <AstNode.h>`

## 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
AstNode * | m_root
int | m_depth
std::stack< int > | m_depthStack

## Detailed Description

Dumps an AST tree.

## Constructor & Destructor Documentation

erpcgen::AstPrinter::AstPrinter | ( | AstNode * | root | ) |
| inline

This function is constructor of AstPrinter class.

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

Parameters

  [in] | root | Pointer 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] | node | Node to print.
  [in] | childIndex | Child node index.

See also
  void dispatch()
  void print()

void AstPrinter::print | ( | AstNode * | node,
|  | int | childIndex = `0`
| ) |  |

This function print AstNode information.

Parameters

  [in] | node | Node to print.
  [in] | childIndex | Child node index.

void AstPrinter::printIndent | ( | int | indent | ) | const
| protected

This function call for print indent.

Parameters

  [in] | indent | Number 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:

- AstNode.h
- AstNode.cpp