[nncc.foundation] Remove classes related Region (#2615)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 11 Dec 2018 09:15:27 +0000 (18:15 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 11 Dec 2018 09:15:27 +0000 (18:15 +0900)
There is no code that uses these classes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
libs/foundation/include/nncc/foundation/ExternalRegion.h [deleted file]
libs/foundation/include/nncc/foundation/OwnedRegion.h [deleted file]
libs/foundation/include/nncc/foundation/Region.h [deleted file]
libs/foundation/src/ExternalRegion.test.cpp [deleted file]
libs/foundation/src/OwnedRegion.test.cpp [deleted file]

diff --git a/libs/foundation/include/nncc/foundation/ExternalRegion.h b/libs/foundation/include/nncc/foundation/ExternalRegion.h
deleted file mode 100644 (file)
index 34adae0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 __NNCC_FOUNDATION_EXTERNAL_REGION_H__
-#define __NNCC_FOUNDATION_EXTERNAL_REGION_H__
-
-#include "nncc/foundation/Region.h"
-
-namespace nncc
-{
-namespace foundation
-{
-
-template <typename T> class ExternalRegion final : public Region<T>
-{
-public:
-  ExternalRegion(T *base, uint32_t size) : _base{base}, _size{size}
-  {
-    // DO NOTHING
-  }
-
-public:
-  T *base(void) override { return _base; }
-  uint32_t size(void) const override { return _size; }
-
-private:
-  T *const _base;
-  uint32_t const _size;
-};
-
-} // namespace foundation
-} // namespace nncc
-
-#endif // __NNCC_FOUNDATION_EXTERNAL_REGION_H__
diff --git a/libs/foundation/include/nncc/foundation/OwnedRegion.h b/libs/foundation/include/nncc/foundation/OwnedRegion.h
deleted file mode 100644 (file)
index 8b79922..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 __NNCC_FOUNDATION_OWNED_REGION_H__
-#define __NNCC_FOUNDATION_OWNED_REGION_H__
-
-#include "nncc/foundation/Region.h"
-
-namespace nncc
-{
-namespace foundation
-{
-
-template <typename T> class OwnedRegion final : public Region<T>
-{
-public:
-  OwnedRegion(uint32_t size) : _base{new T[size]}, _size{size}
-  {
-    // DO NOTHING
-  }
-
-public:
-  // Copy and move is not allowed
-  // TODO Allow move
-  OwnedRegion(const OwnedRegion &) = delete;
-  OwnedRegion(OwnedRegion &&r) = delete;
-
-public:
-  ~OwnedRegion() { delete[] _base; }
-
-public:
-  T *base(void) override { return _base; }
-  uint32_t size(void) const override { return _size; }
-
-private:
-  T *const _base;
-  uint32_t const _size;
-};
-
-} // namespace foundation
-} // namespace nncc
-
-#endif // __NNCC_FOUNDATION_OWNED_REGION_H__
diff --git a/libs/foundation/include/nncc/foundation/Region.h b/libs/foundation/include/nncc/foundation/Region.h
deleted file mode 100644 (file)
index 4188c75..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 __NNCC_FOUNDATION_REGION_H__
-#define __NNCC_FOUNDATION_REGION_H__
-
-#include <cstdint>
-
-namespace nncc
-{
-namespace foundation
-{
-
-template <typename T> struct Region
-{
-  virtual ~Region() = default;
-
-  virtual T *base(void) = 0;
-  virtual uint32_t size(void) const = 0;
-};
-
-} // namespace foundation
-} // namespace nncc
-
-#endif // __NNCC_FOUNDATION_REGION_H__
diff --git a/libs/foundation/src/ExternalRegion.test.cpp b/libs/foundation/src/ExternalRegion.test.cpp
deleted file mode 100644 (file)
index 9533563..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 <nncc/foundation/ExternalRegion.h>
-
-#include <gtest/gtest.h>
-
-TEST(FOUNDATION_EXTERNAL_REGION, ctor)
-{
-  int buffer[1];
-
-  nncc::foundation::ExternalRegion<int> r{buffer, 1};
-
-  ASSERT_EQ(r.size(), 1);
-  ASSERT_EQ(r.base(), buffer);
-}
diff --git a/libs/foundation/src/OwnedRegion.test.cpp b/libs/foundation/src/OwnedRegion.test.cpp
deleted file mode 100644 (file)
index 443fd02..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 <nncc/foundation/OwnedRegion.h>
-
-#include <gtest/gtest.h>
-
-TEST(FOUNDATION_OWNED_REGION, ctor)
-{
-  nncc::foundation::OwnedRegion<int> r{1};
-
-  ASSERT_EQ(r.size(), 1);
-  ASSERT_NE(r.base(), nullptr);
-}