C# Class LeopotamGroup.Scripting.Vars

Variables state of VM. For internal useage
显示文件 Open project: Leopotam/LeopotamGroupLibraryUnity

Public Methods

Method Description
CallHostFunction ( string funcName ) : ScriptVar

Call the host function without checking of existence - be careful on it! For internal use only!

GetFunction ( string varName ) : FunctionDesc

Get function description without checking of existence - be careful on it!

GetVar ( string varName ) : ScriptVar

Get script variable without checking of existence - be careful on it!

IsFunctionExists ( string funcName ) : bool

Is script function exists.

IsHostFunctionExists ( string funcName ) : bool

is host function exists.

IsVarExists ( string varName ) : bool

Is script variable exists.

RegisterFunction ( string funcName, int pc, List paramList ) : void

Register script function during parsing. For internal use.

RegisterHostFunction ( string funcName, HostFunction cb ) : void

Register host function (publish to script).

RegisterVar ( string varName, ScriptVar v ) : void

Create / update script variable with value.

Reset ( ) : void

Reset internal state (script functions, variables). Published host functions will be kept.

ResetVars ( ) : void

Reset script variables.

UnregisterHostFunctions ( ) : void

Unregister all host functions.

Vars ( ScriptVM vm ) : System.Collections.Generic

Initialization for specified ScriptVM.

Method Details

CallHostFunction() public method

Call the host function without checking of existence - be careful on it! For internal use only!
public CallHostFunction ( string funcName ) : ScriptVar
funcName string Func name.
return ScriptVar

GetFunction() public method

Get function description without checking of existence - be careful on it!
public GetFunction ( string varName ) : FunctionDesc
varName string Variable name.
return FunctionDesc

GetVar() public method

Get script variable without checking of existence - be careful on it!
public GetVar ( string varName ) : ScriptVar
varName string Variable name.
return ScriptVar

IsFunctionExists() public method

Is script function exists.
public IsFunctionExists ( string funcName ) : bool
funcName string Func name.
return bool

IsHostFunctionExists() public method

is host function exists.
public IsHostFunctionExists ( string funcName ) : bool
funcName string Function name.
return bool

IsVarExists() public method

Is script variable exists.
public IsVarExists ( string varName ) : bool
varName string Variable name.
return bool

RegisterFunction() public method

Register script function during parsing. For internal use.
public RegisterFunction ( string funcName, int pc, List paramList ) : void
funcName string Function name.
pc int PC counter at script-s lexem stream.
paramList List Parameters list.
return void

RegisterHostFunction() public method

Register host function (publish to script).
public RegisterHostFunction ( string funcName, HostFunction cb ) : void
funcName string Function name.
cb HostFunction Host callback.
return void

RegisterVar() public method

Create / update script variable with value.
public RegisterVar ( string varName, ScriptVar v ) : void
varName string Variable name.
v ScriptVar V.
return void

Reset() public method

Reset internal state (script functions, variables). Published host functions will be kept.
public Reset ( ) : void
return void

ResetVars() public method

Reset script variables.
public ResetVars ( ) : void
return void

UnregisterHostFunctions() public method

Unregister all host functions.
public UnregisterHostFunctions ( ) : void
return void

Vars() public method

Initialization for specified ScriptVM.
public Vars ( ScriptVM vm ) : System.Collections.Generic
vm ScriptVM
return System.Collections.Generic