SirenObject DeserializeLua(LuaState& state, const ISirenType& type) { SirenObject obj; SirenLuaReader reader(state.GetState()); SirenObjectDeserializer deserializer(reader); if (deserializer.Deserialize(obj, type)) { return obj; } return SirenObject::Null; }
bool SerializeLua(const SirenObject& obj, const ISirenType& type, LuaState& state) { SirenLuaWriter writer(state.GetState()); SirenObjectSerializer serializer(writer); return serializer.Serialize(obj, type); }