Show / Hide Table of Contents

Class LuaBase

Classes using the classic interface should inherit from this class. This class defines only static methods and is really meant to be used only from C# and not other .NET languages.

For easier operation they should also define: using ptrdiff_t = System.Int32; using lua_Integer = System.Int32; using LUA_INTFRM_T = System.Int64; using UNSIGNED_LUA_INTFRM_T = System.UInt64;

Inheritance
System.Object
LuaBase
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class LuaBase

Fields

LUA_INTFRMLEN

Declaration
protected const string LUA_INTFRMLEN = "l"
Field Value
System.String

LUA_MULTRET

Declaration
protected const int LUA_MULTRET = -1
Field Value
System.Int32

LUA_TBOOLEAN

Declaration
protected const int LUA_TBOOLEAN = 1
Field Value
System.Int32

LUA_TFUNCTION

Declaration
protected const int LUA_TFUNCTION = 6
Field Value
System.Int32

LUA_TLIGHTUSERDATA

Declaration
protected const int LUA_TLIGHTUSERDATA = 2
Field Value
System.Int32

LUA_TNIL

Declaration
protected const int LUA_TNIL = 0
Field Value
System.Int32

LUA_TNONE

Declaration
protected const int LUA_TNONE = -1
Field Value
System.Int32

LUA_TNUMBER

Declaration
protected const int LUA_TNUMBER = 3
Field Value
System.Int32

LUA_TSTRING

Declaration
protected const int LUA_TSTRING = 4
Field Value
System.Int32

LUA_TTABLE

Declaration
protected const int LUA_TTABLE = 5
Field Value
System.Int32

LUA_TTHREAD

Declaration
protected const int LUA_TTHREAD = 8
Field Value
System.Int32

LUA_TUSERDATA

Declaration
protected const int LUA_TUSERDATA = 7
Field Value
System.Int32

Methods

ArgAsType(LuaState, lua_Integer, DataType, Boolean)

Declaration
protected static DynValue ArgAsType(LuaState L, lua_Integer pos, DataType type, bool allowNil = false)
Parameters
LuaState L

lua_Integer pos

DataType type

System.Boolean allowNil

Returns
DynValue

GetArgument(LuaState, lua_Integer)

Declaration
protected static DynValue GetArgument(LuaState L, lua_Integer pos)
Parameters
LuaState L

lua_Integer pos

Returns
DynValue

isalnum(Char)

Declaration
protected static bool isalnum(char c)
Parameters
System.Char c

Returns
System.Boolean

isalnum(Int32)

