retdec
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
retdec::demangler::borland::FunctionTypeNode Class Reference

Representation of function types. Used for information about functions without name. More...

#include <function_type.h>

Inheritance diagram for retdec::demangler::borland::FunctionTypeNode:
Inheritance graph
[legend]
Collaboration diagram for retdec::demangler::borland::FunctionTypeNode:
Collaboration graph
[legend]

Public Member Functions

CallConv callConv ()
 
std::shared_ptr< NodeArrayparams ()
 
std::shared_ptr< TypeNoderetType ()
 
bool isVarArg ()
 
void printLeft (std::ostream &s) const override
 
void printRight (std::ostream &s) const override
 
- Public Member Functions inherited from retdec::demangler::borland::TypeNode
Qualifiers quals ()
 
- Public Member Functions inherited from retdec::demangler::borland::Node
 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
 
bool hasRight ()
 

Static Public Member Functions

static std::shared_ptr< FunctionTypeNodecreate (CallConv callConv, std::shared_ptr< NodeArray > params, std::shared_ptr< TypeNode > retType, Qualifiers &quals, bool isVarArg)
 Function for creating function types. More...
 

Private Member Functions

 FunctionTypeNode (CallConv callConv, std::shared_ptr< NodeArray > params, std::shared_ptr< TypeNode > retType, Qualifiers &quals, bool isVarArg)
 Private constructor for function types. Use create(). More...
 

Private Attributes

CallConv _callConv
 
std::shared_ptr< NodeArray_params
 
std::shared_ptr< TypeNode_retType
 
bool _isVarArg
 

Additional Inherited Members

- Public Types inherited from retdec::demangler::borland::Node
enum class  Kind {
  KFunction , KFunctionType , KName , KNestedName ,
  KNodeArray , KNodeString , KTypeNode , KBuiltInType ,
  KPointerType , KIntegralType , KCharType , KFloatType ,
  KParentheses , KReferenceType , KRReferenceType , KNamedType ,
  KTemplateNode , KArrayNode , KConversionOperator
}
 
- Protected Member Functions inherited from retdec::demangler::borland::TypeNode
 TypeNode (const Qualifiers &quals)
 
- Protected Attributes inherited from retdec::demangler::borland::TypeNode
Qualifiers _quals
 
- Protected Attributes inherited from retdec::demangler::borland::Node
Kind _kind
 
bool _has_right
 

Detailed Description

Representation of function types. Used for information about functions without name.

Constructor & Destructor Documentation

◆ FunctionTypeNode()

retdec::demangler::borland::FunctionTypeNode::FunctionTypeNode ( CallConv  callConv,
std::shared_ptr< NodeArray params,
std::shared_ptr< TypeNode retType,
Qualifiers quals,
bool  isVarArg 
)
private

Private constructor for function types. Use create().

Member Function Documentation

◆ callConv()

CallConv retdec::demangler::borland::FunctionTypeNode::callConv ( )

◆ create()

std::shared_ptr< FunctionTypeNode > retdec::demangler::borland::FunctionTypeNode::create ( CallConv  callConv,
std::shared_ptr< NodeArray params,
std::shared_ptr< TypeNode retType,
Qualifiers quals,
bool  isVarArg 
)
static

Function for creating function types.

Parameters
callConvCalling convention.
paramsNode representing parameters.
retTypeReturn type, can be nullptr.
qualsFunction qualifiers.
isVarArgwheater function is varidic.
Returns
Node representing function type.

◆ isVarArg()

bool retdec::demangler::borland::FunctionTypeNode::isVarArg ( )

◆ params()

std::shared_ptr< NodeArray > retdec::demangler::borland::FunctionTypeNode::params ( )

◆ printLeft()

void retdec::demangler::borland::FunctionTypeNode::printLeft ( std::ostream &  s) const
overridevirtual

Prints left side of function type to output stream.

Implements retdec::demangler::borland::Node.

◆ printRight()

void retdec::demangler::borland::FunctionTypeNode::printRight ( std::ostream &  s) const
overridevirtual

Prints right side of function type to output stream.

Reimplemented from retdec::demangler::borland::Node.

◆ retType()

std::shared_ptr< TypeNode > retdec::demangler::borland::FunctionTypeNode::retType ( )

Member Data Documentation

◆ _callConv

CallConv retdec::demangler::borland::FunctionTypeNode::_callConv
private

◆ _isVarArg

bool retdec::demangler::borland::FunctionTypeNode::_isVarArg
private

◆ _params

std::shared_ptr<NodeArray> retdec::demangler::borland::FunctionTypeNode::_params
private

◆ _retType

std::shared_ptr<TypeNode> retdec::demangler::borland::FunctionTypeNode::_retType
private

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