7 class CNPLStateMemAllocator;
30 MEM_ALLOC_TYPE_SYS_MALLOC,
33 MEM_ALLOC_TYPE_POOL_MALLOC,
35 MEM_ALLOC_TYPE_DL_MALLOC,
46 int GetLastReturnValue()
const;
47 void SetLastReturnValue(
int val);
66 void LoadHAPI_Globals();
68 void LoadHAPI_SceneManager();
70 void LoadHAPI_ResourceManager();
74 void LoadHAPI_UI_Extension();
76 void LoadHAPI_Audio();
78 void LoadHAPI_Network();
84 void LoadHAPI_Jabber();
96 static void AddSearchPath(
const char* sSearchPath,
bool bIsAdding =
true);
104 static uint32 GetScriptDiskPath(
const string& filePath,
string& sFileName);
112 bool IsScriptFileLoaded(
const string& filepath);
124 bool LoadFile(
const string& filePath,
bool bReload,
lua_State* L = 0,
bool bNoReturn =
false);
133 int DoString(
const char* sCode,
int nLength = 0,
const char* sFileName = NULL,
bool bPopReturnValue =
true);
140 NPL::NPLReturnCode ActivateFile(
const string& filepath,
const char *
code = NULL,
int nLength=0);
149 bool BindFileActivateFunc(
const object& funcActivate,
const std::string& filename);
156 const string& GetFileName();
160 const char* GetCurrentFileName(
lua_State* L = 0);
167 bool CreateSetState(
lua_State* pLuaState = NULL);
171 void SetOwnLuaState(
bool bOwn);
180 const std::map <std::string, int32>& GetLoadedFiles();
199 void ProcessResult(
int nResult,
lua_State* L = 0);
204 int CacheFileModule(
const std::string& filename,
int nResult,
lua_State* L = 0);
209 int PopFileModule(
const std::string& filename,
lua_State* L = 0);
212 std::string GetModuleFilePath(
const std::string& modulename,
lua_State* L = 0);
216 int GetFileLoadStatus(
const string& filepath);
217 void SetFileLoadStatus(
const string& filepath,
int nStatus);
226 m_pState->PushFileName(filename);
230 m_pState->PopFileName();
237 void PushFileName(
const string& filename);
244 void LoadParaScene();
245 void LoadParaWorld();
255 int m_nLastReturnValue;
275 std::map <std::string, int32> m_loaded_files;
278 std::stack <std::string> m_stack_current_file;
281 static std::string m_searchpath;
NPL_MemAllocatorType
NPL runs in its own thread.
Definition: NPLScriptingState.h:27
define this to enable debugging of NPL code in visual studio
Definition: INPL.h:9
Definition: class.hpp:124
a NPL scripting state (wrapper of lua State), for binding c++ classes to lua.
Definition: NPLScriptingState.h:23
memory allocator for NPL runtime state.
Definition: NPLStateMemAllocator.h:32
Definition: minilua.c:461
Definition: PEtypes.h:507
it presents a real or virtual file in ParaEngine.
Definition: ParaFile.h:31
Definition: inftrees.h:24
for luabind, The main drawback of this approach is that the compilation time will increase for the fi...
Definition: luaSQLite.cpp:1971