nnc: Implement BackendModule class (#276)
authorVitaliy Cherepanov/AI Tools Lab/Engineer/삼성전자 <v.cherepanov@samsung.com>
Tue, 5 Jun 2018 10:43:33 +0000 (13:43 +0300)
committerSergey Vostokov/AI Tools Lab/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Tue, 5 Jun 2018 10:43:33 +0000 (13:43 +0300)
nnc: Implement BackendModule class

This commit implements BackendModule class

Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
contrib/nnc/include/module/BackendModule.h [new file with mode: 0644]
contrib/nnc/src/module/BackendModule.cpp [new file with mode: 0644]

diff --git a/contrib/nnc/include/module/BackendModule.h b/contrib/nnc/include/module/BackendModule.h
new file mode 100644 (file)
index 0000000..b8e14db
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __BACKEND_MODULE_H__
+#define __BACKEND_MODULE_H__
+
+#include "module/AbstractModule.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace module
+{
+
+class BackendModule : public AbstractModule
+{
+public:
+  static BackendModule &getInstance();
+  BackendModule &operator=(const BackendModule &) = delete;
+  BackendModule(const BackendModule &) = delete;
+
+private:
+  BackendModule();
+  ~BackendModule();
+};
+
+} // namespace module
+} // namespace contrib
+} // namespace nncc
+
+#endif // __BACKEND_MODULE_H__
diff --git a/contrib/nnc/src/module/BackendModule.cpp b/contrib/nnc/src/module/BackendModule.cpp
new file mode 100644 (file)
index 0000000..dc1f582
--- /dev/null
@@ -0,0 +1,20 @@
+#include "module/BackendModule.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace module
+{
+
+BackendModule &BackendModule::getInstance() {
+  static BackendModule instance;
+  return instance;
+}
+
+BackendModule::BackendModule() : AbstractModule(contrib::plugin::PluginType::typeBackEnd) {}
+BackendModule::~BackendModule() {}
+
+} // namespace module
+} // namespace contrib
+} // namespace nncc