Go to the documentation of this file.
15#ifndef LIEF_OBJC_IVAR_H
16#define LIEF_OBJC_IVAR_H
38 using iterator_category = std::bidirectional_iterator_tag;
39 using value_type = std::unique_ptr<IVar>;
40 using difference_type = std::ptrdiff_t;
41 using pointer = IVar*;
42 using reference = std::unique_ptr<IVar>&;
43 using implementation = details::IVarIt;
47 friend class Iterator;
54 template <
typename RefT>
55 PointerProxy(RefT &&R) : R(std::forward<RefT>(R)) {}
60 Iterator(std::unique_ptr<details::IVarIt> impl);
63 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
65 friend
LIEF_API bool operator!=(const Iterator& LHS, const Iterator& RHS) {
73 Iterator tmp = *
static_cast<Iterator*
>(
this);
74 --*
static_cast<Iterator *
>(
this);
79 Iterator tmp = *
static_cast<Iterator*
>(
this);
80 ++*
static_cast<Iterator *
>(
this);
87 return static_cast<const Iterator*
>(
this)->
operator*();
91 std::unique_ptr<details::IVarIt> impl_;
95 IVar(std::unique_ptr<details::IVar> impl);
96 std::string
name()
const;
105 std::unique_ptr<details::IVar> impl_;
pointer operator->() const
Definition IVar.hpp:49
Iterator(Iterator &&) noexcept
std::unique_ptr< IVar > operator*() const
Iterator operator--(int)
Definition IVar.hpp:72
Iterator operator++(int)
Definition IVar.hpp:78
PointerProxy operator->() const
Definition IVar.hpp:86
Iterator(const Iterator &)
This class represents an instance variable (ivar)
Definition IVar.hpp:34
std::string mangled_type() const
Type of the instance var in its mangled representation ([29i])
IVar(std::unique_ptr< details::IVar > impl)
std::string name() const
Name of the instance variable.
Definition ObjC/Class.hpp:32
Namespace related to ObjC metadata.
Definition MachO/Binary.hpp:41
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41