UGDK
|
00001 00002 #ifndef UGDK_SCRIPT_LUA_DEFS_H_ 00003 #define UGDK_SCRIPT_LUA_DEFS_H_ 00004 00005 #ifndef lua_h 00006 extern "C" { 00007 struct lua_State; 00008 typedef struct lua_State lua_State; 00009 typedef int (*lua_CFunction)(lua_State*); 00010 } 00011 #endif 00012 00013 #include <list> 00014 #include <map> 00015 00016 namespace ugdk { 00017 namespace script { 00018 namespace lua { 00019 00020 typedef int DataID; 00021 typedef std::list<DataID> DataBuffer; 00022 typedef std::map<DataID,DataID> DataMap; 00023 typedef void* UData; 00024 00025 template <class T> 00026 UData AsUData(T* p) { return static_cast<UData>(p); } 00027 00028 template <class T> 00029 UData AsUData(const T* p) { 00030 return AsUData(const_cast<T*>(p)); 00031 } 00032 00033 } /* namespace lua */ 00034 } /* namespace script */ 00035 } /* namespace ugdk */ 00036 00037 00038 #endif /* UGDK_SCRIPT_LUA_DEFS_H_ */