Pioneer
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LuaMetaTypeGeneric Class Reference

#include <LuaMetaType.h>

Inheritance diagram for LuaMetaTypeGeneric:
Inheritance graph
[legend]
Collaboration diagram for LuaMetaTypeGeneric:
Collaboration graph
[legend]

Public Types

using Self = LuaMetaTypeGeneric
 

Public Member Functions

 LuaMetaTypeGeneric (const char *name)
 
SelfStartRecording ()
 
SelfStopRecording ()
 
SelfSetProtected (bool enabled)
 
SelfAddMember (const char *name, lua_CFunction getter)
 
SelfAddFunction (const char *name, lua_CFunction func)
 
template<typename Rt , typename... Args>
SelfAddFunction (const char *name, free_function< Rt, Args... > func)
 
SelfAddMeta (const char *name, lua_CFunction func)
 
template<typename Rt , typename... Args>
SelfAddMeta (const char *name, free_function< Rt, Args... > func)
 
SelfAddCallCtor (lua_CFunction func)
 
SelfAddNewCtor (lua_CFunction func)
 
- Public Member Functions inherited from LuaMetaTypeBase
 LuaMetaTypeBase (const char *name)
 
void CreateMetaType (lua_State *l)
 
const char * GetTypeName () const
 
const char * GetParent () const
 
void SetParent (const char *parent)
 
void GetMetatable () const
 
bool IsValid () const
 
void StartRecording ()
 
void StopRecording ()
 

Additional Inherited Members

- Static Public Member Functions inherited from LuaMetaTypeBase
static void GetNames (std::vector< std::string > &names, const std::string &prefix="", bool methodsOnly=false)
 
static bool GetMetatableFromName (lua_State *l, const char *name)
 
static void * TestUserdata (lua_State *l, int index, const char *name)
 
static void * CheckUserdata (lua_State *l, int index, const char *name)
 
- Protected Types inherited from LuaMetaTypeBase
template<typename Rt , typename... Args>
using free_function = Rt(*)(Args...)
 
template<typename T , typename Dt >
using member_pointer = Dt T::*
 
template<typename T >
using member_cfunction = int(*)(lua_State *, T *)
 
template<typename T , typename Rt , typename... Args>
using member_function = Rt(T::*)(Args...)
 
template<typename T , typename Rt , typename... Args>
using const_member_function = Rt(T::*)(Args...) const
 
- Protected Member Functions inherited from LuaMetaTypeBase
void GetAttrTable (lua_State *L, int index)
 
void GetMethodTable (lua_State *L, int index)
 
- Static Protected Member Functions inherited from LuaMetaTypeBase
template<typename Rt , typename... Args>
static std::enable_if<!std::is_same< Rt, void >::value, int >::type free_fn_wrapper_ (lua_State *L)
 
template<typename Rt , typename... Args>
static std::enable_if< std::is_same< Rt, void >::value, int >::type free_fn_wrapper_ (lua_State *L)
 
template<typename T , typename Dt >
static int member_wrapper_ (lua_State *L)
 
template<typename T >
static int member_cfn_wrapper_ (lua_State *L)
 
template<typename T >
static int getter_member_cfn_wrapper_ (lua_State *L)
 
template<typename T , typename Rt , typename... Args>
static std::enable_if<!std::is_same< Rt, void >::value, int >::type member_fn_wrapper_ (lua_State *L)
 
template<typename T , typename Rt , typename... Args>
static std::enable_if< std::is_same< Rt, void >::value, int >::type member_fn_wrapper_ (lua_State *L)
 
template<typename T , typename Dt , typename Dt2 >
static int getter_member_fn_wrapper_ (lua_State *L)
 
template<typename MemT >
static void PushPointerToMember (lua_State *L, MemT obj)
 
template<typename MemT >
static MemT & PullPointerToMember (lua_State *L, int idx)
 
template<typename T >
static void PushFreeFunction (lua_State *L, T obj)
 
template<typename T >
static T PullFreeFunction (lua_State *L, int index)
 
- Protected Attributes inherited from LuaMetaTypeBase
std::string m_typeName
 
std::string m_parent
 
lua_State * m_lua
 
int m_ref = LUA_NOREF
 
int m_index = 0
 

Member Typedef Documentation

◆ Self

Constructor & Destructor Documentation

◆ LuaMetaTypeGeneric()

LuaMetaTypeGeneric::LuaMetaTypeGeneric ( const char *  name)
inline

Member Function Documentation

◆ AddCallCtor()

Self & LuaMetaTypeGeneric::AddCallCtor ( lua_CFunction  func)
inline
Here is the call graph for this function:

◆ AddFunction() [1/2]

template<typename Rt , typename... Args>
Self & LuaMetaTypeGeneric::AddFunction ( const char *  name,
free_function< Rt, Args... >  func 
)
inline
Here is the call graph for this function:

◆ AddFunction() [2/2]

Self & LuaMetaTypeGeneric::AddFunction ( const char *  name,
lua_CFunction  func 
)
inline
Here is the call graph for this function:

◆ AddMember()

Self & LuaMetaTypeGeneric::AddMember ( const char *  name,
lua_CFunction  getter 
)
inline
Here is the call graph for this function:

◆ AddMeta() [1/2]

template<typename Rt , typename... Args>
Self & LuaMetaTypeGeneric::AddMeta ( const char *  name,
free_function< Rt, Args... >  func 
)
inline
Here is the call graph for this function:

◆ AddMeta() [2/2]

Self & LuaMetaTypeGeneric::AddMeta ( const char *  name,
lua_CFunction  func 
)
inline
Here is the call graph for this function:

◆ AddNewCtor()

Self & LuaMetaTypeGeneric::AddNewCtor ( lua_CFunction  func)
inline
Here is the call graph for this function:

◆ SetProtected()

Self & LuaMetaTypeGeneric::SetProtected ( bool  enabled)
inline

◆ StartRecording()

Self & LuaMetaTypeGeneric::StartRecording ( )
inline
Here is the call graph for this function:

◆ StopRecording()

Self & LuaMetaTypeGeneric::StopRecording ( )
inline
Here is the call graph for this function:

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