retdec
|
A representation of integral types. More...
#include <integral_type.h>
Public Types | |
enum class | Signess { Signed , Unsigned } |
Public Member Functions | |
bool | isSigned () const |
Returns true for signed types, false otherwise. More... | |
bool | isUnsigned () const |
Returns true for unsigned types, false otherwise. More... | |
virtual bool | isIntegral () 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 | 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 |
Static Public Member Functions | |
static std::shared_ptr< IntegralType > | create (const std::shared_ptr< Context > &context, const std::string &name, unsigned bitWidth, Signess signess=Signess::Signed) |
Creates integral type. More... | |
Private Member Functions | |
IntegralType (const std::string &name, unsigned bitWidth, Signess signess=Signess::Signed) | |
Constructs a new integral type. More... | |
Private Attributes | |
Signess | signess |
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 integral types.
|
strong |
|
private |
Constructs a new integral type.
See create()
for more information.
|
overridevirtual |
Visitor pattern implementation.
Subclasses should implement this method as:
where T
is the name of the subclass.
Implements retdec::ctypes::Visitable.
|
static |
Creates integral type.
context | Storage for already created functions, types. |
name | Name of new type. |
bitWidth | Number of bits used by this type. |
signess | Sign of type. |
Does not create new integral type, if one has already been created and stored in context
.
|
overridevirtual |
Returns true
when Type is integral, false
otherwise.
Reimplemented from retdec::ctypes::Type.
bool retdec::ctypes::IntegralType::isSigned | ( | ) | const |
Returns true for signed types, false otherwise.
bool retdec::ctypes::IntegralType::isUnsigned | ( | ) | const |
Returns true for unsigned types, false otherwise.
|
private |