#include <Script.h>
Public Member Functions | |
UINT | Init (void) |
Function to initialize the object Script. | |
void | Release (void) |
Function to finalize the object Script. | |
int | GetTop (void) |
Function to obtain the top of the stack. | |
int | Type (int index) |
Function to obtain the type of a position of the stack. | |
int | IsNil (int index) |
Function to obtain if a position of the stack is a NULL. | |
int | IsBool (int index) |
Function to obtain if a position of the stack is a boolean. | |
int | IsNumber (int index) |
Function to obtain if a position of the stack is a number. | |
int | IsString (int index) |
Function to obtain if a position of the stack is a string. | |
int | IsTable (int index) |
Function to obtain if a position of the stack is a table. | |
int | IsFunction (int index) |
Function to obtain if a position of the stack is a function. | |
int | IsCFunction (int index) |
Function to obtain if a position of the stack is a C function. | |
int | IsUserData (int index) |
Function to obtain if a position of the stack is an UserData. | |
int | IsLightUserData (int index) |
Function to obtain if a position of the stack is an UserData. | |
const char * | TypeName (int type) |
Function to obtain a type of data into a string. | |
int | GetBool (int index) |
Function to obtain a boolean from a position of the stack. | |
lua_Number | GetNumber (int index) |
Function to obtain a number from a position of the stack. | |
const char * | GetString (int index) |
Function to obtain a string from a position of the stack. | |
size_t | GetStrLen (int index) |
Function to obtain the size of a string from a position of the stack. | |
lua_CFunction | GetCFunction (int index) |
Function to obtain a C function from a position of the stack. | |
void * | GetUserData (int index) |
Function to obtain an UserData from a position of the stack. | |
lua_State * | GetThread (int index) |
Function to obtain a thread from a position of the stack. | |
const void * | GetPointer (int index) |
Function to obtain a pointer from a position of the stack. | |
void | PushBool (int val) |
Function to push a boolean in the stack. | |
void | PushNumber (lua_Number val) |
Function to push a number in the stack. | |
void | PushString (const char *val, size_t len) |
Function to push a string in the stack. | |
void | PushString (const char *val) |
Function to push a string in the stack. | |
void | PushNil (void) |
Function to push a NULL in the stack. | |
void | PushCFunction (lua_CFunction val) |
Function to push a C function in the stack. | |
void | PushLightUserData (void *val) |
Function to push a UserData in the stack. | |
void | ExecFile (const char *file) |
Function to excecute a file of Lua. | |
void | ExecFile (const string &file) |
Function to excecute a file of Lua. | |
void | ExecString (const char *str) |
Function to excecute a text string of Lua. | |
void | ExecString (const string &str) |
Function to excecute a text string of Lua. | |
void | Register (const char *name, lua_CFunction func) |
Function to register a C function in Lua. | |
void | Register (const string &name, lua_CFunction func) |
Function to register a C function in Lua. | |
int | GetTop (lua_State *L) |
Function to obtain the top of the stack. | |
int | Type (lua_State *L, int index) |
Function to obtain the type of a position of the stack. | |
int | IsNil (lua_State *L, int index) |
Function to obtain if a position of the stack is a NULL. | |
int | IsBool (lua_State *L, int index) |
Function to obtain if a position of the stack is a boolean. | |
int | IsNumber (lua_State *L, int index) |
Function to obtain if a position of the stack is a number. | |
int | IsString (lua_State *L, int index) |
Function to obtain if a position of the stack is a string. | |
int | IsTable (lua_State *L, int index) |
Function to obtain if a position of the stack is a table. | |
int | IsFunction (lua_State *L, int index) |
Function to obtain if a position of the stack is a function. | |
int | IsCFunction (lua_State *L, int index) |
Function to obtain if a position of the stack is a C function. | |
int | IsUserData (lua_State *L, int index) |
Function to obtain if a position of the stack is an UserData. | |
int | IsLightUserData (lua_State *L, int index) |
Function to obtain if a position of the stack is an UserData. | |
int | GetBool (lua_State *L, int index) |
Function to obtain a boolean from a position of the stack. | |
lua_Number | GetNumber (lua_State *L, int index) |
Function to obtain a number from a position of the stack. | |
const char * | GetString (lua_State *L, int index) |
Function to obtain a string from a position of the stack. | |
size_t | GetStrLen (lua_State *L, int index) |
Function to obtain the size of a string from a position of the stack. | |
lua_CFunction | GetCFunction (lua_State *L, int index) |
Function to obtain a C function from a position of the stack. | |
void * | GetUserData (lua_State *L, int index) |
Function to obtain an UserData from a position of the stack. | |
lua_State * | GetThread (lua_State *L, int index) |
Function to obtain a thread from a position of the stack. | |
const void * | GetPointer (lua_State *L, int index) |
Function to obtain a pointer from a position of the stack. | |
void | PushBool (lua_State *L, int val) |
Function to push a boolean in the stack. | |
void | PushNumber (lua_State *L, lua_Number val) |
Function to push a number in the stack. | |
void | PushString (lua_State *L, const char *val, size_t len) |
Function to push a string in the stack. | |
void | PushString (lua_State *L, const char *val) |
Function to push a string in the stack. | |
void | PushNil (lua_State *L) |
Function to push a NULL in the stack. | |
void | PushCFunction (lua_State *L, lua_CFunction val) |
Function to push a C function in the stack. | |
void | PushLightUserData (lua_State *L, void *val) |
Function to push a UserData in the stack. | |
void | ExecFile (lua_State *L, const char *file) |
Function to excecute a file of Lua. | |
void | ExecFile (lua_State *L, const string &file) |
Function to excecute a file of Lua. | |
void | ExecString (lua_State *L, const char *str) |
Function to excecute a text string of Lua. | |
void | ExecString (lua_State *L, const string &str) |
Function to excecute a text string of Lua. | |
void | Register (lua_State *L, const char *name, lua_CFunction func) |
Function to register a C function in Lua. | |
void | Register (lua_State *L, const string &name, lua_CFunction func) |
Function to register a C function in Lua. | |
lua_State * | GetLuaState (void) |
Function to obtain the Lua state. | |
Static Public Member Functions | |
static Script * | GetInstance (void) |
Function to obtain the instance of Script. |
The Input class manages the subjects related to the system of scripts with Lua.
void Yukino::Script::ExecFile | ( | lua_State * | L, | |
const string & | file | |||
) | [inline] |
Function to excecute a file of Lua.
L | Lua state. | |
file | Path of the file. |
void Yukino::Script::ExecFile | ( | lua_State * | L, | |
const char * | file | |||
) | [inline] |
Function to excecute a file of Lua.
L | Lua state. | |
file | Path of the file. |
void Yukino::Script::ExecFile | ( | const string & | file | ) | [inline] |
Function to excecute a file of Lua.
file | Path of the file. |
void Yukino::Script::ExecFile | ( | const char * | file | ) | [inline] |
Function to excecute a file of Lua.
file | Path of the file. |
void Yukino::Script::ExecString | ( | lua_State * | L, | |
const string & | str | |||
) | [inline] |
Function to excecute a text string of Lua.
L | Lua state. | |
str | Text string. |
void Yukino::Script::ExecString | ( | lua_State * | L, | |
const char * | str | |||
) | [inline] |
Function to excecute a text string of Lua.
L | Lua state. | |
str | Text string. |
void Yukino::Script::ExecString | ( | const string & | str | ) | [inline] |
Function to excecute a text string of Lua.
str | Text string. |
void Yukino::Script::ExecString | ( | const char * | str | ) | [inline] |
Function to excecute a text string of Lua.
str | Text string. |
int Yukino::Script::GetBool | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a boolean from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::GetBool | ( | int | index | ) | [inline] |
Function to obtain a boolean from a position of the stack.
index | Position inside the stack. |
lua_CFunction Yukino::Script::GetCFunction | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a C function from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
lua_CFunction Yukino::Script::GetCFunction | ( | int | index | ) | [inline] |
Function to obtain a C function from a position of the stack.
index | Position inside the stack. |
Script * Yukino::Script::GetInstance | ( | void | ) | [static] |
Function to obtain the instance of Script.
This function creates an instance of Script, in case of not being created, and gives back a pointer of this if memory is successful requesting.
lua_State* Yukino::Script::GetLuaState | ( | void | ) | [inline] |
Function to obtain the Lua state.
lua_Number Yukino::Script::GetNumber | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a number from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
lua_Number Yukino::Script::GetNumber | ( | int | index | ) | [inline] |
Function to obtain a number from a position of the stack.
index | Position inside the stack. |
const void* Yukino::Script::GetPointer | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a pointer from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
const void* Yukino::Script::GetPointer | ( | int | index | ) | [inline] |
Function to obtain a pointer from a position of the stack.
index | Position inside the stack. |
const char* Yukino::Script::GetString | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a string from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
const char* Yukino::Script::GetString | ( | int | index | ) | [inline] |
Function to obtain a string from a position of the stack.
index | Position inside the stack. |
size_t Yukino::Script::GetStrLen | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain the size of a string from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
size_t Yukino::Script::GetStrLen | ( | int | index | ) | [inline] |
Function to obtain the size of a string from a position of the stack.
index | Position inside the stack. |
lua_State* Yukino::Script::GetThread | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain a thread from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
lua_State* Yukino::Script::GetThread | ( | int | index | ) | [inline] |
Function to obtain a thread from a position of the stack.
index | Position inside the stack. |
int Yukino::Script::GetTop | ( | lua_State * | L | ) | [inline] |
Function to obtain the top of the stack.
L | Lua state. |
int Yukino::Script::GetTop | ( | void | ) | [inline] |
Function to obtain the top of the stack.
void* Yukino::Script::GetUserData | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain an UserData from a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
void* Yukino::Script::GetUserData | ( | int | index | ) | [inline] |
Function to obtain an UserData from a position of the stack.
index | Position inside the stack. |
UINT Yukino::Script::Init | ( | void | ) |
int Yukino::Script::IsBool | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a boolean.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsBool | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a boolean.
index | Position inside the stack. |
int Yukino::Script::IsCFunction | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a C function.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsCFunction | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a C function.
index | Position inside the stack. |
int Yukino::Script::IsFunction | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a function.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsFunction | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a function.
index | Position inside the stack. |
int Yukino::Script::IsLightUserData | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is an UserData.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsLightUserData | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is an UserData.
index | Position inside the stack. |
int Yukino::Script::IsNil | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a NULL.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsNil | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a NULL.
index | Position inside the stack. |
int Yukino::Script::IsNumber | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a number.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsNumber | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a number.
index | Position inside the stack. |
int Yukino::Script::IsString | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a string.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsString | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a string.
index | Position inside the stack. |
int Yukino::Script::IsTable | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is a table.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsTable | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is a table.
index | Position inside the stack. |
int Yukino::Script::IsUserData | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain if a position of the stack is an UserData.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::IsUserData | ( | int | index | ) | [inline] |
Function to obtain if a position of the stack is an UserData.
index | Position inside the stack. |
void Yukino::Script::PushBool | ( | lua_State * | L, | |
int | val | |||
) | [inline] |
Function to push a boolean in the stack.
L | Lua state. | |
val | The value of the data. |
void Yukino::Script::PushBool | ( | int | val | ) | [inline] |
Function to push a boolean in the stack.
val | The value of the data. |
void Yukino::Script::PushCFunction | ( | lua_State * | L, | |
lua_CFunction | val | |||
) | [inline] |
Function to push a C function in the stack.
L | Lua state. | |
val | The value of the data. |
void Yukino::Script::PushCFunction | ( | lua_CFunction | val | ) | [inline] |
Function to push a C function in the stack.
val | The value of the data. |
void Yukino::Script::PushLightUserData | ( | lua_State * | L, | |
void * | val | |||
) | [inline] |
Function to push a UserData in the stack.
L | Lua state. | |
val | The value of the data. |
void Yukino::Script::PushLightUserData | ( | void * | val | ) | [inline] |
Function to push a UserData in the stack.
val | The value of the data. |
void Yukino::Script::PushNil | ( | lua_State * | L | ) | [inline] |
Function to push a NULL in the stack.
L | Lua state. |
void Yukino::Script::PushNumber | ( | lua_State * | L, | |
lua_Number | val | |||
) | [inline] |
Function to push a number in the stack.
L | Lua state. | |
val | The value of the data. |
void Yukino::Script::PushNumber | ( | lua_Number | val | ) | [inline] |
Function to push a number in the stack.
val | The value of the data. |
void Yukino::Script::PushString | ( | lua_State * | L, | |
const char * | val | |||
) | [inline] |
Function to push a string in the stack.
L | Lua state. | |
val | The value of the data. |
void Yukino::Script::PushString | ( | lua_State * | L, | |
const char * | val, | |||
size_t | len | |||
) | [inline] |
Function to push a string in the stack.
L | Lua state. | |
val | The value of the data. | |
len | Size of the string. |
void Yukino::Script::PushString | ( | const char * | val | ) | [inline] |
Function to push a string in the stack.
val | The value of the data. |
void Yukino::Script::PushString | ( | const char * | val, | |
size_t | len | |||
) | [inline] |
Function to push a string in the stack.
val | The value of the data. | |
len | Size of the string. |
void Yukino::Script::Register | ( | lua_State * | L, | |
const string & | name, | |||
lua_CFunction | func | |||
) | [inline] |
Function to register a C function in Lua.
L | Lua state. | |
name | Name in Lua of the function. | |
func | Pointer to the function in C. |
void Yukino::Script::Register | ( | lua_State * | L, | |
const char * | name, | |||
lua_CFunction | func | |||
) | [inline] |
Function to register a C function in Lua.
L | Lua state. | |
name | Name in Lua of the function. | |
func | Pointer to the function in C. |
void Yukino::Script::Register | ( | const string & | name, | |
lua_CFunction | func | |||
) | [inline] |
Function to register a C function in Lua.
name | Name in Lua of the function. | |
func | Pointer to the function in C. |
void Yukino::Script::Register | ( | const char * | name, | |
lua_CFunction | func | |||
) | [inline] |
Function to register a C function in Lua.
name | Name in Lua of the function. | |
func | Pointer to the function in C. |
void Yukino::Script::Release | ( | void | ) |
int Yukino::Script::Type | ( | lua_State * | L, | |
int | index | |||
) | [inline] |
Function to obtain the type of a position of the stack.
L | Lua state. | |
index | Position inside the stack. |
int Yukino::Script::Type | ( | int | index | ) | [inline] |
Function to obtain the type of a position of the stack.
index | Position inside the stack. |
const char* Yukino::Script::TypeName | ( | int | type | ) | [inline] |
Function to obtain a type of data into a string.
type | Type of data. |