231 template<
typename Arg1,
typename... Args>
232 void operator()(Arg1&& arg1, Args&&... args);
699 void dispatch(const T& obj);
703 std::set<
size_t> visited_;
708template<typename Arg1, typename... Args>
709void Visitor::operator()(Arg1&& arg1, Args&&... args) {
710 dispatch(std::forward<Arg1>(arg1));
711 operator()(std::forward<Args>(args)... );
716 auto hash =
reinterpret_cast<size_t>(&obj);
717 if (visited_.find(
hash) != std::end(visited_)) {
722 visited_.insert(
hash);
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:41
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:224
virtual void operator()()
virtual void visit(const Object &)
void dispatch(const T &obj)
Definition Visitor.hpp:715
LIEF namespace.
Definition Abstract/Binary.hpp:32
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