7 #ifndef RETDEC_LLVMIR2HLL_IR_STRUCT_TYPE_H
8 #define RETDEC_LLVMIR2HLL_IR_STRUCT_TYPE_H
35 const std::string &
name =
"");
43 const std::string &
getName()
const;
A representation of a structured type.
Definition: struct_type.h:28
StructType(ElementTypes elementTypes, const std::string &name)
Constructs a new structured type.
Definition: struct_type.cpp:23
std::string name
Name of the structure.
Definition: struct_type.h:60
std::vector< ShPtr< Type > > ElementTypes
Vector of types of elements in the structure.
Definition: struct_type.h:31
const ShPtr< Type > getTypeOfElement(ShPtr< ConstInt > index) const
Returns the type of the given element.
Definition: struct_type.cpp:69
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: struct_type.cpp:30
ElementTypes elementTypes
Types of elements in the structure.
Definition: struct_type.h:57
const std::string & getName() const
Returns the name of the structure.
Definition: struct_type.cpp:52
const ElementTypes & getElementTypes() const
Returns the vector of elements in the structure.
Definition: struct_type.cpp:59
bool hasName() const
Returns true if the structure has a name, false otherwise.
Definition: struct_type.cpp:43
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: struct_type.cpp:87
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: struct_type.cpp:26
static ShPtr< StructType > create(ElementTypes elementTypes, const std::string &name="")
Creates a new structured type.
Definition: struct_type.cpp:82
A base class of all types.
Definition: type.h:20
A base class of all visitors.
Definition: visitor.h:95
A base class of all types.
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.