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

Representation of char types. More...

#include <char_type.h>

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

Public Member Functions

std::string typeName () const override
 
ThreeStateSignedness signedness ()
 
void printLeft (std::ostream &s) const override
 Prints text representation of char 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< CharTypeNodecreate (Context &context, ThreeStateSignedness signedness, const Qualifiers &quals)
 Function for creating char 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

 CharTypeNode (ThreeStateSignedness signedness, const Qualifiers &quals)
 Private constructor for Char types. Use create(). More...
 

Private Attributes

ThreeStateSignedness _signedness
 

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 char types.

Constructor & Destructor Documentation

◆ CharTypeNode()

retdec::demangler::borland::CharTypeNode::CharTypeNode ( ThreeStateSignedness  signedness,
const Qualifiers quals 
)
private

Private constructor for Char types. Use create().

Member Function Documentation

◆ create()

std::shared_ptr< CharTypeNode > retdec::demangler::borland::CharTypeNode::create ( Context context,
ThreeStateSignedness  signedness,
const Qualifiers quals 
)
static

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

Parameters
contextStorage for types.
signednessChar signednes. Chars can be char, signed char, unsigned char. All are distinct types by standard.
qualsSee BuiltInTypeNode quals.
Returns
Node representing char type.

◆ printLeft()

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

Prints text representation of char type with qualifiers to output stream.

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

◆ signedness()

ThreeStateSignedness retdec::demangler::borland::CharTypeNode::signedness ( )
Returns
signedness of type.

◆ typeName()

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

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

Member Data Documentation

◆ _signedness

ThreeStateSignedness retdec::demangler::borland::CharTypeNode::_signedness
private

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