retdec
|
A representation of struct types. More...
#include <struct_type.h>
Public Member Functions | |
virtual bool | isStruct () const override |
Visitor interface. | |
virtual void | accept (Visitor *v) override |
Visitor pattern implementation. More... | |
![]() | |
member_iterator | member_begin () |
Returns an iterator to the member. More... | |
const_member_iterator | member_begin () const |
Returns a constant iterator to the member. More... | |
member_iterator | member_end () |
Returns an iterator past the last member. More... | |
const_member_iterator | member_end () const |
Returns a constant iterator past the last member. More... | |
Members::size_type | getMemberCount () const |
Returns the number of members. More... | |
const Member & | getMember (Members::size_type n) const |
Returns the n-th member. More... | |
const std::string & | getMemberName (Members::size_type n) const |
Returns the n-th member's name. More... | |
std::shared_ptr< Type > | getMemberType (Members::size_type n) const |
Returns the n-th member's type. More... | |
void | setMembers (const Members &members) |
Sets new members to composite type. 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 | isTypedef () const |
virtual bool | isUnion () const |
virtual bool | isUnknown () const |
virtual bool | isVoid () const |
Static Public Member Functions | |
static std::shared_ptr< StructType > | create (const std::shared_ptr< Context > &context, const std::string &name, const Members &members) |
Creates struct type. More... | |
Private Member Functions | |
StructType (const std::string &name, const Members &members) | |
Constructs a new struct type. More... | |
Additional Inherited Members | |
![]() | |
using | Members = std::vector< Member > |
using | member_iterator = Members::iterator |
using | const_member_iterator = Members::const_iterator |
![]() | |
CompositeType (const std::string &name, const Members &members) | |
Constructs a new composite type. More... | |
![]() | |
Type ()=default | |
Type (const std::string &name, unsigned bitWidth) | |
Constructs a new type. More... | |
![]() | |
Visitable ()=default | |
~Visitable ()=default | |
![]() | |
Members | members |
![]() | |
std::string | name |
unsigned | bitWidth |
A representation of struct types.
|
private |
Constructs a new struct 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 struct type.
context | Storage for already created functions, types. |
name | Name of new type. |
members | Items of struct. |
Does not create new struct type, if one has already been created and stored in context
.
|
overridevirtual |
Returns true
when Type is struct, false
otherwise.
Reimplemented from retdec::ctypes::Type.