CEGUI::LuaFunctor Class Reference

Functor class used for subscribing Lua functions to CEGUI events. More...

#include <src/ceguilua/ceguilua-0.6.2/ceguilua/CEGUILuaFunctor.h>

List of all members.

Public Member Functions

 LuaFunctor (const LuaFunctor &cp)
 LuaFunctor (lua_State *state, const String &func, const int selfIndex, const int error_handler)
 LuaFunctor (lua_State *state, const int func, const int selfIndex, const int error_handler)
 LuaFunctor (lua_State *state, const String &func, const int selfIndex, const String &error_handler)
 LuaFunctor (lua_State *state, const int func, const int selfIndex, const String &error_handler)
 LuaFunctor (lua_State *state, const String &func, int selfIndex)
 LuaFunctor (lua_State *state, int func, int selfIndex)
 LuaFunctor (const LuaFunctor &cp)
 LuaFunctor (lua_State *state, const String &func, int selfIndex)
 LuaFunctor (lua_State *state, int func, int selfIndex)
 LuaFunctor (const LuaFunctor &cp)
 LuaFunctor (lua_State *state, const String &func, int selfIndex)
 LuaFunctor (lua_State *state, int func, int selfIndex)
 LuaFunctor (const LuaFunctor &cp)
 LuaFunctor (lua_State *state, const String &func, int selfIndex)
 LuaFunctor (lua_State *state, int func, int selfIndex)
bool operator() (const EventArgs &args) const
bool operator() (const EventArgs &args) const
bool operator() (const EventArgs &args) const
bool operator() (const EventArgs &args) const
 ~LuaFunctor ()
 ~LuaFunctor ()
 ~LuaFunctor ()
 ~LuaFunctor ()

Static Public Member Functions

static void pushNamedFunction (lua_State *L, const String &name)
 Pushes the Lua function named.
static void pushNamedFunction (lua_State *L, const String &name)
 Pushes the Lua function named.
static void pushNamedFunction (lua_State *L, const String &name)
 Pushes the Lua function named.
static void pushNamedFunction (lua_State *L, const String &name)
 Pushes the Lua function named.
static Event::Connection SubscribeEvent (EventSet *self, const String &eventName, const int funcIndex, const int selfIndex, const int error_handler, lua_State *L)
 function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.
static Event::Connection SubscribeEvent (EventSet *self, const String &eventName, int funcIndex, int selfIndex, lua_State *L)
 function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.
static Event::Connection SubscribeEvent (EventSet *self, const String &eventName, int funcIndex, int selfIndex, lua_State *L)
 function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.
static Event::Connection SubscribeEvent (EventSet *self, const String &eventName, int funcIndex, int selfIndex, lua_State *L)
 function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.

Private Attributes

int d_errFuncIndex
 registry index of the function to pass to lua_pcall.
String d_errFuncName
 Error handler function to pass to lua_pcall.
bool d_ourErrFuncIndex
 signfies whether we made the reference index at d_errFuncIndex.
String function_name
int index
lua_State * L
bool needs_lookup
int self

Friends

class LuaScriptModule


Detailed Description

Functor class used for subscribing Lua functions to CEGUI events.

Constructor & Destructor Documentation

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
int  func,
int  selfIndex 
)

Referenced by SubscribeEvent().

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( const LuaFunctor cp  ) 

CEGUI::LuaFunctor::~LuaFunctor (  ) 

References index, and L.

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
int  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( const LuaFunctor cp  ) 

CEGUI::LuaFunctor::~LuaFunctor (  ) 

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
int  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( const LuaFunctor cp  ) 

CEGUI::LuaFunctor::~LuaFunctor (  ) 

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
int  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
int  selfIndex 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const int  func,
const int  selfIndex,
const String &  error_handler 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
const int  selfIndex,
const String &  error_handler 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const int  func,
const int  selfIndex,
const int  error_handler 
)

CEGUI::LuaFunctor::LuaFunctor ( lua_State *  state,
const String &  func,
const int  selfIndex,
const int  error_handler 
)

