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

Representation of integral types. More...

#include <integral_type.h>

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

Public Member Functions

bool isUnsigned ()
 
std::string typeName () const override
 
void printLeft (std::ostream &s) const override
 Prints text representation of type with qualifiers to output stream. More...
 
- 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
 
virtual void printRight (std::ostream &s) const
 Some nodes need special trailing characters. More...
 
bool hasRight ()
 

Static Public Member Functions

static std::shared_ptr< IntegralTypeNodecreate (Context &context, const std::string &typeName, bool isUnsigned, const Qualifiers &quals)
 Function for creating integral types. If type the same type was already created, then that instance is returned. More...
 
- Static Public Member Functions inherited from retdec::demangler::borland::BuiltInTypeNode
static std::shared_ptr< BuiltInTypeNodecreate (Context &context, const std::string &typeName, const Qualifiers &quals)
 Creates unique pointer to built-in type nodes. More...
 

Private Member Functions

 IntegralTypeNode (const std::string &typeName, bool isUnsigned, const Qualifiers &quals)
 Private constructor for integral types. Use create(). More...
 

Private Attributes

bool _isUnsigned
 

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::BuiltInTypeNode
 BuiltInTypeNode (const std::string &typeName, const Qualifiers &quals)
 Private constructor for built-in type nodes. Use create(). More...
 
- Protected Member Functions inherited from retdec::demangler::borland::TypeNode
 TypeNode (const Qualifiers &quals)
 
- Protected Attributes inherited from retdec::demangler::borland::BuiltInTypeNode
std::string _typeName
 
- 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 integral types.

Constructor & Destructor Documentation

◆ IntegralTypeNode()

retdec::demangler::borland::IntegralTypeNode::IntegralTypeNode ( const std::string &  typeName,
bool  isUnsigned,
const Qualifiers quals 
)
private

Private constructor for integral types. Use create().

Member Function Documentation

◆ create()

std::shared_ptr< IntegralTypeNode > retdec::demangler::borland::IntegralTypeNode::create ( Context context,
const std::string &  typeName,
bool  isUnsigned,
const Qualifiers quals 
)
static

Function for creating integral types. If type the same type was already created, then that instance is returned.

Parameters
contextStorage for types.
typeNameName of integral type to create.
isUnsignedInformation about intgral type signedness.
qualsSee BuiltInTypeNode quals.
Returns
Node representing integral type.

◆ isUnsigned()

bool retdec::demangler::borland::IntegralTypeNode::isUnsigned ( )
Returns
true if type is unsigned, else false.

◆ printLeft()

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

Prints text representation of type with qualifiers to output stream.

Reimplemented from retdec::demangler::borland::BuiltInTypeNode.

◆ typeName()

std::string retdec::demangler::borland::IntegralTypeNode::typeName ( ) const
overridevirtual
Returns
String representation of type name.

Reimplemented from retdec::demangler::borland::BuiltInTypeNode.

Member Data Documentation

◆ _isUnsigned

bool retdec::demangler::borland::IntegralTypeNode::_isUnsigned
private

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