From 11768f9227cf97c0e8e423d216403491ac975405 Mon Sep 17 00:00:00 2001
From: Fabian Paus <fabian.paus@kit.edu>
Date: Tue, 4 Jan 2022 17:25:55 +0100
Subject: [PATCH] ArViz: Remove ArVizDrawerBase

---
 .../RobotAPI/components/ArViz/CMakeLists.txt  |  3 -
 .../ArViz/Client/drawer/ArVizDrawerBase.cpp   | 35 ----------
 .../ArViz/Client/drawer/ArVizDrawerBase.h     | 65 -------------------
 3 files changed, 103 deletions(-)
 delete mode 100644 source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.cpp
 delete mode 100644 source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.h

diff --git a/source/RobotAPI/components/ArViz/CMakeLists.txt b/source/RobotAPI/components/ArViz/CMakeLists.txt
index ea29dd86b..de69ba9af 100644
--- a/source/RobotAPI/components/ArViz/CMakeLists.txt
+++ b/source/RobotAPI/components/ArViz/CMakeLists.txt
@@ -18,7 +18,6 @@ set(SOURCES
     Client/elements/Line.cpp
     Client/elements/Path.cpp
 
-    Client/drawer/ArVizDrawerBase.cpp
     Client/ScopedClient.cpp
 
 )
@@ -45,8 +44,6 @@ set(HEADERS
     Client/elements/Line.h
     Client/elements/Path.h
 
-    Client/drawer/ArVizDrawerBase.h
-
     Client/elements/point_cloud_type_traits.hpp
 )
 
diff --git a/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.cpp b/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.cpp
deleted file mode 100644
index 1dc87da8e..000000000
--- a/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "ArVizDrawerBase.h"
-
-#include "RobotAPI/components/ArViz/Client/Client.h"
-#include "RobotAPI/components/ArViz/Client/Layer.h"
-
-namespace armarx
-{
-
-    ArVizDrawerBase::ArVizDrawerBase(armarx::viz::Client& arviz) : arvizClient(arviz) {}
-
-    ArVizDrawerBase::~ArVizDrawerBase() = default;
-
-    viz::ScopedClient& ArVizDrawerBase::arviz()
-    {
-        return arvizClient;
-    }
-
-    const viz::ScopedClient& ArVizDrawerBase::arviz() const
-    {
-        return arvizClient;
-    }
-
-    void ArVizDrawerBase::commit(const viz::Layer& layer)
-    {
-        // std::lock_guard guard{layerMtx};
-        arvizClient.commit({layer});
-    }
-
-    void ArVizDrawerBase::commit(const std::vector<viz::Layer>& layers)
-    {
-        // std::lock_guard guard{layerMtx};
-        arvizClient.commit(layers);
-    }
-
-} // namespace armarx
diff --git a/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.h b/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.h
deleted file mode 100644
index fffd7fbb5..000000000
--- a/source/RobotAPI/components/ArViz/Client/drawer/ArVizDrawerBase.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @author     Fabian Reister ( fabian dot reister at kit dot edu )
- * @date       2021
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#pragma once
-
-#include <mutex>
-#include <vector>
-
-#include "RobotAPI/components/ArViz/Client/ScopedClient.h"
-
-namespace armarx
-{
-    // forward declaration
-    namespace viz
-    {
-        class Client;
-        struct Layer;
-    } // namespace viz
-
-    /**
-     * @brief The ArVizDrawerBase class. Use this class to draw arbitrary objects.
-     *
-     * Instead of implementing arviz drawing in the component itself, this class helps to
-     * decouple drawing from "component / processing logic".
-     *
-     */
-    class ArVizDrawerBase
-    {
-    public:
-        ArVizDrawerBase(armarx::viz::Client& arviz);
-        virtual ~ArVizDrawerBase();
-
-    protected:
-        viz::ScopedClient& arviz();
-        const viz::ScopedClient& arviz() const;
-
-        void commit(const viz::Layer& layer);
-        void commit(const std::vector<viz::Layer>& layers);
-
-    private:
-        viz::ScopedClient arvizClient;
-
-        // Mutex is no longer necessary ==> This class can be removed!
-        // std::mutex layerMtx;
-    };
-
-} // namespace armarx
-- 
GitLab