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 QString & name () const
 Returns the name of the UnigineEditor plugin. More...
 
const QString & version () const
 Returns the version of the UnigineEditor plugin. More...
 
const QString & vendor () const
 Returns the vendor of the UnigineEditor plugin. More...
 
const QString & description () const
 Returns the description of the UnigineEditor plugin. More...
 
const QString & compatibleVersion () const
 Returns version of the plugin considered as compatible. More...
 
const QVector< PluginDependencydependencies () const
 Returns the list of dependencies for the plugin. More...
 
const QString & 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 QString & errorString () const
 Returns a string describing a plugin error. More...
 
State state () const
 Returns the current plugin state. More...
 
bool isInstanceOf (const QString &name, const QString &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 QString& Editor::PluginInfo::absoluteFilePath ( ) const

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

◆ compatibleVersion()

const QString& Editor::PluginInfo::compatibleVersion ( ) const

Returns version of the plugin considered as compatible.

◆ dependencies()

const QVector<PluginDependency> Editor::PluginInfo::dependencies ( ) const

Returns the list of dependencies for the plugin.

◆ description()

const QString& Editor::PluginInfo::description ( ) const

Returns the description of the UnigineEditor plugin.

◆ errorString()

const QString& 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 QString &  name,
const QString &  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 QString& 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 QString& Editor::PluginInfo::vendor ( ) const

Returns the vendor of the UnigineEditor plugin.

◆ version()

const QString& Editor::PluginInfo::version ( ) const

Returns the version of the UnigineEditor plugin.

Friends And Related Function Documentation

◆ PluginManagerPrivate

friend class PluginManagerPrivate
friend