[core] Remove unused Printable trait (#1454)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 11 Sep 2018 10:36:48 +0000 (19:36 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 11 Sep 2018 10:36:48 +0000 (19:36 +0900)
This commit removes unused Printable trait declaration and related
implementations and tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
libs/core/include/nncc/core/ADT/Printable.h [deleted file]
libs/core/src/ADT/Printable.cpp [deleted file]
libs/core/src/ADT/Printable.test.cpp [deleted file]

diff --git a/libs/core/include/nncc/core/ADT/Printable.h b/libs/core/include/nncc/core/ADT/Printable.h
deleted file mode 100644 (file)
index 7ae903a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef __NNCC_CORE_ADT_PRINTABLE_H__
-#define __NNCC_CORE_ADT_PRINTABLE_H__
-
-#include <ostream>
-
-namespace nncc
-{
-namespace core
-{
-namespace ADT
-{
-
-struct Printable
-{
-  virtual ~Printable() = default;
-
-  virtual void print(std::ostream &os) const = 0;
-};
-
-std::ostream &operator<<(std::ostream &os, const Printable &prn);
-
-} // namespace ADT
-} // namespace core
-} // namespace nncc
-
-#endif // __NNCC_CORE_ADT_PRINTABLE_H__
diff --git a/libs/core/src/ADT/Printable.cpp b/libs/core/src/ADT/Printable.cpp
deleted file mode 100644 (file)
index 2af3881..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "nncc/core/ADT/Printable.h"
-
-namespace nncc
-{
-namespace core
-{
-namespace ADT
-{
-
-std::ostream &operator<<(std::ostream &os, const Printable &prn)
-{
-  prn.print(os);
-  return os;
-}
-
-} // namespace ADT
-} // namespace core
-} // namespace nncc
diff --git a/libs/core/src/ADT/Printable.test.cpp b/libs/core/src/ADT/Printable.test.cpp
deleted file mode 100644 (file)
index 10d0c22..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <nncc/core/ADT/Printable.h>
-
-#include <string>
-#include <sstream>
-
-#include <gtest/gtest.h>
-
-namespace
-{
-
-class PrintableObject final : public nncc::core::ADT::Printable
-{
-public:
-  PrintableObject(const std::string &message) : _message{message}
-  {
-    // DO NOTHING
-  }
-
-public:
-  void print(std::ostream &os) const override { os << _message; }
-
-private:
-  const std::string _message;
-};
-}
-
-TEST(ADT_PRINTABLE, shift_operator)
-{
-  const std::string message{"hello"};
-  const ::PrintableObject object{message};
-
-  std::stringstream ss;
-
-  ss << object;
-
-  ASSERT_EQ(ss.str(), message);
-}