This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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.
Last update: 2017-07-03
Build: ()