2020-12-18 22:21:10 +00:00
|
|
|
#ifndef MWLUA_USERDATASERIALIZER_H
|
|
|
|
#define MWLUA_USERDATASERIALIZER_H
|
|
|
|
|
|
|
|
#include "object.hpp"
|
|
|
|
|
|
|
|
namespace LuaUtil
|
|
|
|
{
|
|
|
|
class UserdataSerializer;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWLua
|
|
|
|
{
|
|
|
|
// UserdataSerializer is an extension for components/lua/serialization.hpp
|
|
|
|
// Needed to serialize references to objects.
|
|
|
|
// If local=true, then during deserialization creates LObject, otherwise creates GObject.
|
2021-01-29 01:38:09 +00:00
|
|
|
// contentFileMapping is used only for deserialization. Needed to fix references if the order
|
|
|
|
// of content files was changed.
|
|
|
|
std::unique_ptr<LuaUtil::UserdataSerializer> createUserdataSerializer(
|
2022-12-23 18:57:12 +00:00
|
|
|
bool local, std::map<int, int>* contentFileMapping = nullptr);
|
2020-12-18 22:21:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // MWLUA_USERDATASERIALIZER_H
|