retdec
Public Types | Public Member Functions | Protected Attributes | List of all members
retdec::demangler::borland::Node Class Referenceabstract

Base class for all nodes in AST. More...

#include <node.h>

Inheritance diagram for retdec::demangler::borland::Node:
Inheritance graph
[legend]

Public Types

enum class  Kind {
  KFunction , KFunctionType , KName , KNestedName ,
  KNodeArray , KNodeString , KTypeNode , KBuiltInType ,
  KPointerType , KIntegralType , KCharType , KFloatType ,
  KParentheses , KReferenceType , KRReferenceType , KNamedType ,
  KTemplateNode , KArrayNode , KConversionOperator
}
 

Public Member Functions

 Node (Kind kind, bool has_right_side=false)
 Abstract constructor for base node. More...
 
virtual ~Node ()=default
 
void print (std::ostream &s) const
 Prints left side of node. More...
 
std::string str () const
 
Kind kind () const
 
virtual void printLeft (std::ostream &s) const =0
 
virtual void printRight (std::ostream &s) const
 Some nodes need special trailing characters. More...
 
bool hasRight ()
 

Protected Attributes

Kind _kind
 
bool _has_right
 

Detailed Description

Base class for all nodes in AST.

Member Enumeration Documentation

◆ Kind

Enumerator
KFunction 
KFunctionType 
KName 
KNestedName 
KNodeArray 
KNodeString 
KTypeNode 
KBuiltInType 
KPointerType 
KIntegralType 
KCharType 
KFloatType 
KParentheses 
KReferenceType 
KRReferenceType 
KNamedType 
KTemplateNode 
KArrayNode 
KConversionOperator 

Constructor & Destructor Documentation

◆ Node()

retdec::demangler::borland::Node::Node ( Kind  kind,
bool  has_right_side = false 
)
explicit

Abstract constructor for base node.

Parameters
kindKind of node.
has_right_side

◆ ~Node()

virtual retdec::demangler::borland::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ hasRight()

bool retdec::demangler::borland::Node::hasRight ( )

◆ kind()

Node::Kind retdec::demangler::borland::Node::kind ( ) const
Returns
Kind of node.

◆ print()

void retdec::demangler::borland::Node::print ( std::ostream &  s) const

Prints left side of node.

Parameters
soutput stream

◆ printLeft()

virtual void retdec::demangler::borland::Node::printLeft ( std::ostream &  s) const
pure virtual

◆ printRight()

void retdec::demangler::borland::Node::printRight ( std::ostream &  s) const
virtual

◆ str()

std::string retdec::demangler::borland::Node::str ( ) const
Returns
String representation of node.

Member Data Documentation

◆ _has_right

bool retdec::demangler::borland::Node::_has_right
protected

◆ _kind

Kind retdec::demangler::borland::Node::_kind
protected

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