Go to the documentation of this file.
15#ifndef LIEF_OBJC_METHOD_H
16#define LIEF_OBJC_METHOD_H
36 using iterator_category = std::bidirectional_iterator_tag;
37 using value_type = std::unique_ptr<Method>;
38 using difference_type = std::ptrdiff_t;
39 using pointer = Method*;
40 using reference = std::unique_ptr<Method>&;
41 using implementation = details::MethodIt;
45 friend class Iterator;
52 template <
typename RefT>
53 PointerProxy(RefT &&R) : R(std::forward<RefT>(R)) {}
58 Iterator(std::unique_ptr<details::MethodIt> impl);
61 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
63 friend
LIEF_API bool operator!=(const Iterator& LHS, const Iterator& RHS) {
71 Iterator tmp = *
static_cast<Iterator*
>(
this);
72 --*
static_cast<Iterator *
>(
this);
77 Iterator tmp = *
static_cast<Iterator*
>(
this);
78 ++*
static_cast<Iterator *
>(
this);
85 return static_cast<const Iterator*
>(
this)->
operator*();
89 std::unique_ptr<details::MethodIt> impl_;
93 Method(std::unique_ptr<details::Method> impl);
94 std::string
name()
const;
109 std::unique_ptr<details::Method> impl_;
pointer operator->() const
Definition ObjC/Method.hpp:47
Iterator(Iterator &&) noexcept
Iterator(const Iterator &)
std::unique_ptr< Method > operator*() const
Iterator operator++(int)
Definition ObjC/Method.hpp:76
Iterator operator--(int)
Definition ObjC/Method.hpp:70
PointerProxy operator->() const
Definition ObjC/Method.hpp:84
This class represents an Objective-C Method.
Definition ObjC/Method.hpp:32
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