EnginePtr Class
Header: | #include <UnigineEngine.h> |
This class is an analogue of the C++ std::auto_ptr class template. It automatically destroys the engine instance when the function is destroyed.
Unigine::EnginePtr engine(...);
engine->main();
EnginePtr Class
Members
EnginePtr ( ) #
An EnginePtr constructor.EnginePtr ( const EnginePtr & ptr ) #
An EnginePtr copy-constructor.Arguments
- const EnginePtr & ptr - Pointer to the EnginePtr instance.
EnginePtr ( int argc, char ** argv ) #
An EnginePtr constructor.Arguments
- int argc - Number of command line arguments.
- char ** argv - Array of command line arguments values.
EnginePtr ( int argc, wchar_t ** argv ) #
An EnginePtr constructor.Arguments
- int argc - Number of command line arguments.
- wchar_t ** argv - Array of command line arguments values.
EnginePtr ( const InitParameters& init_parameters, int argc, char ** argv ) #
An EnginePtr constructor (uses the specified initialization parameters).Arguments
- const InitParameters& init_parameters - Structure of initializing parameters.
- int argc - Number of command line arguments.
- char ** argv - Array of command line arguments values.
EnginePtr ( const InitParameters& init_parameters, int argc, wchar_t ** argv ) #
An EnginePtr constructor (uses the specified initialization parameters).Arguments
- const InitParameters& init_parameters - Structure of initializing parameters.
- int argc - Number of command line arguments.
- wchar_t ** argv - Array of command line arguments values.
Engine * get ( ) #
Returns a pointer to the existing Engine instance.Return value
Pointer to Engine.int isOwner ( ) #
Returns the owner flag of the pointer. If the pointer is the owner, on its deletion the object also will be deleted.Return value
Owner flag.void grab ( ) #
Sets the owner flag to 1 for the Engine pointer.Engine * operator-> ( ) #
Pointer dereferencing and member access operator.Return value
Engine instance.EnginePtr & operator= ( const EnginePtr & ptr ) #
Assign operator.Arguments
- const EnginePtr & ptr - EnginePtr instance.
Return value
EnginePtr instance.void release ( ) #
Releases the owner flag for the pointer. Engine instance will stay alive upon the pointer destruction.void shutdown ( ) #
Destroys the existing engine instance. The pointer must be an owner of the engine instance.Last update:
2024-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)