|
| bool | ExecuteScript (StringPtr ctronScript, bool noEntrypoint=false) |
| | Executes a Clektron script from a native string.
|
| |
| bool | ExecuteScript (const godot::String &ctronScript, bool noEntrypoint=false) |
| | Executes a Clektron script from a String.
|
| |
| bool | ExecuteScriptFromFile (StringPtr ctronScriptFile, bool noEntrypoint=false) |
| | Executes a Clektron script from a file on disk using a native string file path.
|
| |
| bool | ExecuteScriptFromFile (const godot::String &ctronScriptFile, bool noEntrypoint=false) |
| | Executes a Clektron script from a file on disk using a String file path.
|
| |
| bool | BindSymbol (FunctionPtr symbolPtr, StringPtr symbolName, StringPtr returnType, int paramCount,...) |
| | Registers a C++ symbol with the Clektron script engine, making it globally accessible within the framework.
|
| |
| bool | BindSymbol (FunctionPtr symbolPtr, const godot::String &symbolName, const godot::String &returnType, int paramCount,...) |
| | Registers a C++ symbol with the Clektron script engine, making it globally accessible within the framework.
|
| |
This collection of functions provides a set of utilities for executing and managing Clektron (Electron-C) scripts.
◆ ExecuteScript() [1/2]
| bool ExecuteScript |
( |
StringPtr | ctronScript, |
|
|
bool | noEntrypoint = false ) |
Executes a Clektron script from a native string.
- Parameters
-
| ctronScript | The string containing Clektron script to execute. |
| noEntrypoint | If false script engine expects bool ClektronMain() be defined within the script, If true, script execution proceeds without requiring a entrypoint. |
- Returns
true if the script was compiled and executed successfully. false if compilation failed. An error message will be printed to the terminal.
◆ ExecuteScript() [2/2]
| bool ExecuteScript |
( |
const godot::String & | ctronScript, |
|
|
bool | noEntrypoint = false ) |
Executes a Clektron script from a String.
- Parameters
-
| ctronScript | The string containing Clektron script to execute. |
| noEntrypoint | If false script engine expects bool ClektronMain() be defined within the script, If true, script execution proceeds without requiring a entrypoint. |
- Returns
true if the script was compiled and executed successfully. false if compilation failed. An error message will be printed to the terminal.
◆ ExecuteScriptFromFile() [1/2]
| bool ExecuteScriptFromFile |
( |
StringPtr | ctronScriptFile, |
|
|
bool | noEntrypoint = false ) |
Executes a Clektron script from a file on disk using a native string file path.
- Parameters
-
| ctronScriptFile | The file path of the file (.ctron/.ct/.c) containing Clektron script to execute. |
| noEntrypoint | If false script engine expects bool ClektronMain() be defined within the script, If true, script execution proceeds without requiring a entrypoint. |
- Returns
true if the script was compiled and executed successfully. false if compilation failed. An error message will be printed to the terminal.
◆ ExecuteScriptFromFile() [2/2]
| bool ExecuteScriptFromFile |
( |
const godot::String & | ctronScriptFile, |
|
|
bool | noEntrypoint = false ) |
Executes a Clektron script from a file on disk using a String file path.
- Parameters
-
| ctronScriptFile | The file path of the file (.ctron/.ct/.c) containing Clektron script to execute. |
| noEntrypoint | If false script engine expects bool ClektronMain() be defined within the script, If true, script execution proceeds without requiring a entrypoint. |
- Returns
true if the script was compiled and executed successfully. false if compilation failed. An error message will be printed to the terminal.
◆ BindSymbol() [1/2]
Registers a C++ symbol with the Clektron script engine, making it globally accessible within the framework.
- Parameters
-
| symbolPtr | Pointer of the function symbol to bind. |
| symbolName | The name of the function symbol to bind, which will be accessible in scripts. |
| returnType | The return type of the symbol to bind; use void if the symbol does not return a value. |
| paramCount | The number of parameters of the symbol to bind; use 0 if the symbol does not have any parameters. |
| parameters | The arguments to use in the symbol to bind. All paramaters types must be passed as native strings |
Valid types for return or parameter types include bool, String, Size, Instance, Buffer, FunctionPtr and all the standard C types.
- Returns
true if the symbol was bound successfully, false if the pointer is invalid or the symbol already exists.
◆ BindSymbol() [2/2]
Registers a C++ symbol with the Clektron script engine, making it globally accessible within the framework.
- Parameters
-
| symbolPtr | Pointer of the function symbol to bind. |
| symbolName | The name of the function symbol to bind, which will be accessible in scripts. |
| returnType | The return type of the symbol to bind; use void if the symbol does not return a value. |
| paramCount | The number of parameters of the symbol to bind; use 0 if the symbol does not have any parameters. |
| parameters | The arguments to use in the symbol to bind. All paramaters types must be passed as native strings |
Valid types for return or parameter types include bool, String, Size, Instance, Buffer, FunctionPtr and all the standard C types.
- Returns
true if the symbol was bound successfully, false if the pointer is invalid or the symbol already exists.