6#include <unordered_map>
24 using RegistryType = std::unordered_map<std::string, Types::NamespaceInfo>;
64#define REGISTER_NAMESPACE(name, version, specVariables) \
67 struct NamespaceRegistrar \
69 NamespaceRegistrar() \
71 NamespaceRegistry::instance().registerNamespace( \
72 name, {name, version, specVariables}); \
75 static NamespaceRegistrar registrar; \
Singleton class to manage the registration and lookup of namespace information.
Definition NamespaceRegistry.hpp:22
std::unordered_map< std::string, Types::NamespaceInfo > RegistryType
Definition NamespaceRegistry.hpp:24
void registerNamespace(const std::string &name, const Types::NamespaceInfo &info)
Register a namespace with its information.
Definition NamespaceRegistry.cpp:12
static NamespaceRegistry & instance()
Get the singleton instance of the NamespaceRegistry.
Definition NamespaceRegistry.cpp:6
RegistryType registry_
The registry storing namespace information.
Definition NamespaceRegistry.hpp:55
const Types::NamespaceInfo * getNamespaceInfo(const std::string &name) const
Get the namespace information for a given namespace name.
Definition NamespaceRegistry.cpp:18
const RegistryType & getAllNamespaces() const
Get all registered namespaces.
Definition NamespaceRegistry.cpp:28
The namespace for managing format schema and namespaces.
Struct to hold namespace information.
Definition Types.hpp:92