D:/Projects/dark-oberon.svn/game/sources/luamodule/luascriptloader.cpp File Reference


Detailed Description

Author:
Matthew T. Welker, Vadim Macagon, Peter Knut
Date:
2005
Version:
1.0 - Initial.

#include "kernel/logserver.h"
#include "kernel/fileserver.h"
#include "kernel/ref.h"
#include "luamodule/luascriptloader.h"

Functions

 PrepareClass (LuaScriptLoader,"ScriptLoader", s_NewLuaScriptLoader, s_InitLuaScriptLoader)
int luacmd_StackDump (lua_State *)
int luacmd_Error (lua_State *)
int luacmd_Panic (lua_State *)
int luacmd_New (lua_State *)
int luacmd_NewThunk (lua_State *)
int luacmd_Delete (lua_State *)
int luacmd_PinThunk (lua_State *)
int luacmd_UnpinThunk (lua_State *)
int luacmd_Sel (lua_State *)
int luacmd_Psel (lua_State *)
int luacmd_Exit (lua_State *)
int luacmd_LogTree (lua_State *)
int luacmd_LogInfo (lua_State *)
int luacmd_LogWarning (lua_State *)
int luacmd_LogError (lua_State *)
int luacmd_LogCritical (lua_State *)
int luacmd_LogDebug (lua_State *)
int luacmd_Dir (lua_State *)
int luacmd_PushCwd (lua_State *)
int luacmd_PopCwd (lua_State *)
int luacmd_CmdDispatch (lua_State *)
int luacmd_Call (lua_State *)
int luacmd_ConCall (lua_State *)
int luacmd_Lookup (lua_State *)
int luacmd_Mangle (lua_State *)
int luacmd_Exists (lua_State *)
int luacmd_BeginCmds (lua_State *)
int luacmd_AddCmd (lua_State *)
int luacmd_EndCmds (lua_State *)
int luacmd_IsZombieThunk (lua_State *)
int luacmd_DeleteNRef (lua_State *)


Function Documentation

int luacmd_AddCmd ( lua_State *   ) 

int luacmd_BeginCmds ( lua_State *   ) 

int luacmd_Call ( lua_State *  L  ) 

Executes a func on the current working directory.

int luacmd_CmdDispatch ( lua_State *   ) 

int luacmd_ConCall ( lua_State *  L  ) 

Executes a func on the current working directory and prints the result to the console.

int luacmd_Delete ( lua_State *  L  ) 

If a string is passed in it is assumed to be a NOH path, the corresponding Root instance will be deleted and if there's a thunk associated with that instance it will be removed from the _nebthunks table. If a thunk is passed in pretty much the same thing happens.

int luacmd_DeleteNRef ( lua_State *  L  ) 

Deletes an Ref previously created during thunking. This method will be automatically called when a thunk gets garbage collected.

int luacmd_Dir ( lua_State *   ) 

int luacmd_EndCmds ( lua_State *   ) 

int luacmd_Error ( lua_State *   ) 

int luacmd_Exists ( lua_State *   ) 

int luacmd_Exit ( lua_State *   ) 

int luacmd_IsZombieThunk ( lua_State *  L  ) 

Checks if a thunk is a zombie (has an Ref that points to a non-existent Root).

int luacmd_LogCritical ( lua_State *   ) 

int luacmd_LogDebug ( lua_State *   ) 

int luacmd_LogError ( lua_State *   ) 

int luacmd_LogInfo ( lua_State *   ) 

int luacmd_LogTree ( lua_State *   ) 

int luacmd_LogWarning ( lua_State *   ) 

int luacmd_Lookup ( lua_State *  L  ) 

Returns the thunk that corresponds to specified NOH path. If the thunk hasn't been created yet it will be created, otherwise the existing thunk is returned.

int luacmd_Mangle ( lua_State *   ) 

int luacmd_New ( lua_State *   ) 

int luacmd_NewThunk ( lua_State *  L  ) 

Just like luacmd_New() except that it also creates and returns a thunk for the new object (the thunk is also stored in the _nebthunks table).

int luacmd_Panic ( lua_State *   ) 

int luacmd_PinThunk ( lua_State *  L  ) 

Pins a thunk, which means that a reference to it is stored in _nebthunks. The thunk will then be reused whenever possible instead of thunking an object all over again. If you want to define script side commands for an object you'll have to pin the corresponding thunk.

If you have multiple thunks that correspond to the same object and you pin them all then only the last pin will actually "work".

int luacmd_PopCwd ( lua_State *  L  ) 

Just exposes KernelServer::PopCwd()

int luacmd_Psel ( lua_State *  L  ) 

Returns the cwd of the NOH as a thunk.

int luacmd_PushCwd ( lua_State *  L  ) 

Just exposes KernelServer::PushCwd().

int luacmd_Sel ( lua_State *   ) 

int luacmd_StackDump ( lua_State *   ) 

int luacmd_UnpinThunk ( lua_State *  L  ) 

Removes the thunk passed in from the _nebthunks table, but does not delete the corresponding Root instance.

If a string is passed in it is assumed to be a NOH path, otherwise it a thunk is expected.

PrepareClass ( LuaScriptLoader  ,
"ScriptLoader"  ,
s_NewLuaScriptLoader  ,
s_InitLuaScriptLoader   
)


Generated on Sat Oct 20 14:47:30 2007 for Dark Oberon by  doxygen 1.5.3