CEGUI::LuaFunctor::LuaFunctor ( const LuaFunctor cp  ) 

CEGUI::LuaFunctor::~LuaFunctor (  ) 


Member Function Documentation

bool CEGUI::LuaFunctor::operator() ( const EventArgs &  args  )  const

bool CEGUI::LuaFunctor::operator() ( const EventArgs &  args  )  const

bool CEGUI::LuaFunctor::operator() ( const EventArgs &  args  )  const

bool CEGUI::LuaFunctor::operator() ( const EventArgs &  args  )  const

static void CEGUI::LuaFunctor::pushNamedFunction ( lua_State *  L,
const String &  name 
) [static]

Pushes the Lua function named.

Parameters:
name on top of the Lua stack. The name may contain '.' (dots) character for (nested) table values.

static void CEGUI::LuaFunctor::pushNamedFunction ( lua_State *  L,
const String &  name 
) [static]

Pushes the Lua function named.

Parameters:
name on top of the Lua stack. The name may contain '.' (dots) character for (nested) table values.

static void CEGUI::LuaFunctor::pushNamedFunction ( lua_State *  L,
const String &  name 
) [static]

Pushes the Lua function named.

Parameters:
name on top of the Lua stack. The name may contain '.' (dots) character for (nested) table values.

void CEGUI::LuaFunctor::pushNamedFunction ( lua_State *  L,
const String &  name 
) [static]

Pushes the Lua function named.

Parameters:
name on top of the Lua stack. The name may contain '.' (dots) character for (nested) table values.

Referenced by CEGUI::LuaScriptModule::executeScriptedEventHandler(), CEGUI::LuaScriptModule::executeScriptedEventHandler_impl(), CEGUI::LuaScriptModule::initErrorHandlerFunc(), and operator()().

Event::Connection CEGUI::LuaFunctor::SubscribeEvent ( EventSet *  self,
const String &  eventName,
const int  funcIndex,
const int  selfIndex,
const int  error_handler,
lua_State *  L 
) [static]

function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.

References d_errFuncIndex, index, LuaFunctor(), self, and orxonox::MT_Type::String.

static Event::Connection CEGUI::LuaFunctor::SubscribeEvent ( EventSet *  self,
const String &  eventName,
int  funcIndex,
int  selfIndex,
lua_State *  L 
) [static]

function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.

static Event::Connection CEGUI::LuaFunctor::SubscribeEvent ( EventSet *  self,
const String &  eventName,
int  funcIndex,
int  selfIndex,
lua_State *  L 
) [static]

function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.

Event::Connection CEGUI::LuaFunctor::SubscribeEvent ( EventSet *  self,
const String &  eventName,
int  funcIndex,
int  selfIndex,
lua_State *  L 
) [static]

function used to subscribe any Lua function as event handler. References using the Lua registry. To be called from Lua only.

References index, self, and orxonox::MT_Type::String.


Friends And Related Function Documentation

LuaScriptModule [friend]


Member Data Documentation

int CEGUI::LuaFunctor::d_errFuncIndex [mutable, private]

registry index of the function to pass to lua_pcall.

Referenced by SubscribeEvent(), and CEGUI::LuaScriptModule::subscribeEvent().

String CEGUI::LuaFunctor::d_errFuncName [mutable, private]

Error handler function to pass to lua_pcall.

bool CEGUI::LuaFunctor::d_ourErrFuncIndex [mutable, private]

signfies whether we made the reference index at d_errFuncIndex.

String CEGUI::LuaFunctor::function_name [mutable, private]

Referenced by operator()().

int CEGUI::LuaFunctor::index [mutable, private]

lua_State * CEGUI::LuaFunctor::L [private]

Referenced by operator()(), and ~LuaFunctor().

bool CEGUI::LuaFunctor::needs_lookup [mutable, private]

Referenced by operator()().

int CEGUI::LuaFunctor::self [private]

Referenced by SubscribeEvent().


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

Generated on Tue Jul 28 16:22:15 2009 for Orxonox by  doxygen 1.5.6