retdec
|
A representation of custom types. Named type represents class types and instatiated template class types, when only name of the type is known. More...
#include <named_type.h>
Public Member Functions | |
bool | isNamed () const override |
Visitor interface. | |
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 | 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 |
Static Public Member Functions | |
static std::shared_ptr< NamedType > | create (const std::shared_ptr< Context > &context, const std::string &name) |
Creates named type. More... | |
Private Member Functions | |
NamedType (const std::string &name) | |
Constructs new NamedType. 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 custom types. Named type represents class types and instatiated template class types, when only name of the type is known.
|
explicitprivate |
Constructs new NamedType.
|
overridevirtual |
Visitor pattern implementation.
Subclasses should implement this method as:
where T
is the name of the subclass.
Implements retdec::ctypes::Visitable.
|
static |
Creates named type.
context | Storage for already created functions, types. |
name | Name of new named type. |
Does not create new name type, if one has already been created and stored in context
.
|
overridevirtual |
Returns true
when Type is class, false
otherwise.
Reimplemented from retdec::ctypes::Type.