TGorillaScriptEngine
Core component of scripting activities inside of Gorilla3D.
Ancestors
Members
Fields
- protected FSearchPaths :
TStringList
- protected FCompilerDirectives :
TStringList
- protected FParser :
TGorillaScriptParser
- protected FCompiler :
TGorillaScriptCompiler
- protected FExecutors :
TObjectList<Gorilla.Script.Executor.TGorillaScriptExecutor>
- protected FRegisteredEnums :
TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- protected FRegisteredSets :
TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- protected FRegisteredStructs :
TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- protected FRegisteredInterfaces :
TList<System.string>
- protected FRegisteredClasses :
TList<System.TClass>
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- public procedure RegisterNativeEnum
(
const
AEnum :
TGorillaScriptRegisteredType
)
;
virtual;
Registeres a native enumeration type. Call this before loading any script file.
- public procedure RegisterNativeEnums
(
const
AEnums :
TArray<Gorilla.Script.Types.TGorillaScriptRegisteredType>
)
;
virtual;
Registeres a number of native enumeration types. Call this before loading any script file.
- public procedure RegisterNativeSet
(
const
AEnum :
TGorillaScriptRegisteredType
)
;
virtual;
Registeres a native set type. Call this before loading any script file.
- public procedure RegisterNativeSets
(
const
AEnums :
TArray<Gorilla.Script.Types.TGorillaScriptRegisteredType>
)
;
virtual;
Registeres a number of native set types. Call this before loading any script file.
- public procedure RegisterNativeStruct
(
const
AStruct :
TGorillaScriptRegisteredType
)
;
virtual;
Registeres a native record / struct type. Call this before loading any script file.
- public procedure RegisterNativeStructs
(
const
AStructs :
TArray<Gorilla.Script.Types.TGorillaScriptRegisteredType>
)
;
virtual;
Registeres a number of native record / struct types. Call this before loading any script file.
- public procedure RegisterNativeInterface
(
const
AIntf :
string
)
;
virtual;
Registeres a native interface type. Call this before loading any script file.
- public procedure RegisterNativeInterfaces
(
const
AIntfs :
TArray<System.string>
)
;
virtual;
Registeres a number of native interface types. Call this before loading any script file.
- public procedure RegisterNativeClass
(
const
AClass :
TClass
)
;
virtual;
Registeres a native class type. Call this before loading any script file.
- public procedure RegisterNativeClasses
(
const
AClasses :
TArray<System.TClass>
)
;
virtual;
Registeres a number of native class types. Call this before loading any script file.
- public procedure LoadFromFile
(
const
AFilename :
string
)
;
virtual;
Loads and parses a script file and all included script files for filename.
- public procedure LoadFromStream
(
const
AStream :
TStream
)
;
virtual;
Loads and parses a script code stream and all included script files.
- public procedure Compile
(
)
;
virtual;
Compile parsed source code into bytecode format.
- public procedure Execute
(
const
AKeepAlive :
Boolean
)
;
virtual;
Execute compiled bytecode. The keep-alive parameter allows you to keep the executor instance for later reusage, f.e. in event-callbacks.
Properties
- public SearchPaths : TStringList
Contains a list of predefined search-paths. Every path needed for lookup should be added before starting parsing-process.
read FSearchPaths - public CompilerDirectives : TStringList
Contains a list of predefined compiler directives. Each directive should be available before parsing time.
read FCompilerDirectives - public RegisteredEnums : TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- public RegisteredSets : TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- public RegisteredStructs : TList<Gorilla.Script.Types.TGorillaScriptRegisteredType>
- public RegisteredInterfaces : TList<System.string>
- public RegisteredClasses : TList<System.TClass>
- public Parser : TGorillaScriptParser
- public Compiler : TGorillaScriptCompiler