Implemented class StreamBuffer, which I'm quite satisfied with.
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
#ifndef LUASNAP_HPP
|
||||
#define LUASNAP_HPP
|
||||
|
||||
#include "packer.hpp"
|
||||
#include "StreamBuffer.hpp"
|
||||
#include "luastack.hpp"
|
||||
|
||||
class LuaSnap {
|
||||
private:
|
||||
lua_State *state_;
|
||||
std::string snapshot_;
|
||||
StreamBuffer snapshot_;
|
||||
|
||||
public:
|
||||
LuaSnap();
|
||||
@@ -32,11 +32,11 @@ public:
|
||||
|
||||
// Serialize the state of the lua interpreter.
|
||||
//
|
||||
void serialize(Packer *pk);
|
||||
void serialize(StreamBuffer *sb);
|
||||
|
||||
// Restore the the lua interpreter given a serialized state.
|
||||
//
|
||||
void deserialize(Unpacker *unpk);
|
||||
void deserialize(StreamBuffer *sb);
|
||||
|
||||
// Return true if there's a saved snapshot.
|
||||
//
|
||||
@@ -53,7 +53,6 @@ public:
|
||||
// If there is no snapshot, this panics.
|
||||
//
|
||||
void rollback();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user