Half finished with serialization routine
This commit is contained in:
40
luprex/cpp/core/serializelua.hpp
Normal file
40
luprex/cpp/core/serializelua.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This module contains routines to serialize and deserialize
|
||||
// lua data structures. These routines can handle cyclic data
|
||||
// structures.
|
||||
//
|
||||
// These routines are used for some specific difference
|
||||
// transmission cases, but they're not the heart of the lua
|
||||
// difference transmission system.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef SERIALIZELUA_HPP
|
||||
#define SERIALIZELUA_HPP
|
||||
|
||||
#include "luastack.hpp"
|
||||
#include "streambuffer.hpp"
|
||||
|
||||
// serialize_lua
|
||||
//
|
||||
// Serialize a value from the LuaSlot and store it in the StreamBuffer.
|
||||
// On success, returns empty string.
|
||||
//
|
||||
// If there is an error, returns an error message. In this case, the
|
||||
// streambuffer contains garbage.
|
||||
//
|
||||
eng::string serialize_lua(LuaStack &LS0, LuaSlot val, StreamBuffer *sb);
|
||||
|
||||
// deserialize_lua
|
||||
//
|
||||
// Deserialize a value from the StreamBuffer and store it in the LuaSlot.
|
||||
// On success, returns empty string.
|
||||
//
|
||||
// If there is an error, returns an error message. In this case, the
|
||||
// streambuffer is likely only partially consumed.
|
||||
//
|
||||
eng::string deserialize_lua(LuaStack &LS0, LuaSlot val, StreamBuffer *sb);
|
||||
|
||||
#endif // SERIALIZELUA_HPP
|
||||
Reference in New Issue
Block a user