xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aurora::Lua::FunctionRef Class Reference

A reference to a Lua function. More...

#include <function.h>

Public Member Functions

 FunctionRef ()
 
 FunctionRef (const Stack &stack, int index)
 
 FunctionRef (lua_State &state, int index)
 
 FunctionRef (const FunctionRef &fn)
 
 ~FunctionRef ()
 
const FunctionRefoperator= (const FunctionRef &fn)
 
Variables call (const Variables &params) const
 
Variables call () const
 
Variables call (const Variable &v) const
 
Variables call (const Variable &v1, const Variable &v2) const
 
Variables call (const Variable &v1, const Variable &v2, const Variable &v3) const
 
Variables call (const Variable &v1, const Variable &v2, const Variable &v3, const Variable &v4) const
 
lua_State & getLuaState () const
 
int getRef () const
 

Private Member Functions

void pushSelf () const
 

Private Attributes

lua_State * _luaState
 
int _ref
 

Detailed Description

A reference to a Lua function.

Definition at line 35 of file function.h.

Constructor & Destructor Documentation

◆ FunctionRef() [1/4]

Aurora::Lua::FunctionRef::FunctionRef ( )

Definition at line 38 of file function.cpp.

◆ FunctionRef() [2/4]

Aurora::Lua::FunctionRef::FunctionRef ( const Stack stack,
int  index 
)

Definition at line 42 of file function.cpp.

References _luaState, and _ref.

◆ FunctionRef() [3/4]

Aurora::Lua::FunctionRef::FunctionRef ( lua_State &  state,
int  index 
)

Definition at line 47 of file function.cpp.

References _luaState, and _ref.

◆ FunctionRef() [4/4]

Aurora::Lua::FunctionRef::FunctionRef ( const FunctionRef fn)

Definition at line 52 of file function.cpp.

References _luaState, and _ref.

◆ ~FunctionRef()

Aurora::Lua::FunctionRef::~FunctionRef ( )

Definition at line 59 of file function.cpp.

References _luaState, and _ref.

Member Function Documentation

◆ call() [1/6]

Variables Aurora::Lua::FunctionRef::call ( const Variables params) const

Definition at line 85 of file function.cpp.

References _luaState, Aurora::Lua::Stack::getLuaState(), Aurora::Lua::Stack::getSize(), Aurora::Lua::Stack::getVariablesFromTop(), pushSelf(), and Aurora::Lua::Stack::pushVariables().

Referenced by Aurora::Lua::ScriptManager::callFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ call() [2/6]

Variables Aurora::Lua::FunctionRef::call ( ) const

Definition at line 102 of file function.cpp.

Referenced by call().

Here is the caller graph for this function:

◆ call() [3/6]

Variables Aurora::Lua::FunctionRef::call ( const Variable v) const

Definition at line 106 of file function.cpp.

References call().

Here is the call graph for this function:

◆ call() [4/6]

Variables Aurora::Lua::FunctionRef::call ( const Variable v1,
const Variable v2 
) const

Definition at line 112 of file function.cpp.

References call().

Here is the call graph for this function:

◆ call() [5/6]

Variables Aurora::Lua::FunctionRef::call ( const Variable v1,
const Variable v2,
const Variable v3 
) const

Definition at line 119 of file function.cpp.

References call().

Here is the call graph for this function:

◆ call() [6/6]

Variables Aurora::Lua::FunctionRef::call ( const Variable v1,
const Variable v2,
const Variable v3,
const Variable v4 
) const

Definition at line 127 of file function.cpp.

References call().

Here is the call graph for this function:

◆ getLuaState()

lua_State & Aurora::Lua::FunctionRef::getLuaState ( ) const

Definition at line 136 of file function.cpp.

References _luaState.

◆ getRef()

int Aurora::Lua::FunctionRef::getRef ( ) const

Definition at line 142 of file function.cpp.

References _ref.

Referenced by Aurora::Lua::Stack::pushFunction().

Here is the caller graph for this function:

◆ operator=()

const FunctionRef & Aurora::Lua::FunctionRef::operator= ( const FunctionRef fn)

Definition at line 65 of file function.cpp.

References _luaState, and _ref.

◆ pushSelf()

void Aurora::Lua::FunctionRef::pushSelf ( ) const
private

Definition at line 146 of file function.cpp.

References _luaState, and _ref.

Referenced by call().

Here is the caller graph for this function:

Member Data Documentation

◆ _luaState

lua_State* Aurora::Lua::FunctionRef::_luaState
private

Definition at line 57 of file function.h.

Referenced by call(), FunctionRef(), getLuaState(), operator=(), pushSelf(), and ~FunctionRef().

◆ _ref

int Aurora::Lua::FunctionRef::_ref
private

Definition at line 58 of file function.h.

Referenced by FunctionRef(), getRef(), operator=(), pushSelf(), and ~FunctionRef().


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