Urho3D::LuaFunction Class Reference

Lua function. More...

#include <LuaFunction.h>

Inheritance diagram for Urho3D::LuaFunction:
[legend]
Collaboration diagram for Urho3D::LuaFunction:
[legend]

Public Member Functions

 LuaFunction (lua_State *lusState, int functionRef, bool needUnref=true)
 Construct.
 
 ~LuaFunction ()
 Destruct.
 
bool IsValid () const
 Check that function is valid.
 
bool BeginCall ()
 Begin function call.
 
bool BeginCall (const LuaScriptInstance *instance)
 Begin script object's function call.
 
bool EndCall (int numReturns=0)
 End call and actually execute the function.
 
void PushInt (int value)
 Push int to stack.
 
void PushBool (bool value)
 Push bool to stack.
 
void PushFloat (float value)
 Push float to stack.
 
void PushString (const String &string)
 Push string to stack.
 
void PushUserType (void *userType, const char *typeName)
 Push user type to stack.
 
template<typename T >
void PushUserType (const T *userType)
 Push user type to stack.
 
template<typename T >
void PushUserType (const T &userType)
 Push user type to stack.
 
template<typename T >
void PushUserType (const T *userType, const char *typeName)
 Push user type to stack.
 
template<typename T >
void PushUserType (const T &userType, const char *typeName)
 Push user type to stack.
 
bool PushVariant (const Variant &variant)
 Push variant to stack.
 
bool PushLuaTable (const String &tableName)
 Push Lua table to stack.
 
int GetFunctionRef () const
 Return function ref.
 
- Public Member Functions inherited from Urho3D::RefCounted
 RefCounted ()
 Construct. Allocate the reference count structure and set an initial self weak reference.
 
virtual ~RefCounted ()
 Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
 
void AddRef ()
 Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting.
 
void ReleaseRef ()
 Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting.
 
int Refs () const
 Return reference count.
 
int WeakRefs () const
 Return weak reference count.
 
RefCountRefCountPtr ()
 Return pointer to the reference count structure.
 

Private Attributes

lua_State * luaState_
 Lua state.
 
int functionRef_
 Function ref.
 
bool needUnref_
 Need unref.
 
int stackTop_
 Lua stack top.
 
int numArguments_
 Number of arguments.
 

Detailed Description

Lua function.


The documentation for this class was generated from the following files:
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/LuaScript/LuaFunction.h
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/LuaScript/LuaFunction.cpp