____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

LuaCallback Class Reference

#include <luacallback.h>

List of all members.

Public Member Functions

 LuaCallback (lua_State *lua, lua_Object luaref)
virtual ~LuaCallback ()
virtual void pushPreamble ()
virtual void pushInteger (int value)
virtual void pushString (const std::string &eventId)
virtual void run ()


Detailed Description

Definition at line 36 of file luacallback.h.


Constructor & Destructor Documentation

LuaCallback::LuaCallback ( lua_State *  l,
lua_Object  f 
)

LuaCallback constructor

Parameters:
l Lua state
f Listener function

Definition at line 43 of file luacallback.cpp.

References Assert, and LuaError.

LuaCallback::~LuaCallback (  )  [virtual]

LuaActionListener destructor

Definition at line 116 of file luacallback.cpp.


Member Function Documentation

void LuaCallback::pushPreamble (  )  [virtual]

Push the preamble on the stack to call the callback. Call this function before pushing the arguments on the lua stack.

Definition at line 58 of file luacallback.cpp.

Referenced by LuaActionListener::action(), LetUnitDie(), and MissileHit().

void LuaCallback::pushInteger ( int  value  )  [virtual]

Push a string argument for the callback on the stack.

Parameters:
value the integer to push on the stack

Definition at line 72 of file luacallback.cpp.

Referenced by LetUnitDie(), and MissileHit().

void LuaCallback::pushString ( const std::string &  s  )  [virtual]

Push a string argument for the callback on the stack.

Parameters:
s the string to push on the stack

Definition at line 84 of file luacallback.cpp.

Referenced by LuaActionListener::action().

void LuaCallback::run (  )  [virtual]

Called when an action is recieved from a Widget. It is used to be able to recieve a notification that an action has occured.

Definition at line 96 of file luacallback.cpp.

Referenced by LuaActionListener::action(), LetUnitDie(), and MissileHit().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:25 2009 for Bos Wars by  doxygen 1.5.6