15#ifndef LIEF_DWARF_TYPE_STRUCTURE_H
16#define LIEF_DWARF_TYPE_STRUCTURE_H
38 Member(std::unique_ptr<details::Member> impl);
68 std::unique_ptr<Type>
type()
const;
76 std::unique_ptr<details::Member> impl_;
80 const auto kind = type->
kind();
81 return kind == Type::KIND::CLASS || kind == Type::KIND::STRUCT || kind == Type::KIND::UNION;
96 using ClassLike::ClassLike;
99 return type->
kind() == Type::KIND::STRUCT;
108 using ClassLike::ClassLike;
111 return type->
kind() == Type::KIND::CLASS;
120 using ClassLike::ClassLike;
123 return type->
kind() == Type::KIND::UNION;
This class represents a DWARF Type which includes:
Definition DWARF/Type.hpp:47
This represents a class/struct/union attribute.
Definition DWARF/types/ClassLike.hpp:36
Member(std::unique_ptr< details::Member > impl)
std::unique_ptr< Type > type() const
Type of the current member.
Member & operator=(Member &&other) noexcept
Member(Member &&other) noexcept
std::string name() const
Name of the member.
bool is_declaration() const
result< uint64_t > offset() const
Offset of the current member in the struct/union/class.
result< uint64_t > bit_offset() const
Offset of the current member in bits the struct/union/class.
This class abstracts a DWARF aggregate: DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type.
Definition DWARF/types/ClassLike.hpp:31
std::vector< Member > members() const
Return the list of all the attributes defined in this class-like type.
std::unique_ptr< Member > find_member(uint64_t offset) const
Try to find the attribute at the given offset.
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:79
This class represents a DWARF class type (DW_TAG_class_type)
Definition DWARF/types/ClassLike.hpp:106
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:110
This class represents a DWARF struct type (DW_TAG_structure_type)
Definition DWARF/types/ClassLike.hpp:94
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:98
This class represents a DWARF class type (DW_TAG_union_type)
Definition DWARF/types/ClassLike.hpp:118
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:122
LIEF namespace.
Definition Abstract/Binary.hpp:32
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:74
#define LIEF_API
Definition visibility.h:41