ArtMOO
|
00001 #ifndef LUA_VERB_H 00002 #define LUA_VERB_H 00003 00004 #include "mooglobal.h" 00005 00006 #include "lua_utilities.h" 00007 00008 class Verb; 00009 00010 class lua_verb 00011 { 00012 public: 00013 typedef struct luaVerb 00014 { 00015 QString *mName; 00016 ObjectId mObjectId; 00017 Verb *mVerb; 00018 } luaVerb; 00019 00020 static void lua_pushverb( lua_State *L, Verb *V, const QString &pName = "", ObjectId pObjectId = OBJECT_NONE ); 00021 00022 static luaVerb *arg( lua_State *L, int pIndex = 1 ); 00023 00024 private: 00025 static void initialise( void ); 00026 00027 static void luaRegisterState( lua_State *L ); 00028 00029 static int luaGC( lua_State *L ); 00030 00031 static int luaGet( lua_State *L ); 00032 static int luaSet( lua_State *L ); 00033 00034 static int luaAliasAdd( lua_State *L ); 00035 static int luaAliasRem( lua_State *L ); 00036 00037 static int luaDump( lua_State *L ); 00038 static int luaProgram( lua_State *L ); 00039 00040 static const char *mLuaName; 00041 00042 static LuaMap mLuaMap; 00043 00044 static const luaL_Reg mLuaStatic[]; 00045 static const luaL_Reg mLuaInstance[]; 00046 static const luaL_Reg mLuaInstanceFunctions[]; 00047 00048 friend class lua_moo; 00049 }; 00050 00051 #endif // LUA_VERB_H