Lua_icxx  1.02 (Aug 2011)
LuaStackCleaner Class Reference

Maintains Lua stack: Automatically resets, when destroyed, the stack to where it was at construction. More...

#include <LuaStackCleaner.h>

List of all members.

Public Member Functions

 LuaStackCleaner (lua_State *L)
 Capture current stack level on L.
 ~LuaStackCleaner ()
 Restore stack to level at construction.
bool willPop (int n) const
 returns true if it would pop n items off the Lua stack
int getStackLevelOrig () const
 get stack level at construction

Detailed Description

Maintains Lua stack: Automatically resets, when destroyed, the stack to where it was at construction.

Can also verify how many stack items would be popped if it were destroyed now.

Definition at line 16 of file LuaStackCleaner.h.