ArtMOO
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
G:/dev/qt/MOO/ServerCore/lua_prop.h
Go to the documentation of this file.
00001 #ifndef LUA_PROP_H
00002 #define LUA_PROP_H
00003 
00004 #include "mooglobal.h"
00005 #include "lua_utilities.h"
00006 
00007 class Property;
00008 class Object;
00009 
00010 class lua_prop
00011 {
00012 public:
00013         typedef struct luaProp
00014         {
00015                 QString                 *mName;
00016                 ObjectId                 mObjectId;
00017                 Property                *mProperty;
00018         } luaProp;
00019 
00020         static void lua_pushproperty( lua_State *L, Property *pProperty );
00021 
00022         static void lua_pushproperty( lua_State *L, ObjectId pObjectId, const QString &pName, Property *pProperty );
00023 
00024         static luaProp *arg( lua_State *L, int pIndex = 1 );
00025 
00026         static int luaSetValue( lua_State *L, const QString &pPrpNam, Object *pObject, Property *pFndPrp, Object *pFndObj, int pIdx );
00027 
00028         static void luaNewRecurse( lua_State *L, int pIdx, QVariant &pVariant  );
00029 
00030 private:
00031         static void initialise( void );
00032 
00033         static void luaRegisterState( lua_State *L );
00034 
00035         static int luaGC( lua_State *L );
00036 
00037         static int luaGet( lua_State *L );
00038         static int luaSet( lua_State *L );
00039 
00040         static int luaDump( lua_State *L );
00041         static int luaProgram( lua_State *L );
00042 
00043         static const char                       *mLuaName;
00044 
00045         static LuaMap                            mLuaMap;
00046 
00047         static const luaL_Reg            mLuaStatic[];
00048         static const luaL_Reg            mLuaInstance[];
00049         static const luaL_Reg            mLuaInstanceFunctions[];
00050 
00051         friend class lua_moo;
00052 };
00053 
00054 #endif // LUA_PROP_H