retdec
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
retdec::ctypes::Type Class Reference

A base class of all C types. More...

#include <type.h>

Inheritance diagram for retdec::ctypes::Type:
Inheritance graph
[legend]
Collaboration diagram for retdec::ctypes::Type:
Collaboration graph
[legend]

Public Member Functions

virtual ~Type ()=default
 
const std::string & getName () const
 
unsigned getBitWidth () const
 
virtual bool isArray () const
 
virtual bool isEnum () const
 
virtual bool isFloatingPoint () const
 
virtual bool isFunction () const
 
virtual bool isIntegral () const
 
virtual bool isNamed () const
 
virtual bool isPointer () const
 
virtual bool isReference () const
 
virtual bool isStruct () const
 
virtual bool isTypedef () const
 
virtual bool isUnion () const
 
virtual bool isUnknown () const
 
virtual bool isVoid () const
 
- Public Member Functions inherited from retdec::ctypes::Visitable
virtual void accept (Visitor *v)=0
 Visitor pattern implementation. More...
 

Protected Member Functions

 Type ()=default
 
 Type (const std::string &name, unsigned bitWidth)
 Constructs a new type. More...
 
- Protected Member Functions inherited from retdec::ctypes::Visitable
 Visitable ()=default
 
 ~Visitable ()=default
 

Protected Attributes

std::string name
 
unsigned bitWidth
 

Detailed Description

A base class of all C types.

Constructor & Destructor Documentation

◆ ~Type()

virtual retdec::ctypes::Type::~Type ( )
virtualdefault

◆ Type() [1/2]

retdec::ctypes::Type::Type ( )
protecteddefault

◆ Type() [2/2]

retdec::ctypes::Type::Type ( const std::string &  name,
unsigned  bitWidth 
)
protected

Constructs a new type.

Member Function Documentation

◆ getBitWidth()

unsigned retdec::ctypes::Type::getBitWidth ( ) const

◆ getName()

const std::string & retdec::ctypes::Type::getName ( ) const

◆ isArray()

bool retdec::ctypes::Type::isArray ( ) const
virtual

Reimplemented in retdec::ctypes::ArrayType.

◆ isEnum()

bool retdec::ctypes::Type::isEnum ( ) const
virtual

Reimplemented in retdec::ctypes::EnumType.

◆ isFloatingPoint()

bool retdec::ctypes::Type::isFloatingPoint ( ) const
virtual

◆ isFunction()

bool retdec::ctypes::Type::isFunction ( ) const
virtual

Reimplemented in retdec::ctypes::FunctionType.

◆ isIntegral()

bool retdec::ctypes::Type::isIntegral ( ) const
virtual

Reimplemented in retdec::ctypes::IntegralType.

◆ isNamed()

bool retdec::ctypes::Type::isNamed ( ) const
virtual

Reimplemented in retdec::ctypes::NamedType.

◆ isPointer()

bool retdec::ctypes::Type::isPointer ( ) const
virtual

Reimplemented in retdec::ctypes::PointerType.

◆ isReference()

bool retdec::ctypes::Type::isReference ( ) const
virtual

Reimplemented in retdec::ctypes::ReferenceType.

◆ isStruct()

bool retdec::ctypes::Type::isStruct ( ) const
virtual

Reimplemented in retdec::ctypes::StructType.

◆ isTypedef()

bool retdec::ctypes::Type::isTypedef ( ) const
virtual

Reimplemented in retdec::ctypes::TypedefedType.

◆ isUnion()

bool retdec::ctypes::Type::isUnion ( ) const
virtual

Reimplemented in retdec::ctypes::UnionType.

◆ isUnknown()

bool retdec::ctypes::Type::isUnknown ( ) const
virtual

Reimplemented in retdec::ctypes::UnknownType.

◆ isVoid()

bool retdec::ctypes::Type::isVoid ( ) const
virtual

Reimplemented in retdec::ctypes::VoidType.

Member Data Documentation

◆ bitWidth

unsigned retdec::ctypes::Type::bitWidth
protected

◆ name

std::string retdec::ctypes::Type::name
protected

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