15#ifndef LIEF_DWARF_TYPE_STRUCTURE_H
16#define LIEF_DWARF_TYPE_STRUCTURE_H
34 template<
typename... Args,
35 typename = std::enable_if_t<std::is_constructible_v<
Type, Args&&...>>>
37 Type(std::forward<Args>(args)...) {}
42 Member(std::unique_ptr<details::Member> impl);
100 const auto kind = type->kind();
120 template<
typename... Args,
122 std::enable_if_t<std::is_constructible_v<
ClassLike, Args&&...>>>
124 ClassLike(std::forward<Args>(args)...) {}
142 template<
typename... Args,
144 std::enable_if_t<std::is_constructible_v<
ClassLike, Args&&...>>>
146 ClassLike(std::forward<Args>(args)...) {}
164 template<
typename... Args,
166 std::enable_if_t<std::is_constructible_v<
ClassLike, Args&&...>>>
168 ClassLike(std::forward<Args>(args)...) {}
186 template<
typename... Args,
188 std::enable_if_t<std::is_constructible_v<
ClassLike, Args&&...>>>
190 ClassLike(std::forward<Args>(args)...) {}
This class represents a DWARF function which can be associated with either: DW_TAG_subprogram or DW_T...
Definition DWARF/Function.hpp:45
Definition DWARF/Type.hpp:71
@ PACKED
Definition DWARF/Type.hpp:143
@ STRUCT
Definition DWARF/Type.hpp:135
@ CLASS
Definition DWARF/Type.hpp:132
@ UNION
Definition DWARF/Type.hpp:136
Type(std::unique_ptr< details::Type > impl)
This represents a class/struct/union attribute.
Definition DWARF/types/ClassLike.hpp:40
result< uint64_t > bit_size() const
If the current member is a bit-field, this function returns its size in bits.
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
Member(const Member &)=delete
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 in the struct/union/class.
Member & operator=(const Member &)=delete
iterator_range< Function::Iterator > functions_it
Definition DWARF/types/ClassLike.hpp:97
functions_it functions() const
Iterator over the functions defined by the class-like.
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.
ClassLike(Args &&... args)
Definition DWARF/types/ClassLike.hpp:36
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:99
Class(Args &&... args)
Definition DWARF/types/ClassLike.hpp:145
Class & operator=(const Class &)=delete
Class(Class &&) noexcept=default
Class(const Class &)=delete
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:154
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:198
Packed & operator=(const Packed &)=delete
Packed(Packed &&) noexcept=default
Packed(Args &&... args)
Definition DWARF/types/ClassLike.hpp:189
Packed(const Packed &)=delete
Structure(Args &&... args)
Definition DWARF/types/ClassLike.hpp:123
Structure(Structure &&) noexcept=default
Structure(const Structure &)=delete
Structure & operator=(const Structure &)=delete
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:132
Union(Union &&) noexcept=default
Union(const Union &)=delete
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:176
Union & operator=(const Union &)=delete
Union(Args &&... args)
Definition DWARF/types/ClassLike.hpp:167
Definition iterators.hpp:591
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:79
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Definition DWARF/types/ClassLike.hpp:26
Definition DWARF/types/Array.hpp:23
#define LIEF_API
Definition visibility.h:45