libcmo21/BMap/BMExports.cpp

25 lines
512 B
C++
Raw Normal View History

#include "BMExports.hpp"
2023-09-23 15:55:57 +08:00
#include <IronPad.hpp>
#include <set>
static std::set<BMap::BMFile*> g_AllBMFiles = std::set<BMap::BMFile*>();
void BMInit() {
2023-09-23 15:55:57 +08:00
// register IronPad
IronPad::IronPadRegister();
// and startup CK environment
LibCmo::CK2::CKStartUp();
}
void BMDispose() {
2023-09-23 15:55:57 +08:00
// free all existed file reader / writer
for (auto ptr : g_AllBMFiles) {
delete ptr;
}
g_AllBMFiles.clear();
// shutdown CK environment
LibCmo::CK2::CKShutdown();
// unregister iron pad
IronPad::IronPadUnregister();
}