UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1

Unigine::Interpreter Class

Unigine Interpreter.

To use this class, include the UnigineInterpreter.h file.

Unigine::Interpreter Class

Members


static void addExternDefine (const char * name)

Adds a definition to UnigineScript. This function is similar to #define Foo.

Arguments

  • const char * name - Name of the definition.

static void removeExternDefine (const char * name)

Remove a definition from UnigineScript. This function is similar to #undef Foo.

Arguments

  • const char * name - Name of the definition.

static void addExternLibrary (const char * name)

Adds a library namespace to UnigineScript. All external variables and functions with names like library.function() will be treated as library functions.

Arguments

  • const char * name - Name of the library.

static void removeExternLibrary (const char * name)

Remove a library namespace from UnigineScript.

Arguments

  • const char * name - Name of the library.

static void addExternVariable (const char * name, ExternVariableBase * extern_variable)

Adds a user variable to UnigineScript.

Arguments

  • const char * name - Name of the variable.
  • ExternVariableBase * extern_variable - Pointer to the external variable.

static void removeExternVariable (const char * name)

Remove a user variable from UnigineScript.

Arguments

  • const char * name - Name of the variable.

static ExternVariableBase * getExternVariable (const char * name)

Get a user variable from UnigineScript.

Arguments

  • const char * name - Name of the variable.

Return value

Pointer to the external variable.

static void addExternFunction (const char * name, ExternFunctionBase * extern_function)

Adds a user function to UnigineScript. To create an external function use MakeExternFunction() command.

Arguments

  • const char * name - Name of the function.
  • ExternFunctionBase * extern_function - Pointer to the external function.

static void removeExternFunction (const char * name)

Remove a user function from UnigineScript.

Arguments

  • const char * name - Name of the function.

static ExternFunctionBase * getExternFunction (const char * name)

Get a user function from UnigineScript.

Arguments

  • const char * name - Name of the function.

Return value

Pointer to the external function.

static void addExternClass (const char * name, ExternClassBase * extern_class)

Adds a user class to UnigineScript. To create an external function use MakeExternClass() command.

Arguments

  • const char * name - Name of the class.
  • ExternClassBase * extern_class - Pointer to the external class.

static void removeExternClass (const char * name)

Remove a user class from UnigineScript.

Arguments

  • const char * name - Name of the class.

static ExternClassBase * getExternClass (const char * name)

Get a user class from UnigineScript.

Arguments

  • const char * name - Name of the class.

Return value

Pointer to the external class.

static void * get ()

Return the current interpreter pointer.

Return value

Current interpreter pointer.

static int getStack ()

Return the current interpreter stack depth.

Return value

Current interpreter stack depth.

static Variable popStack ()

Pop the variable from the current interpreter stack.

Return value

Poped variable from the current interpreter stack.

static void error (const char * format, ...)

Interpreter error function.

Arguments

  • const char * format - Format string. It is similar to the format string for printf() in C.
  • ... - Arguments, multiple allowed.
Last update: 2017-07-03