Luwra
Minimal-overhead Lua wrapper for C++
Classes | Namespaces | Macros
wrappers.hpp File Reference

Classes

struct  luwra::internal::FunctionWrapperImpl< Ret, Args >
 
struct  luwra::internal::MethodWrapperImpl< MethodPointer, Klass >::ImplementationNonVoid< Args >
 
struct  luwra::internal::FunctionWrapperImpl< Ret, Args >::ImplementationNonVoid< Indices >
 
struct  luwra::internal::MethodWrapperImpl< MethodPointer, Klass >::ImplementationVoid< Args >
 
struct  luwra::internal::FunctionWrapperImpl< Ret, Args >::ImplementationVoid< Indices >
 
struct  luwra::internal::MemberWrapper< MemberPointer, Klass >
 
struct  luwra::internal::MemberWrapper< const FieldType BaseKlass::*, Klass >
 
struct  luwra::internal::MemberWrapper< FieldType BaseKlass::*, Klass >
 
struct  luwra::internal::MemberWrapper< Ret(BaseKlass::*)(Args...) const volatile, Klass >
 
struct  luwra::internal::MemberWrapper< Ret(BaseKlass::*)(Args...) const, Klass >
 
struct  luwra::internal::MemberWrapper< Ret(BaseKlass::*)(Args...) volatile, Klass >
 
struct  luwra::internal::MemberWrapper< Ret(BaseKlass::*)(Args...), Klass >
 
struct  luwra::internal::MethodWrapperImpl< MethodPointer, Klass >
 
struct  luwra::internal::MethodWrapperImpl< MethodPointer, Klass >::ImplementationNonVoid< Args >::SeqReceiver< Indices >
 
struct  luwra::internal::MethodWrapperImpl< MethodPointer, Klass >::ImplementationVoid< Args >::SeqReceiver< Indices >
 
struct  luwra::internal::Wrapper< ToBeWrapped >
 
struct  luwra::internal::Wrapper< Ret Klasss::* >
 
struct  luwra::internal::Wrapper< Ret(*)(Args...)>
 
struct  luwra::internal::Wrapper< Ret(Args...)>
 
struct  luwra::internal::Wrapper< Ret(Klasss::*)(Args...) const >
 
struct  luwra::internal::Wrapper< Ret(Klasss::*)(Args...) const volatile >
 
struct  luwra::internal::Wrapper< Ret(Klasss::*)(Args...) volatile >
 
struct  luwra::internal::Wrapper< Ret(Klasss::*)(Args...)>
 

Namespaces

namespace  luwra
 
namespace  luwra::internal
 

Macros

#define LUWRA_WRAP(entity)    (&luwra::internal::Wrapper<decltype(&entity)>::template invoke<&entity>)
 Generate a lua_CFunction wrapper for a field, method or function.
 
#define LUWRA_WRAP_MEMBER(base, name)    (&luwra::internal::MemberWrapper<decltype(&__LUWRA_NS_RESOLVE(base, name)), base>::template invoke<&__LUWRA_NS_RESOLVE(base, name)>)
 Same as LUWRA_WRAP but specifically for members of a class. It is imperative that you use this macro instead of LUWRA_WRAP when working with inherited members.
 

Macro Definition Documentation

◆ LUWRA_WRAP

#define LUWRA_WRAP (   entity)     (&luwra::internal::Wrapper<decltype(&entity)>::template invoke<&entity>)

Generate a lua_CFunction wrapper for a field, method or function.

Parameters
entityQualified named of the entity that shall be wrapped
Returns
Wrapped entity as lua_CFunction

◆ LUWRA_WRAP_MEMBER

#define LUWRA_WRAP_MEMBER (   base,
  name 
)     (&luwra::internal::MemberWrapper<decltype(&__LUWRA_NS_RESOLVE(base, name)), base>::template invoke<&__LUWRA_NS_RESOLVE(base, name)>)

Same as LUWRA_WRAP but specifically for members of a class. It is imperative that you use this macro instead of LUWRA_WRAP when working with inherited members.

Parameters
baseQualified name of the targeted class
nameUnqualified name of the member that shall be wrapped
Returns
Wrapped entity as lua_CFunction