retdec
|
A representation of typedefed types. More...
#include <typedefed_type.h>
Public Member Functions | |
std::shared_ptr< Type > | getAliasedType () const |
Returns type that typedef stands for. More... | |
std::shared_ptr< Type > | getRealType () const |
Returns real type that typedef stands for. More... | |
virtual bool | isTypedef () const override |
Visitor interface. | |
virtual void | accept (Visitor *v) override |
Visitor pattern implementation. More... | |
![]() | |
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 | isUnion () const |
virtual bool | isUnknown () const |
virtual bool | isVoid () const |
Static Public Member Functions | |
static std::shared_ptr< TypedefedType > | create (const std::shared_ptr< Context > &context, const std::string &name, const std::shared_ptr< Type > &aliasedType) |
Creates typedefed type. More... | |
Private Member Functions | |
TypedefedType (const std::string &name, const std::shared_ptr< Type > &aliasedType) | |
Constructs a new typedefed type. More... | |
Private Attributes | |
std::shared_ptr< Type > | aliasedType |
Type that this typedef stands for. More... | |
Additional Inherited Members | |
![]() | |
Type ()=default | |
Type (const std::string &name, unsigned bitWidth) | |
Constructs a new type. More... | |
![]() | |
Visitable ()=default | |
~Visitable ()=default | |
![]() | |
std::string | name |
unsigned | bitWidth |
A representation of typedefed types.
|
private |
Constructs a new typedefed type.
|
overridevirtual |
Visitor pattern implementation.
Subclasses should implement this method as:
where T
is the name of the subclass.
Implements retdec::ctypes::Visitable.
|
static |
Creates typedefed type.
context | Storage for already created functions, types. |
name | Name of new type. |
aliasedType | Type, that this typedef stands for. |
Does not create new typedefed type, if one has already been created and stored in context
.
std::shared_ptr< Type > retdec::ctypes::TypedefedType::getAliasedType | ( | ) | const |
Returns type that typedef stands for.
Aliased type for MyInt
in
is int
Aliased type for MySecondInt
in
is MyInt
std::shared_ptr< Type > retdec::ctypes::TypedefedType::getRealType | ( | ) | const |
Returns real type that typedef stands for.
If aliased type is typedefed type, get its real type.
Real type for MySecondint
in
is int
|
overridevirtual |
Returns true
when Type is typedef, false
otherwise.
Reimplemented from retdec::ctypes::Type.
|
private |
Type that this typedef stands for.