1 #ifndef __LUA_SERIALIZE_H
2 #define __LUA_SERIALIZE_H
3 
4 /*
5 LUA_SERIALIZE.H
6 
7 	Copyright (C) 2008 by Gregory Smith
8 
9 	This program is free software; you can redistribute it and/or modify
10 	it under the terms of the GNU General Public License as published by
11 	the Free Software Foundation; either version 3 of the License, or
12 	(at your option) any later version.
13 
14 	This program is distributed in the hope that it will be useful,
15 	but WITHOUT ANY WARRANTY; without even the implied warranty of
16 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 	GNU General Public License for more details.
18 
19 	This license is contained in the file "COPYING",
20 	which is included with this source code; it is available online at
21 	http://www.gnu.org/licenses/gpl.html
22 
23 	Serializes Lua objects
24 */
25 
26 #include "cseries.h"
27 
28 #include <streambuf>
29 
30 #ifdef HAVE_LUA
31 extern "C"
32 {
33 #include "lua.h"
34 #include "lauxlib.h"
35 #include "lualib.h"
36 }
37 
38 // saves object on top of the stack to s
39 bool lua_save(lua_State *L, std::streambuf* sb);
40 
41 // restores object in s to top of the stack
42 bool lua_restore(lua_State *L, std::streambuf* sb);
43 
44 #endif
45 
46 #endif
47