Changeset 7654 in orxonox.OLD for branches/script_engine/src/lib/script_engine/RestoreStack.h
- Timestamp:
- May 17, 2006, 8:23:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/RestoreStack.h
r7653 r7654 2 2 #define __RESTORE_STACK_H__ 3 3 4 #include "luaincl.h" 4 5 #include "VirtualMachine.h" 6 /// Forward declaration 7 struct lua_State; 5 8 6 9 namespace OrxScript … … 16 19 * @param virtualMachine the virtual machine to save 17 20 */ 18 LuaRestoreStack (LuaVirtualMachine& virtualMachine) : savedState (NULL) 19 { 20 savedState = (lua_State *) virtualMachine; 21 if (virtualMachine.isOk ()) 22 { 23 savedTopIndex = lua_gettop (savedState); 24 } 25 } 26 /** 27 * @brief Restores the virtual machine 28 * 29 * 30 */ 31 virtual ~LuaRestoreStack (void) 32 { 33 lua_settop (savedState, savedTopIndex); 34 } 21 LuaRestoreStack (LuaVirtualMachine& virtualMachine); 22 virtual ~LuaRestoreStack (void); 35 23 36 24 protected:
Note: See TracChangeset
for help on using the changeset viewer.