Refactor some parts of the Architecture:

* JSON visitor are located in the format namespace
  * Visitor are *real* visitor
  * Visitable class has been renamed to Object
  * Due to a bug in Visual Studio 2015, we move to VS2017
This commit is contained in:
Romain Thomas
2018-03-13 16:49:02 +01:00
parent a5c2922c83
commit 3b17aba10e
438 changed files with 8114 additions and 6004 deletions
+3 -9
View File
@@ -16,7 +16,7 @@
#include "pyELF.hpp"
#include "LIEF/ELF/DynamicEntry.hpp"
#include "LIEF/visitors/Hash.hpp"
#include "LIEF/ELF/hash.hpp"
#include <string>
#include <sstream>
@@ -30,7 +30,7 @@ using setter_t = void (DynamicEntry::*)(T);
void init_ELF_DynamicEntry_class(py::module& m) {
// DynamicEntry object
py::class_<DynamicEntry>(m, "DynamicEntry")
py::class_<DynamicEntry, LIEF::Object>(m, "DynamicEntry")
.def(py::init<>(),
"Default constructor")
@@ -48,17 +48,11 @@ void init_ELF_DynamicEntry_class(py::module& m) {
static_cast<setter_t<uint64_t>>(&DynamicEntry::value),
"Return the entry's value.")
.def_property("name",
static_cast<getter_t<const std::string&>>(&DynamicEntry::name),
static_cast<setter_t<const std::string&>>(&DynamicEntry::name),
"Depending on the entry type, it return a name. For instance for a ``DT_SONAME``\
entry it returns the library name")
.def("__eq__", &DynamicEntry::operator==)
.def("__ne__", &DynamicEntry::operator!=)
.def("__hash__",
[] (const DynamicEntry& entry) {
return LIEF::Hash::hash(entry);
return Hash::hash(entry);
})
.def("__str__",