7 #ifndef __lua_LuaContext_h__ 8 #define __lua_LuaContext_h__ 15 void *lua_alloc(
void *ud,
void *ptr,
size_t osize,
size_t nsize);
19 class LuaContext :
public Counted
22 LuaContext(sp<Master> spMaster, lua_State *pLuaState);
23 virtual ~LuaContext(
void);
25 lua_State *state(
void);
27 void pushInstance(Instance &instance);
28 Instance popCreateInstance(
void);
29 void popInstance(Instance &instance,
bool create=
false);
31 sp<LuaBaseType> lookup(FE_UWORD tid);
32 sp<TypeMaster> typeMaster(
void) {
return m_hpMaster->typeMaster();}
33 sp<Master> master(
void) {
return m_hpMaster;}
35 void setWindowEventEnums(
void);
36 void set(
const char *tbl,
const char *name,
double value);
39 void setPreamble(I32 a_lineCount)
40 { m_preamble=a_lineCount; }
64 static int debug(lua_State *pLuaState);
65 static void error(lua_State *pLuaState,
const char *message);
66 static int manage(lua_State *pLuaState);
67 static int catalog(lua_State *pLuaState);
68 static int create(lua_State *pLuaState);
69 static int createRecordArray(lua_State *pLuaState);
70 static int createScope(lua_State *pLuaState);
71 static int createScopeComponent(lua_State *pLuaState);
72 static int createRecordGroup(lua_State *pLuaState);
73 static int createRecord(lua_State *pLuaState);
74 static int createVector3(lua_State *pLuaState);
75 static int b_or(lua_State *pLuaState);
76 static int b_and(lua_State *pLuaState);
78 const String& name(
void)
const {
return m_name; }
80 void alias(String a_aliasName,String a_trueName)
81 { m_aliasMap[a_aliasName]=a_trueName; }
82 String aliasedName(String a_name)
84 if(m_aliasMap.find(a_name)==m_aliasMap.end())
88 return m_aliasMap[a_name];
92 lua_State *m_pLuaState;
93 sp<BaseType> m_spBooleanType;
94 sp<BaseType> m_spIntegerType;
95 sp<BaseType> m_spFloatType;
96 sp<BaseType> m_spDoubleType;
97 sp<BaseType> m_spStringType;
98 sp<BaseType> m_spRecordType;
99 sp<BaseType> m_spGroupType;
100 sp<BaseType> m_spArrayType;
101 sp<BaseType> m_spComponentType;
102 sp<BaseType> m_spIntArrayType;
103 sp<BaseType> m_spVector2Type;
104 sp<BaseType> m_spVector3Type;
105 sp<BaseType> m_spVector4Type;
106 sp<BaseType> m_spVector4fType;
107 sp<BaseType> m_spTransformType;
108 sp<BaseType> m_spStateCatalogType;
109 sp<BaseType> m_spScopeType;
110 sp<BaseType> m_spLayoutType;
112 hp<Master> m_hpMaster;
114 Array<sp<LuaBaseType> > m_luaTypes;
117 std::map<String,String> m_aliasMap;
119 Array<void*> m_trackArray;
kernel
Definition: namespace.dox:3