From 0aeba15c70f8c4caea05994580f41bcf50118ac5 Mon Sep 17 00:00:00 2001
From: cmoineau <cyril.moineau@cea.fr>
Date: Thu, 14 Mar 2024 15:36:53 +0000
Subject: [PATCH] Make toString pure virtual and remove data ctor binding.

---
 include/aidge/data/Data.hpp         | 2 +-
 python_binding/data/pybind_Data.cpp | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/aidge/data/Data.hpp b/include/aidge/data/Data.hpp
index 47ce3514d..a6ff03d36 100644
--- a/include/aidge/data/Data.hpp
+++ b/include/aidge/data/Data.hpp
@@ -52,7 +52,7 @@ public:
         return mType;
     }
     virtual ~Data() = default;
-    virtual std::string toString() const;
+    virtual std::string toString() const = 0;
 
 private:
     const std::string mType;
diff --git a/python_binding/data/pybind_Data.cpp b/python_binding/data/pybind_Data.cpp
index 724b10f87..bca246c94 100644
--- a/python_binding/data/pybind_Data.cpp
+++ b/python_binding/data/pybind_Data.cpp
@@ -29,8 +29,7 @@ void init_Data(py::module& m){
     .value("UInt64", DataType::UInt64)
     ;
 
-    py::class_<Data, std::shared_ptr<Data>>(m,"Data")
-    .def(py::init<const std::string&>());
+    py::class_<Data, std::shared_ptr<Data>>(m,"Data");
 
 
 }
-- 
GitLab