libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moLuna< T > Class Template Reference

LunaFourCode. More...

#include <moLuna.h>

Classes

struct  FunctionType
 LunaFourCode. More...
 
struct  PropertyType
 LunaFourCode. More...
 

Public Types

enum  { NUMBER, STRING }
 LunaFourCode. More...
 

Static Public Member Functions

static void Register (lua_State *L, const char *namespac="")
 eso no esta en LunaFourCode More...
 
static int constructor (lua_State *L)
 LunaFourCode. More...
 
static T * createNew (lua_State *L)
 
static T * createFromExisting (lua_State *L, T *existingobj)
 
static int property_getter (lua_State *L)
 
static int property_setter (lua_State *L)
 
static int function_dispatch (lua_State *L)
 
static int gc_obj (lua_State *L)
 

Detailed Description

template<typename T>
class moLuna< T >

LunaFourCode.

Esta clase template estática es utilizada para registrar clases de Moldeo dentro de la máquina virtual de LUA.

Definition at line 68 of file moLuna.h.

Member Enumeration Documentation

template<typename T>
anonymous enum

LunaFourCode.

Enumerator
NUMBER 
STRING 

Definition at line 73 of file moLuna.h.

Member Function Documentation

template<typename T>
static int moLuna< T >::constructor ( lua_State *  L)
inlinestatic

LunaFourCode.

@ constructor (internal) Arguments: L - Lua State

Definition at line 274 of file moLuna.h.

template<typename T>
static T* moLuna< T >::createFromExisting ( lua_State *  L,
T *  existingobj 
)
inlinestatic

@ createFromExisting Arguments: L - Lua State existingobj - Existing instance of object

Description: Loads an instance of the class into the Lua stack, instead using an existing object rather than creating a new one. Returns the existing object.

Definition at line 384 of file moLuna.h.

template<typename T>
static T* moLuna< T >::createNew ( lua_State *  L)
inlinestatic

@ createNew Arguments: L - Lua State

Description: Loads an instance of the class into the Lua stack, and provides you a pointer so you can modify it.

Definition at line 328 of file moLuna.h.

template<typename T>
static int moLuna< T >::function_dispatch ( lua_State *  L)
inlinestatic

@ function_dispatch (internal) Arguments: L - Lua State

Definition at line 516 of file moLuna.h.

template<typename T>
static int moLuna< T >::gc_obj ( lua_State *  L)
inlinestatic

@ gc_obj (internal) Arguments: L - Lua State

Definition at line 536 of file moLuna.h.

template<typename T>
static int moLuna< T >::property_getter ( lua_State *  L)
inlinestatic

@ property_getter (internal) Arguments: L - Lua State

Definition at line 435 of file moLuna.h.

template<typename T>
static int moLuna< T >::property_setter ( lua_State *  L)
inlinestatic

@ property_setter (internal) Arguments: L - Lua State

Definition at line 476 of file moLuna.h.

template<typename T>
static void moLuna< T >::Register ( lua_State *  L,
const char *  namespac = "" 
)
inlinestatic

eso no esta en LunaFourCode

LunaFourCode @ check Arguments: L - Lua State narg - Position to check

Description: Retrieves a wrapped class from the arguments passed to the function, specified by narg (position). This function will raise an exception if the argument is not of the correct type.OVERRIDE OLD FUNCTION : get userdata from Lua stack and return pointer to T object static T check(lua_State *L, int narg) { userdataType *ud = static_cast<userdataType>(luaL_checkudata(L, narg, T::className)); if(!ud) luaL_typerror(L, narg, T::className); return ud->pT; // pointer to T object }LunaFourCode @ lightcheck Arguments: L - Lua State narg - Position to check

Description: Retrieves a wrapped class from the arguments passed to the function, specified by narg (position). This function will return NULL if the argument is not of the correct type. Useful for supporting multiple types of arguments passed to the function Registra la clase T en la máquina virtual con estado L. El uso de esta función estática es: moLuna<T>::Register(L);

Parameters
Lpuntero al estado de la máquina virtual.LunaFourCode @ Register Arguments: L - Lua State namespac - Namespace to load into

Description: Registers your class with Lua. Leave namespac "" if you want to load it into the global space.

Definition at line 237 of file moLuna.h.


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