This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::ExternClass Template

Header: #include <UnigineInterface.h>

Unigine ExternClass.

ExternClass Class

Members


SaveFuncType Definition

Description

Full declaration:
typedef void(* Unigine::ExternClass< Class >::SaveFunc)(const StreamPtr &stream, Class *object)

Functor for saving the object state.

Arguments

stream - Write stream for object serialization.
object - Pointer to the class object.

Return value

void(*

RestoreFuncType Definition

Description

Full declaration:
typedef Class*(* Unigine::ExternClass< Class >::RestoreFunc)(const StreamPtr &stream)

Functor for restoring the object state.

Arguments

stream - Read stream for object serialization.

Return value

Class *(* Pointer to the class object.

DestructorFuncType Definition

Description

Full declaration:
typedef void(* Unigine::ExternClass< Class >::DestructorFunc)(Class *object)

Functor for deleting the object.

Arguments

object - Pointer to the class object.

Return value

void(*

ExternClass ( SaveFunc save_state, RestoreFunc restore_state, SaveFunc save_pointer, RestoreFunc restore_pointer, DestructorFunc destructor ) #

Default constructor.

Arguments

  • SaveFunc save_state - Functor for saving the constructed object state.
  • RestoreFunc restore_state - Functor for restoring the constructed object state.
  • SaveFunc save_pointer - Functor for saving the external constructed object state.
  • RestoreFunc restore_pointer - Functor for restoring the external constructed object state.
  • DestructorFunc destructor - Functor for deleting the constructed object.

void setDestructor ( DestructorFunc destructor ) #

Set functor for deleting constructed objects.

Arguments

  • DestructorFunc destructor - Functor for deleting the constructed object.

void setSaveRestorePointer ( SaveFunc save, RestoreFunc restore ) #

Set functors for saving/restoring pointers.

Arguments

  • SaveFunc save - Functor for saving the external constructed object state.
  • RestoreFunc restore - Functor for restoring the external constructed object state.

void setSaveRestoreState ( SaveFunc save, RestoreFunc restore ) #

Set functors for saving/restoring state.

Arguments

  • SaveFunc save - Functor for saving the constructed object state.
  • RestoreFunc restore - Functor for restoring the constructed object state.

void addBaseClass ( ExternClassBase * base ) #

Adds a base class to an external class.

Arguments

  • ExternClassBase * base - Pointer to the base class.

void addConstructor ( const char * args ) #

Adds a constructor to an external class. The constructor can receive up to 9 arguments.

Arguments

  • const char * args - Default arguments.

void addConstructor ( Class *(*)() func, const char * args ) #

Adds a constructor to an external class. The constructor can receive up to 9 arguments.

Arguments

  • Class *(*)() func - Functor for creating the object.
  • const char * args - Default arguments.

void addFunction ( const char * name, Ret (Type::*)() __attribute__((thiscall)) func, const char * args ) #

Adds a member function to an external class. The function can receive up to 9 arguments and return void or value of any supported type. Constant member functions are also supported.

Arguments

  • const char * name - Name of the member function.
  • Ret (Type::*)() __attribute__((thiscall)) func - Pointer to the member function.
  • const char * args - Default arguments.

void addGetFunction ( const char * name, Type Class::* member ) #

Adds a getter function to an external class member.

Arguments

  • const char * name - Name of the getter function.
  • Type Class::* member - Class member.

void addSetFunction ( const char * name, Type Class::* member ) #

Adds a setter function to an external class member.

Arguments

  • const char * name - Name of the setter function.
  • Type Class::* member - Class member.
Last update: 2021-12-13
Build: ()