IVGCVSW-2037 : separate registry for layer support intrefaces

* because their lifetime is different from backends

Change-Id: I9ba525e7e503b148cde1294933f3954b8bad3d68
diff --git a/src/backends/BackendRegistry.hpp b/src/backends/BackendRegistry.hpp
index e2c526d..23cb37d 100644
--- a/src/backends/BackendRegistry.hpp
+++ b/src/backends/BackendRegistry.hpp
@@ -5,49 +5,19 @@
 #pragma once
 
 #include <armnn/Types.hpp>
-#include <functional>
-#include <memory>
-#include <unordered_map>
+#include "RegistryCommon.hpp"
 
 namespace armnn
 {
 
-class IBackend;
+using BackendRegistry = RegistryCommon<IBackend, IBackendUniquePtr>;
 
-class BackendRegistry
+BackendRegistry& BackendRegistryInstance();
+
+template <>
+struct RegisteredTypeName<IBackend>
 {
-public:
-    using FactoryFunction = std::function<IBackendUniquePtr()>;
-
-    static BackendRegistry& Instance();
-
-    void Register(const BackendId& id, FactoryFunction factory);
-    FactoryFunction GetFactory(const BackendId& id) const;
-
-    struct Helper
-    {
-        Helper(const BackendId& id, FactoryFunction factory)
-        {
-            BackendRegistry::Instance().Register(id, factory);
-        }
-    };
-
-    size_t Size() const { return m_BackendFactories.size(); }
-    BackendIdSet GetBackendIds() const;
-
-protected:
-    using FactoryStorage = std::unordered_map<BackendId, FactoryFunction>;
-
-    // For testing only
-    static void Swap(FactoryStorage& other);
-    BackendRegistry() {}
-    ~BackendRegistry() {}
-
-private:
-    BackendRegistry(const BackendRegistry&) = delete;
-    BackendRegistry& operator=(const BackendRegistry&) = delete;
-
-    FactoryStorage m_BackendFactories;
+    static const char * Name() { return "IBackend"; }
 };
 
 } // namespace armnn