Go to the documentation of this file.
15#ifndef LIEF_PDB_TYPE_H
16#define LIEF_PDB_TYPE_H
34 using iterator_category = std::forward_iterator_tag;
35 using value_type = std::unique_ptr<Type>;
36 using difference_type = std::ptrdiff_t;
37 using pointer = Type*;
38 using reference = Type&;
39 using implementation = details::TypeIt;
43 friend class Iterator;
50 template <
typename RefT>
51 PointerProxy(RefT &&R) : R(std::forward<RefT>(R)) {}
56 Iterator(std::unique_ptr<details::TypeIt> impl);
59 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
61 friend
LIEF_API bool operator!=(const Iterator& LHS, const Iterator& RHS) {
68 Iterator tmp = *
static_cast<Iterator*
>(
this);
69 ++*
static_cast<Iterator *
>(
this);
76 return static_cast<const Iterator*
>(
this)->
operator*();
80 std::unique_ptr<details::TypeIt> impl_;
101 const T*
as()
const {
102 if (T::classof(
this)) {
103 return static_cast<const T*
>(
this);
108 static std::unique_ptr<Type>
create(std::unique_ptr<details::Type> impl);
113 Type(std::unique_ptr<details::Type> impl);
114 std::unique_ptr<details::Type> impl_;
pointer operator->() const
Definition PDB/Type.hpp:45
Iterator(const Iterator &)
Iterator(Iterator &&) noexcept
PointerProxy operator->() const
Definition PDB/Type.hpp:75
std::unique_ptr< Type > operator*() const
Iterator operator++(int)
Definition PDB/Type.hpp:67
This is the base class for any PDB type.
Definition PDB/Type.hpp:30
const T * as() const
Definition PDB/Type.hpp:101
static std::unique_ptr< Type > create(std::unique_ptr< details::Type > impl)
Definition PDB/CompilationUnit.hpp:29
Definition PDB/CompilationUnit.hpp:27
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41