From cb8e039fd660585189c1b898f3ee6cff275944f0 Mon Sep 17 00:00:00 2001 From: Tom Vierjahn Date: Wed, 17 Jan 2018 15:56:14 +0100 Subject: [PATCH] Remove superfluous ConduitData from pyniv --- pyniv/src/conduit_data.cpp | 48 ----------------------------------- pyniv/src/conduit_data.hpp | 51 -------------------------------------- pyniv/src/pyniv.cpp | 4 +-- 3 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 pyniv/src/conduit_data.cpp delete mode 100644 pyniv/src/conduit_data.hpp diff --git a/pyniv/src/conduit_data.cpp b/pyniv/src/conduit_data.cpp deleted file mode 100644 index af7e77b..0000000 --- a/pyniv/src/conduit_data.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//------------------------------------------------------------------------------ -// nest in situ vis -// -// Copyright (c) 2017-2018 RWTH Aachen University, Germany, -// Virtual Reality & Immersive Visualisation Group. -//------------------------------------------------------------------------------ -// License -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//------------------------------------------------------------------------------ - -#include "pyniv.hpp" - -#include // NOLINT - -#include "conduit_data.hpp" - -namespace pyniv { - -ConduitData::ConduitData() { node_["V_m"] = 1.2; } - -ConduitData::ConduitData(const conduit::Node& node) { node_ = node; } - -void ConduitData::Set(const char* path, double value) { node_[path] = value; } - -double ConduitData::Get(const char* path) { return node_[path].as_double(); } - -void ConduitData::Print() const { std::cout << node_.to_json() << std::endl; } - -template <> -void expose() { - class_("ConduitData") - .def("Set", &ConduitData::Set) - .def("Get", &ConduitData::Get) - .def("Print", &ConduitData::Print); -} - -} // namespace pyniv diff --git a/pyniv/src/conduit_data.hpp b/pyniv/src/conduit_data.hpp deleted file mode 100644 index 0e7cbd4..0000000 --- a/pyniv/src/conduit_data.hpp +++ /dev/null @@ -1,51 +0,0 @@ -//------------------------------------------------------------------------------ -// nest in situ vis -// -// Copyright (c) 2017-2018 RWTH Aachen University, Germany, -// Virtual Reality & Immersive Visualisation Group. -//------------------------------------------------------------------------------ -// License -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//------------------------------------------------------------------------------ - -#ifndef PYNIV_SRC_CONDUIT_DATA_HPP_ -#define PYNIV_SRC_CONDUIT_DATA_HPP_ - -#include "conduit/conduit.hpp" - -namespace pyniv { - -class ConduitData { - public: - ConduitData(); - explicit ConduitData(const conduit::Node& node); - - ~ConduitData() = default; - ConduitData(const ConduitData&) = default; - ConduitData(ConduitData&&) = default; - - void Set(const char* path, double value); - double Get(const char* path); - - void Print() const; - - const conduit::Node& GetNode() const { return node_; } - - private: - conduit::Node node_; -}; - -} // namespace pyniv - -#endif // PYNIV_SRC_CONDUIT_DATA_HPP_ diff --git a/pyniv/src/pyniv.cpp b/pyniv/src/pyniv.cpp index a86b733..185e507 100644 --- a/pyniv/src/pyniv.cpp +++ b/pyniv/src/pyniv.cpp @@ -33,8 +33,6 @@ SUPPRESS_WARNINGS_END #include "niv/nest_test_data.hpp" #include "niv/niv.hpp" -#include "conduit_data.hpp" - BOOST_PYTHON_MODULE(pyniv) { boost::python::numpy::initialize(); def("Greet", niv::Greet); @@ -43,8 +41,8 @@ BOOST_PYTHON_MODULE(pyniv) { pyniv::expose(); pyniv::expose(); - pyniv::expose(); pyniv::expose(); pyniv::expose(); + pyniv::expose(); }