15#ifndef LIEF_DWARF_TYPE_H
16#define LIEF_DWARF_TYPE_H
67 template <
typename RefT>
73 Iterator(std::unique_ptr<details::TypeIt> impl);
99 return static_cast<const Iterator*
>(
this)->
operator*();
103 std::unique_ptr<details::TypeIt> impl_;
124 return kind() == KIND::UNSPECIFIED;
139 std::unique_ptr<Scope>
scope()
const;
142 const T*
as()
const {
143 if (T::classof(
this)) {
144 return static_cast<const T*
>(
this);
149 static std::unique_ptr<Type>
create(std::unique_ptr<details::Type> impl);
152 Type(std::unique_ptr<details::Type> impl);
153 Type(details::Type& impl);
Definition canbe_unique.hpp:22
Definition DWARF/Type.hpp:58
pointer operator->() const
Definition DWARF/Type.hpp:62
Definition DWARF/Type.hpp:49
std::unique_ptr< Type > value_type
Definition DWARF/Type.hpp:52
PointerProxy operator->() const
Definition DWARF/Type.hpp:98
Iterator operator--(int)
Definition DWARF/Type.hpp:84
Iterator operator++(int)
Definition DWARF/Type.hpp:90
std::bidirectional_iterator_tag iterator_category
Definition DWARF/Type.hpp:51
Iterator(const Iterator &)
std::unique_ptr< Type > & reference
Definition DWARF/Type.hpp:55
Iterator(Iterator &&) noexcept
std::ptrdiff_t difference_type
Definition DWARF/Type.hpp:53
std::unique_ptr< Type > operator*() const
details::TypeIt implementation
Definition DWARF/Type.hpp:56
This class represents a DWARF Type which includes:
Definition DWARF/Type.hpp:47
const T * as() const
Definition DWARF/Type.hpp:142
bool is_unspecified() const
Whether this type is a DW_TAG_unspecified_type
Definition DWARF/Type.hpp:123
KIND
Definition DWARF/Type.hpp:108
result< std::string > name() const
Return the type's name (if any)
result< uint64_t > size() const
Return the size of the type or an error if it can't be computed.
debug_location_t location() const
Return the debug location where this type is defined.
static std::unique_ptr< Type > create(std::unique_ptr< details::Type > impl)
std::unique_ptr< Scope > scope() const
Return the scope in which this type is defined.
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:75
This structure holds a debug location (source filename & line)
Definition debug_loc.hpp:23
#define LIEF_API
Definition visibility.h:41