Editor API
UnigineEditor public API
Editor::PluginInfo Class Reference

This class it is responsible for plugin loading/unloading and contains all necessary plugin metadata (name, version, dependencies, etc.). It can also be used to check the current plugin state and get information on errors (if any). More...

#include <PluginInfo.h>

Public Types

enum  State {
  State::INVALID, State::READ, State::RESOLVED, State::LOADED,
  State::RUNNING, State::STOPPED, State::UNLOADED
}
 Current plugin state. More...
 

Public Member Functions

 PluginInfo ()
 
 ~PluginInfo ()
 
const char * name () const
 Returns the name of the UnigineEditor plugin. More...
 
const char * version () const
 Returns the version of the UnigineEditor plugin. More...
 
const char * vendor () const
 Returns the vendor of the UnigineEditor plugin. More...
 
const char * description () const
 Returns the description of the UnigineEditor plugin. More...
 
const char * compatibleVersion () const
 Returns version of the plugin considered as compatible. More...
 
Unigine::Vector< PluginDependencydependencies () const
 Returns the list of dependencies for the plugin. More...
 
const char * absoluteFilePath () const
 Returns an absolute filepath to the corresponding plugin's binary file. More...
 
bool hasError () const
 Returns true if a plugin error has occurred. If the result is positive, you can use the errorString() method to get detailed error information. More...
 
const char * errorString () const
 Returns a string describing a plugin error. More...
 
State state () const
 Returns the current plugin state. More...
 
bool isInstanceOf (const char *name, const char *version) const
 Returns true if the plugin can be used to resolve a dependency of the given name and version. More...
 
Pluginplugin () const
 Returns the Plugin interface. More...
 

Friends

class PluginManagerPrivate
 

Detailed Description

This class it is responsible for plugin loading/unloading and contains all necessary plugin metadata (name, version, dependencies, etc.). It can also be used to check the current plugin state and get information on errors (if any).

Member Enumeration Documentation

◆ State

Current plugin state.

Enumerator
INVALID 

Initial plugin state indicating that initialization either has not yet started or an error has occurred during initialization.

READ 

Plugin metadata is read and processed successfully.

RESOLVED 

All required dependencies of the plugin are resolved.

LOADED 

The plugin's dynamic link library is successfully loaded and processed by the dynamic linker.

RUNNING 

The plugin is running - i.e., the Editor::Plugin::init() method was executed successfully.

STOPPED 

The plugin is stopped - i.e., the Editor::Plugin::shutdown() method was called.

UNLOADED 

The plugin's dynamic link library is successfully unloaded from memory.

Constructor & Destructor Documentation

◆ PluginInfo()

Editor::PluginInfo::PluginInfo ( )

◆ ~PluginInfo()

Editor::PluginInfo::~PluginInfo ( )

Member Function Documentation

◆ absoluteFilePath()

const char* Editor::PluginInfo::absoluteFilePath ( ) const

Returns an absolute filepath to the corresponding plugin's binary file.

◆ compatibleVersion()

const char* Editor::PluginInfo::compatibleVersion ( ) const

Returns version of the plugin considered as compatible.

◆ dependencies()

Unigine::Vector<PluginDependency> Editor::PluginInfo::dependencies ( ) const

Returns the list of dependencies for the plugin.

◆ description()

const char* Editor::PluginInfo::description ( ) const

Returns the description of the UnigineEditor plugin.

◆ errorString()

const char* Editor::PluginInfo::errorString ( ) const

Returns a string describing a plugin error.

◆ hasError()

bool Editor::PluginInfo::hasError ( ) const

Returns true if a plugin error has occurred. If the result is positive, you can use the errorString() method to get detailed error information.

◆ isInstanceOf()

bool Editor::PluginInfo::isInstanceOf ( const char *  name,
const char *  version 
) const

Returns true if the plugin can be used to resolve a dependency of the given name and version.

Parameters
namePlugin name.
versionPlugin version.

◆ name()

const char* Editor::PluginInfo::name ( ) const

Returns the name of the UnigineEditor plugin.

◆ plugin()

Plugin* Editor::PluginInfo::plugin ( ) const

Returns the Plugin interface.

◆ state()

State Editor::PluginInfo::state ( ) const

Returns the current plugin state.

Returns
One of the PluginInfo::State enum values.

◆ vendor()

const char* Editor::PluginInfo::vendor ( ) const

Returns the vendor of the UnigineEditor plugin.

◆ version()

const char* Editor::PluginInfo::version ( ) const

Returns the version of the UnigineEditor plugin.

Friends And Related Function Documentation

◆ PluginManagerPrivate

friend class PluginManagerPrivate
friend