
Go to the source code of this file.
Classes | |
| struct | SIO2script |
Functions | |
| SIO2script * | sio2ScriptInit (char *) |
| SIO2script * | sio2ScriptFree (SIO2script *) |
| void | sio2ScriptLoad (SIO2script *, SIO2stream *) |
| unsigned char | sio2ScriptCompile (SIO2script *) |
| void | sio2ScriptGetError (SIO2script *) |
| unsigned char sio2ScriptCompile | ( | SIO2script * | _SIO2script | ) |
Compile the SIO2script with the source code contained in SIO2script->code.
_SIO2script: A valid SIO2script handle.
return 1 or 0 depending on the SIO2script compilation. In the case of an error, it will be reported on the console. Even if a compilation error occur the program will not stop.
References SIO2::_lua_State, SIO2script::code, SIO2script::compiled, SIO2script::error_code, sio2, and sio2ScriptGetError().
Referenced by sio2ResourceCompileAllScripts().

| SIO2script* sio2ScriptFree | ( | SIO2script * | _SIO2script | ) |
Free a valid SIO2script pointer, and remove its handle from the global sio2 SIO2resource handle.
_SIO2mist: A valid SIO2script pointer.
return a NULL SIO2mist SIO2script pointer.
References SIO2::_SIO2resource, SIO2script::code, sio2, SIO2_SCRIPT, and sio2ResourceDel().
Referenced by sio2ResourceUnload().

| void sio2ScriptGetError | ( | SIO2script * | _SIO2script | ) |
Ask LUA virtual machine to report us the latest error that occur.
_SIO2script: A valid SIO2script handle.
References SIO2::_lua_State, SIO2script::error_code, SIO2script::name, and sio2.
Referenced by sio2ScriptCompile().
| SIO2script* sio2ScriptInit | ( | char * | _name | ) |
Create a new SIO2script, this new SIO2script pointer will be added to the global sio2 SIO2resource handle.
_name: The name to use to associate the SIO2script within the SIO2resource.
return a new SIO2script structure pointer.
References SIO2::_SIO2resource, SIO2script::name, sio2, SIO2_SCRIPT, sio2ResourceAdd(), and sio2StringCpy().
Referenced by sio2ResourceDispatchStream().

| void sio2ScriptLoad | ( | SIO2script * | _SIO2script, | |
| SIO2stream * | _SIO2stream | |||
| ) |
Load an SIO2script from an SIO2stream buffer.
_SIO2script: A valid SIO2script handle.
_SIO2stream: A valid SIO2stream with the LUA source code loaded. (need to use sio2StreamOpenText)
References SIO2stream::buf, SIO2script::code, and SIO2stream::size.
Referenced by sio2ResourceDispatchStream().
1.5.6