lugre_luabind_direct.h File Reference

#include <vector>
#include <string>
#include <stdexcept>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"

Include dependency graph for lugre_luabind_direct.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Lugre

Classes

class  Lugre::cLuaBindDirectQuickWrapHelper
 helper class for macro LUABIND_QUICKWRAP More...
class  Lugre::cLuaBindDirectBase
class  Lugre::cLuaBindDirect< _T >

Defines

#define LUABIND_QUICKWRAP_STATIC(methodname, code)
#define LUABIND_QUICKWRAP(methodname, code)
#define LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME(returnpushfun, newname, methodname, paramcode)   LUABIND_QUICKWRAP( newname, { return returnpushfun(L,GetSelf(L).methodname paramcode ); });
#define LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME(newname, methodname, paramcode)   LUABIND_QUICKWRAP( newname, { GetSelf(L).methodname paramcode ; });
#define LUABIND_DIRECTWRAP_RETURN_ONE_NAMEADD(returnpushfun, methodname, nameadd, paramcode)   LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME(returnpushfun,methodname##nameadd,methodname,paramcode)
#define LUABIND_DIRECTWRAP_RETURN_VOID_NAMEADD(methodname, nameadd, paramcode)   LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME(methodname##nameadd,methodname,paramcode)
#define LUABIND_DIRECTWRAP_RETURN_ONE(returnpushfun, methodname, paramcode)   LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME(returnpushfun,methodname,methodname,paramcode)
#define LUABIND_DIRECTWRAP_RETURN_VOID(methodname, paramcode)   LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME(methodname,methodname,paramcode)
#define LUABIND_DIRECTWRAP_BASECLASS(classname)   RegisterBaseClass(cLuaBindDirect<classname>::GetSingletonPtr(),#classname);
#define LUABIND_PrefixConstant(prefix, name)   cScripting::SetGlobal(L,#name,prefix::name);
#define LUABIND_DIRECTWRAP_HELPER_ENUM(prefix, name)   static inline prefix::name Param##name (lua_State *L,int i) { return (prefix::name)ParamInt(L,i); }
#define LUABIND_DIRECTWRAP_HELPER_OBJECT(mytype, name)
#define LUABIND_DIRECTWRAP_HELPER_OBJECT_PREFIX(prefix, mytypename)   LUABIND_DIRECTWRAP_HELPER_OBJECT(prefix::mytypename,mytypename)
#define LUABIND_DIRECTWRAP_HELPER_PUSH_COPY(prefix, mytype)   static inline int PushCopy##mytype (lua_State *L,prefix::mytype& v) { return cLuaBindDirect<prefix::mytype>::CreateUData(L,new prefix::mytype(v)); }

Functions

struct luaL_reg Lugre::make_luaL_reg (const char *name, lua_CFunction func)


Define Documentation

#define LUABIND_DIRECTWRAP_BASECLASS ( classname   )     RegisterBaseClass(cLuaBindDirect<classname>::GetSingletonPtr(),#classname);

#define LUABIND_DIRECTWRAP_HELPER_ENUM ( prefix,
name   )     static inline prefix::name Param##name (lua_State *L,int i) { return (prefix::name)ParamInt(L,i); }

Definition at line 79 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_HELPER_OBJECT ( mytype,
name   ) 

Value:

static inline mytype&       ParamByRef##name    (lua_State *L,int i)        { return *cLuaBindDirect<mytype>::checkudata_alive(L,i); } \
    static inline mytype*       Param##name         (lua_State *L,int i)        { return cLuaBindDirect<mytype>::checkudata_alive(L,i); } \
    static inline int           Push##name          (lua_State *L,mytype* v)    { return cLuaBindDirect<mytype>::CreateUData(L,v); }

Definition at line 81 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_HELPER_OBJECT_PREFIX ( prefix,
mytypename   )     LUABIND_DIRECTWRAP_HELPER_OBJECT(prefix::mytypename,mytypename)

Definition at line 85 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_HELPER_PUSH_COPY ( prefix,
mytype   )     static inline int PushCopy##mytype (lua_State *L,prefix::mytype& v) { return cLuaBindDirect<prefix::mytype>::CreateUData(L,new prefix::mytype(v)); }

Definition at line 87 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_RETURN_ONE ( returnpushfun,
methodname,
paramcode   )     LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME(returnpushfun,methodname,methodname,paramcode)

#define LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME ( returnpushfun,
newname,
methodname,
paramcode   )     LUABIND_QUICKWRAP( newname, { return returnpushfun(L,GetSelf(L).methodname paramcode ); });

Definition at line 64 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_RETURN_ONE_NAMEADD ( returnpushfun,
methodname,
nameadd,
paramcode   )     LUABIND_DIRECTWRAP_RETURN_ONE_ALTNAME(returnpushfun,methodname##nameadd,methodname,paramcode)

#define LUABIND_DIRECTWRAP_RETURN_VOID ( methodname,
paramcode   )     LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME(methodname,methodname,paramcode)

#define LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME ( newname,
methodname,
paramcode   )     LUABIND_QUICKWRAP( newname, { GetSelf(L).methodname paramcode ; });

Definition at line 65 of file lugre_luabind_direct.h.

#define LUABIND_DIRECTWRAP_RETURN_VOID_NAMEADD ( methodname,
nameadd,
paramcode   )     LUABIND_DIRECTWRAP_RETURN_VOID_ALTNAME(methodname##nameadd,methodname,paramcode)

#define LUABIND_PrefixConstant ( prefix,
name   )     cScripting::SetGlobal(L,#name,prefix::name);

#define LUABIND_QUICKWRAP ( methodname,
code   ) 

#define LUABIND_QUICKWRAP_STATIC ( methodname,
code   ) 


Generated on Wed May 23 06:00:16 2012 for cpp by  doxygen 1.5.6