This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
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
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::ExternClass< Class > Class Template

Unigine ExternClass.

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

Unigine::ExternClass Class

Members


SaveFunc Type 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.

RestoreFunc Type 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

Pointer to the class object.

DestructorFunc Type Definition

Description

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

Functor for deleting the object.

Arguments

object - Pointer to the class object.

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.

~ExternClass ()

Default destructor.

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::*)() 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::*)() func - Pointer to the member function.
  • const char * args - Default arguments.

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.

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 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 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 setDestructor (DestructorFunc destructor)

Set functor for deleting constructed objects.

Arguments

  • DestructorFunc destructor - Functor for deleting the constructed object.
Last update: 03.07.2017
Build: ()