LuauState class abstract

Constructors

LuauState()

Properties

consoleHasData ChangeNotifier
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

booleanAt(int index) bool
call(int numArgs, int numResults) → void
createTable({int arraySize = 0, int recordCount = 0}) → void
Creates a table and pushes it on the stack, reserving memory for arraySize and recordCount.
dataValueAt(int index) ScriptedDataValue
dispose() → void
dumpStack() → void
equal(int index1, int index2) bool
gc(GarbageCollection what, [int data = 0]) int
Controls the garbage collector. This function performs several tasks, according to the value of the what parameter.
getField(int index, String name) LuauType
Pushes onto the stack the value tk, where t is the value at the given index. As in Lua, this function may trigger a metamethod for the "index" event.
getGlobal(String name) LuauType
Pushes onto the stack the value of the global name. Returns the type of that value.
getTop() int
lua_gettop equivalent. Returns the number of elements in the stack, which is also the index of the top element. Notice that a negative index -x is equivalent to the positive index gettop - x + 1.
insert(int index) → void
integerAt(int index) int
isBoolean(int index) bool
isBuffer(int index) bool
isFunction(int index) bool
isLightUserdata(int index) bool
isNil(int index) bool
isNumber(int index) bool
isString(int index) bool
isTable(int index) bool
isThread(int index) bool
isUserdata(int index) bool
isVector(int index) bool
lessThan(int index1, int index2) bool
load(String name, Uint8List bytecode, {int env = 0}) → void
memoryUsedKB() int
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numberAt(int index) double
pathAt(int index) ScriptedPath
pcall(int numArgs, int numResults) LuauStatus
pop(int count) → void
pushArtboard(Artboard artboard) → void
pushBoolean(bool value) → void
pushDataValueBoolean(bool value) ScriptedDataValue
pushDataValueColor(int value) ScriptedDataValue
pushDataValueNumber(double value) ScriptedDataValue
pushDataValueString(String value) ScriptedDataValue
pushFunction(LuauFunction t, {String debugName = 'unknown'}) → void
pushInteger(int value) → void
pushNil() → void
pushNumber(double value) → void
pushPath(RenderPath path) → void
pushPointerEvent(int id, Vec2D position) PointerEvent
pushRef(int id) LuauType
pushRenderer(Renderer renderer) ScriptedRenderer
pushString(String value) → void
pushUnsigned(int value) → void
pushValue(int index) → void
Pushes on the top of the stack a copy of the element at the given index.
pushVector(Vec2D value) → void
pushViewModelInstanceValue(InternalViewModelInstanceValue value) → void
rawGeti(int idx, int n) LuauType
lua_rawgeti equivalent. Pushes onto the stack the value tn, where t is the table at the given index. The access is raw, that is, it does not invoke the __index metamethod. Returns the type of the pushed value.
readConsole(List<ConsoleEntry> entries) bool
ref(int idx) int
lua_unref equivalent. Stores the value at idx in the registry and returns an integer id to unref and get it. This is a strong reference, the object will not get garbage collected until it is unreffed.
registerModule(String name, Uint8List bytecode) bool
registerScript(String name, Uint8List bytecode) bool
registerStateWithFile(File file) → void
remove(int index) → void
Removes the element at the given valid index, shifting down the elements above this index to fill the gap. Cannot be called with a pseudo-index, because a pseudo-index is not an actual stack position.
replace(int index) → void
Moves the top element into the given valid index without shifting any element (therefore replacing the value at that given index), and then pops the top element.
setField(int index, String name) → void
Does the equivalent to tk = v, where t is the value at the given index and v is the value on the top of the stack.
setGlobal(String name) → void
setMetaTable(int index) → void
The function pops a table from the stack and sets it as the metatable of the object at the given index.
setTop(int index) → void
lua_settop equivalent.
stringAt(int index) String
toString() String
A string representation of this object.
inherited
typeAt(int index) LuauType
unref(int id) → void
Removes the reference with id from the registry. The object will be garbage collected when it is no longer used elsewhere.
unregisterModule(String name) → void
unsignedAt(int index) int
vectorAt(int index) Vec2D
where(int level) → void
Pushes onto the stack a string identifying the current position of the control at level level in the call stack. Typically this string has the following format: chunkname:currentline:
writeConsole(ConsoleEntry entry) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init(Factory riveFactory) LuauState

Constants

luaGlobalsIndex → const int
luaRegistryIndex → const int
maxCStack → const int