ArrayLibrary

Library for functions related to arrays

Constructors

this
this()

constructor

Members

Functions

addFunction
integer addFunction(Function func)

Adds a new function

functionCallArgumentsPushOrder
uinteger[] functionCallArgumentsPushOrder(uinteger functionId)

setLength uses arrayLengthSet which wants arguments in opposite order

generateFunctionCallCode
bool generateFunctionCallCode(QScriptBytecode bytecode, uinteger functionId, CodeGenFlags flags)

Generates bytecode for a function call, or return false

hasFunction
integer hasFunction(string name, DataType[] argsType, DataType returnType)

Inherited Members

From Library

_autoImport
bool _autoImport;

if this library is automatically imported

_name
string _name;

name of library

_functions
Function[] _functions;

functions exported by library. The index is function ID.

_vars
Variable[] _vars;

global variables exported by this library. index is ID

_structs
Struct[] _structs;

structs exported by library

_enums
Enum[] _enums;

Enums exported by library

autoImport
bool autoImport [@property getter]

if this library is automatically imported

name
string name [@property getter]

library name

functions
Function[] functions [@property getter]

functions exported by library. The index is function ID.

addFunction
integer addFunction(Function func)

Adds a new function

vars
Variable[] vars [@property getter]

global variables exported by this library. index is ID

addVar
integer addVar(Variable var)

Adds a new variable.

structs
Struct[] structs [@property getter]

structs exported by library

addStruct
integer addStruct(Struct str)

Adds a new struct

enums
Enum[] enums [@property getter]

Enums exported by library

addEnum
integer addEnum(Enum enu)

Adds a new enum

hasStruct
bool hasStruct(string name, Struct str)
bool hasStruct(string name)
hasEnum
bool hasEnum(string name, Enum enu)
bool hasEnum(string name)
hasVar
integer hasVar(string name, DataType type)
hasVar
bool hasVar(string name)
hasFunction
integer hasFunction(string name, DataType[] argsType, DataType returnType)
integer hasFunction(string name, DataType[] argsType)
hasFunction
bool hasFunction(string name)
functionCallArgumentsPushOrder
uinteger[] functionCallArgumentsPushOrder(uinteger functionId)

For use with generateFunctionCallCode. Use this to change what order arguments are pushed to stack before the bytecode for functionCall is generated

generateFunctionCallCode
bool generateFunctionCallCode(QScriptBytecode bytecode, uinteger functionId, CodeGenFlags flags)

Generates bytecode for a function call, or return false

generateVariableCode
bool generateVariableCode(QScriptBytecode bytecode, uinteger variableId, CodeGenFlags flags)

Generates bytecode that will push value of a variable to stack, or return false

execute
NaData execute(uinteger functionId, NaData[] args)

Executes a library function

getVar
NaData getVar(uinteger varId)
getVarRef
NaData getVarRef(uinteger varId)

Sets value of a variable

toString
string toString()

Writes this library to a single printable string

fromString
string fromString(string libraryString)

Reads this library from a string (reverse of toString)

Meta