Declaration
protected static bool isalnum(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isalpha(Char)

Declaration
protected static bool isalpha(char c)
Parameters
System.Char c

Returns
System.Boolean

isalpha(Int32)

Declaration
protected static bool isalpha(int c)
Parameters
System.Int32 c

Returns
System.Boolean

iscntrl(Char)

Declaration
protected static bool iscntrl(char c)
Parameters
System.Char c

Returns
System.Boolean

iscntrl(Int32)

Declaration
protected static bool iscntrl(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isdigit(Char)

Declaration
protected static bool isdigit(char c)
Parameters
System.Char c

Returns
System.Boolean

isdigit(Int32)

Declaration
protected static bool isdigit(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isgraph(Char)

Declaration
protected static bool isgraph(char c)
Parameters
System.Char c

Returns
System.Boolean

isgraph(Int32)

Declaration
protected static bool isgraph(int c)
Parameters
System.Int32 c

Returns
System.Boolean

islower(Char)

Declaration
protected static bool islower(char c)
Parameters
System.Char c

Returns
System.Boolean

islower(Int32)

Declaration
protected static bool islower(int c)
Parameters
System.Int32 c

Returns
System.Boolean

ispunct(Char)

Declaration
protected static bool ispunct(char c)
Parameters
System.Char c

Returns
System.Boolean

ispunct(Int32)

Declaration
protected static bool ispunct(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isspace(Char)

Declaration
protected static bool isspace(char c)
Parameters
System.Char c

Returns
System.Boolean

isspace(Int32)

Declaration
protected static bool isspace(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isupper(Char)

Declaration
protected static bool isupper(char c)
Parameters
System.Char c

Returns
System.Boolean

isupper(Int32)

Declaration
protected static bool isupper(int c)
Parameters
System.Int32 c

Returns
System.Boolean

isxdigit(Char)

Declaration
protected static bool isxdigit(char c)
Parameters
System.Char c

Returns
System.Boolean

LUA_QL(String)

Declaration
protected static string LUA_QL(string p)
Parameters
System.String p

Returns
System.String

LuaAssert(Boolean)

Declaration
protected static void LuaAssert(bool p)
Parameters
System.Boolean p

LuaCall(LuaState, lua_Integer, lua_Integer)

Calls a function. To call a function you must use the following protocol: first, the function to be called is pushed onto the stack; then, the arguments to the function are pushed in direct order; that is, the first argument is pushed first. Finally you call lua_call; nargs is the number of arguments that you pushed onto the stack. All arguments and the function value are popped from the stack when the function is called. The function results are pushed onto the stack when the function returns. The number of results is adjusted to nresults, unless nresults is LUA_MULTRET. In this case, all results from the function are pushed. Lua takes care that the returned values fit into the stack space. The function results are pushed onto the stack in direct order (the first result is pushed first), so that after the call the last result is on the top of the stack.

Declaration
protected static void LuaCall(LuaState L, lua_Integer nargs, lua_Integer nresults = null)
Parameters
LuaState L

The LuaState

lua_Integer nargs

The number of arguments.

lua_Integer nresults

The number of expected results.

Exceptions
System.NotImplementedException

LuaGetTable(LuaState, lua_Integer)

Declaration
protected static void LuaGetTable(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

LuaGetTop(LuaState)

Declaration
protected static lua_Integer LuaGetTop(LuaState L)
Parameters
LuaState L

Returns
lua_Integer

LuaIsString(LuaState, lua_Integer)

Declaration
protected static lua_Integer LuaIsString(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
lua_Integer

LuaLAddChar(LuaLBuffer, Char)

Declaration
protected static void LuaLAddChar(LuaLBuffer b, char p)
Parameters
LuaLBuffer b

System.Char p

LuaLAddLString(LuaLBuffer, CharPtr, UInt32)

Declaration
protected static void LuaLAddLString(LuaLBuffer b, CharPtr s, uint p)
Parameters
LuaLBuffer b

CharPtr s

System.UInt32 p

LuaLAddString(LuaLBuffer, String)

Declaration
protected static void LuaLAddString(LuaLBuffer b, string s)
Parameters
LuaLBuffer b

System.String s

LuaLAddValue(LuaLBuffer)

Declaration
protected static void LuaLAddValue(LuaLBuffer b)
Parameters
LuaLBuffer b

LuaLArgCheck(LuaState, Boolean, lua_Integer, String)

Declaration
protected static void LuaLArgCheck(LuaState L, bool condition, lua_Integer argNum, string message)
Parameters
LuaState L

System.Boolean condition

lua_Integer argNum

System.String message

LuaLArgError(LuaState, lua_Integer, String)

Declaration
protected static void LuaLArgError(LuaState L, lua_Integer arg, string p)
Parameters
LuaState L

lua_Integer arg

System.String p

LuaLBuffInit(LuaState, LuaLBuffer)

Declaration
protected static void LuaLBuffInit(LuaState L, LuaLBuffer b)
Parameters
LuaState L

LuaLBuffer b

LuaLCheckInt(LuaState, lua_Integer)

Declaration
protected static lua_Integer LuaLCheckInt(LuaState L, lua_Integer argNum)
Parameters
LuaState L

lua_Integer argNum

Returns
lua_Integer

LuaLCheckInteger(LuaState, lua_Integer)

Declaration
protected static lua_Integer LuaLCheckInteger(LuaState L, lua_Integer pos)
Parameters
LuaState L

lua_Integer pos

Returns
lua_Integer

LuaLCheckLString(LuaState, lua_Integer, out UInt32)

Declaration
protected static string LuaLCheckLString(LuaState L, lua_Integer argNum, out uint l)
Parameters
LuaState L

lua_Integer argNum

System.UInt32 l

Returns
System.String

LuaLCheckNumber(LuaState, lua_Integer)

Declaration
protected static double LuaLCheckNumber(LuaState L, lua_Integer pos)
Parameters
LuaState L

lua_Integer pos

Returns
System.Double

LuaLCheckStack(LuaState, lua_Integer, String)

Declaration
protected static void LuaLCheckStack(LuaState L, lua_Integer n, string message)
Parameters
LuaState L

lua_Integer n

System.String message

LuaLCheckString(LuaState, lua_Integer)

Declaration
protected static CharPtr LuaLCheckString(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
CharPtr

LuaLCheckStringStr(LuaState, lua_Integer)

Declaration
protected static string LuaLCheckStringStr(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
System.String

LuaLError(LuaState, String, Object[])

Declaration
protected static lua_Integer LuaLError(LuaState luaState, string message, params object[] args)
Parameters
LuaState luaState

System.String message

System.Object[] args

Returns
lua_Integer

LuaLOptInt(LuaState, lua_Integer, lua_Integer)

Declaration
protected static int LuaLOptInt(LuaState L, lua_Integer pos, lua_Integer def)
Parameters
LuaState L

lua_Integer pos

lua_Integer def

Returns
System.Int32

LuaLOptInteger(LuaState, lua_Integer, lua_Integer)

Declaration
protected static lua_Integer LuaLOptInteger(LuaState L, lua_Integer pos, lua_Integer def)
Parameters
LuaState L

lua_Integer pos

lua_Integer def

Returns
lua_Integer

LuaLPushResult(LuaLBuffer)

Declaration
protected static void LuaLPushResult(LuaLBuffer b)
Parameters
LuaLBuffer b

LuaLTypeName(LuaState, lua_Integer)

Declaration
protected static string LuaLTypeName(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
System.String

LuaPop(LuaState, lua_Integer)

Declaration
protected static void LuaPop(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

LuaPushInteger(LuaState, lua_Integer)

Declaration
protected static void LuaPushInteger(LuaState L, lua_Integer val)
Parameters
LuaState L

lua_Integer val

LuaPushLiteral(LuaState, String)

Declaration
protected static void LuaPushLiteral(LuaState L, string literalString)
Parameters
LuaState L

System.String literalString

LuaPushLString(LuaState, CharPtr, UInt32)

Declaration
protected static void LuaPushLString(LuaState L, CharPtr s, uint len)
Parameters
LuaState L

CharPtr s

System.UInt32 len

LuaPushNil(LuaState)

Declaration
protected static void LuaPushNil(LuaState L)
Parameters
LuaState L

LuaPushValue(LuaState, lua_Integer)

Declaration
protected static void LuaPushValue(LuaState L, lua_Integer arg)
Parameters
LuaState L

lua_Integer arg

LuaToBoolean(LuaState, lua_Integer)

Declaration
protected static lua_Integer LuaToBoolean(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
lua_Integer

LuaToLString(LuaState, lua_Integer, out UInt32)

Declaration
protected static string LuaToLString(LuaState luaState, lua_Integer p, out uint l)
Parameters
LuaState luaState

lua_Integer p

System.UInt32 l

Returns
System.String

LuaToString(LuaState, lua_Integer)

Declaration
protected static string LuaToString(LuaState luaState, lua_Integer p)
Parameters
LuaState luaState

lua_Integer p

Returns
System.String

LuaType(LuaState, lua_Integer)

Declaration
protected static lua_Integer LuaType(LuaState L, lua_Integer p)
Parameters
LuaState L

lua_Integer p

Returns
lua_Integer

memchr(CharPtr, Char, UInt32)

Declaration
protected static CharPtr memchr(CharPtr ptr, char c, uint count)
Parameters
CharPtr ptr

System.Char c

System.UInt32 count

Returns
CharPtr

memcmp(CharPtr, CharPtr, Int32)

Declaration
protected static int memcmp(CharPtr ptr1, CharPtr ptr2, int size)
Parameters
CharPtr ptr1

CharPtr ptr2

System.Int32 size

Returns
System.Int32

memcmp(CharPtr, CharPtr, UInt32)

Declaration
protected static lua_Integer memcmp(CharPtr ptr1, CharPtr ptr2, uint size)
Parameters
CharPtr ptr1

CharPtr ptr2

System.UInt32 size

Returns
lua_Integer

sprintf(CharPtr, CharPtr, Object[])

Declaration
public static void sprintf(CharPtr buffer, CharPtr str, params object[] argv)
Parameters
CharPtr buffer

CharPtr str

System.Object[] argv

strchr(CharPtr, Char)

Declaration
protected static CharPtr strchr(CharPtr str, char c)
Parameters
CharPtr str

System.Char c

Returns
CharPtr

strcpy(CharPtr, CharPtr)

Declaration
protected static CharPtr strcpy(CharPtr dst, CharPtr src)
Parameters
CharPtr dst

CharPtr src

Returns
CharPtr

strlen(CharPtr)

Declaration
protected static int strlen(CharPtr str)
Parameters
CharPtr str

Returns
System.Int32

strncpy(CharPtr, CharPtr, Int32)

Declaration
protected static CharPtr strncpy(CharPtr dst, CharPtr src, int length)
Parameters
CharPtr dst

CharPtr src

System.Int32 length

Returns
CharPtr

strpbrk(CharPtr, CharPtr)

Declaration
protected static CharPtr strpbrk(CharPtr str, CharPtr charset)
Parameters
CharPtr str

CharPtr charset

Returns
CharPtr

tolower(Char)

Declaration
protected static char tolower(char c)
Parameters
System.Char c

Returns
System.Char

tolower(Int32)

Declaration
protected static char tolower(int c)
Parameters
System.Int32 c

Returns
System.Char

toupper(Char)

Declaration
protected static char toupper(char c)
Parameters
System.Char c

Returns
System.Char

toupper(Int32)

Declaration
protected static char toupper(int c)
Parameters
System.Int32 c

Returns
System.Char

Back to top Built by Itinero, MIT licensed.