Go to the documentation of this file.
15#ifndef LIEF_OBJC_METHOD_H
16#define LIEF_OBJC_METHOD_H
35 using iterator_category = std::bidirectional_iterator_tag;
36 using value_type = std::unique_ptr<Method>;
37 using difference_type = std::ptrdiff_t;
38 using pointer = Method*;
39 using reference = std::unique_ptr<Method>&;
40 using implementation = details::MethodIt;
44 friend class Iterator;
51 template <
typename RefT>
52 PointerProxy(RefT &&R) : R(std::forward<RefT>(R)) {}
57 Iterator(std::unique_ptr<details::MethodIt> impl);
60 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
62 friend
LIEF_API bool operator!=(const Iterator& LHS, const Iterator& RHS) {
70 Iterator tmp = *
static_cast<Iterator*
>(
this);
71 --*
static_cast<Iterator *
>(
this);
76 Iterator tmp = *
static_cast<Iterator*
>(
this);
77 ++*
static_cast<Iterator *
>(
this);
84 return static_cast<const Iterator*
>(
this)->
operator*();
88 std::unique_ptr<details::MethodIt> impl_;
92 Method(std::unique_ptr<details::Method> impl);
93 std::string
name()
const;
108 std::unique_ptr<details::Method> impl_;
pointer operator->() const
Definition ObjC/Method.hpp:46
Iterator(Iterator &&) noexcept
Iterator(const Iterator &)
std::unique_ptr< Method > operator*() const
Iterator operator++(int)
Definition ObjC/Method.hpp:75
Iterator operator--(int)
Definition ObjC/Method.hpp:69
PointerProxy operator->() const
Definition ObjC/Method.hpp:83
This class represents an Objective-C Method.
Definition ObjC/Method.hpp:31
bool is_instance() const
Whether it's an instance method.
Method(std::unique_ptr< details::Method > impl)
std::string name() const
Name of the method.
std::string mangled_type() const
Prototype of the method in its mangled representation (e.g. @16@0:8)
uintptr_t address() const
Virtual address where this method is implemented in the binary.
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