232 template<
typename Arg1,
typename... Args>
233 void operator()(Arg1&& arg1, Args&&... args);
703 void dispatch(const T& obj);
707 std::set<
size_t> visited_;
712template<typename Arg1, typename... Args>
713void Visitor::operator()(Arg1&& arg1, Args&&... args) {
714 dispatch(std::forward<Arg1>(arg1));
715 operator()(std::forward<Args>(args)... );
720 auto hash =
reinterpret_cast<size_t>(&obj);
721 if (visited_.find(
hash) != std::end(visited_)) {
726 visited_.insert(
hash);
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:49
Class that represents a function in the binary.
Definition Abstract/Function.hpp:29
Class which represents an abstracted Relocation.
Definition Abstract/Relocation.hpp:27
Class which represents an abstracted section.
Definition Abstract/Section.hpp:29
This class represents a symbol in an executable format.
Definition Abstract/Symbol.hpp:28
Definition Visitor.hpp:225
virtual void operator()()
virtual void visit(const Object &)
void dispatch(const T &obj)
Definition Visitor.hpp:719
LIEF namespace.
Definition Abstract/Binary.hpp:36
Hash::value_type hash(const Object &v)
#define LIEF_API
Definition visibility.h:41
#define LIEF_ABSTRACT_FORWARD(OBJ)
Definition visitor_macros.hpp:126
#define LIEF_VDEX_FORWARD(OBJ)
Definition visitor_macros.hpp:98
#define LIEF_MACHO_VISITABLE(OBJ)
Definition visitor_macros.hpp:57
#define LIEF_ART_FORWARD(OBJ)
Definition visitor_macros.hpp:113
#define LIEF_ABSTRACT_VISITABLE(OBJ)
Definition visitor_macros.hpp:129
#define LIEF_DEX_VISITABLE(OBJ)
Definition visitor_macros.hpp:87
#define LIEF_OAT_FORWARD(OBJ)
Definition visitor_macros.hpp:68
#define LIEF_PE_VISITABLE(OBJ)
Definition visitor_macros.hpp:28
#define LIEF_VDEX_VISITABLE(OBJ)
Definition visitor_macros.hpp:102
#define LIEF_DEX_FORWARD(OBJ)
Definition visitor_macros.hpp:83
#define LIEF_MACHO_FORWARD(OBJ)
Definition visitor_macros.hpp:53
#define LIEF_ART_VISITABLE(OBJ)
Definition visitor_macros.hpp:117
#define LIEF_ELF_VISITABLE(OBJ)
Definition visitor_macros.hpp:43
#define LIEF_PE_FORWARD(OBJ)
Definition visitor_macros.hpp:23
#define LIEF_OAT_VISITABLE(OBJ)
Definition visitor_macros.hpp:72
#define LIEF_ELF_FORWARD(OBJ)
Definition visitor_macros.hpp:39