#include "archive.hpp" #ifndef WIN32 #include #endif namespace ngcore { // clang-tidy should ignore this static object static std::map library_versions; // NOLINT std::map& Archive :: GetLibraryVersions() { return library_versions; } const VersionInfo& GetLibraryVersion(const std::string& library) { return library_versions[library]; } void SetLibraryVersion(const std::string& library, const VersionInfo& version) { library_versions[library] = version; } // clang-tidy should ignore this static object static std::unique_ptr> type_register; // NOLINT const detail::ClassArchiveInfo& Archive :: GetArchiveRegister(const std::string& classname) { if(type_register == nullptr) type_register = std::make_unique>(); return (*type_register)[classname]; } void Archive :: SetArchiveRegister(const std::string& classname, const detail::ClassArchiveInfo& info) { if(type_register == nullptr) type_register = std::make_unique>(); (*type_register)[classname] = info; } bool Archive :: IsRegistered(const std::string& classname) { if(type_register == nullptr) type_register = std::make_unique>(); return type_register->count(classname) != 0; } } // namespace ngcore