2018-11-29 18:35:30 +01:00
|
|
|
|
|
|
|
#include "ngcore.hpp"
|
|
|
|
|
2018-12-04 11:13:12 +01:00
|
|
|
#ifndef WIN
|
|
|
|
#include <cxxabi.h>
|
|
|
|
#endif
|
|
|
|
|
2018-11-29 18:35:30 +01:00
|
|
|
namespace ngcore
|
|
|
|
{
|
2018-12-06 17:53:44 +01:00
|
|
|
static std::map<std::string, VersionInfo> library_versions;
|
|
|
|
std::map<std::string, VersionInfo>& Archive :: GetLibraryVersions()
|
2018-12-05 14:20:24 +01:00
|
|
|
{
|
|
|
|
return library_versions;
|
|
|
|
}
|
2018-12-06 17:53:44 +01:00
|
|
|
VersionInfo GetLibraryVersion(const std::string& library)
|
|
|
|
{ return library_versions[library]; }
|
|
|
|
|
|
|
|
void SetLibraryVersion(const std::string& library, VersionInfo version)
|
|
|
|
{ library_versions[library] = version; }
|
|
|
|
|
2018-12-04 11:13:12 +01:00
|
|
|
#ifdef WIN
|
|
|
|
// windows does demangling in typeid(T).name()
|
|
|
|
std::string demangle(const char* typeinfo) { return typeinfo; }
|
|
|
|
#else
|
|
|
|
std::string demangle(const char* typeinfo) { int status; return abi::__cxa_demangle(typeinfo, 0, 0, &status); }
|
|
|
|
#endif
|
|
|
|
|
2018-12-03 16:28:04 +01:00
|
|
|
std::map<std::string, ClassArchiveInfo>& GetArchiveRegister()
|
2018-11-29 18:35:30 +01:00
|
|
|
{
|
2018-12-03 16:28:04 +01:00
|
|
|
static std::map<std::string, ClassArchiveInfo> type_register;
|
2018-11-29 18:35:30 +01:00
|
|
|
return type_register;
|
|
|
|
}
|
|
|
|
}
|