Editor API
UnigineEditor public API
UnigineEditor::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...

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

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

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 UnigineEditor::Plugin::init() method was executed successfully.

STOPPED 

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

UNLOADED 

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

Member Function Documentation

◆ absoluteFilePath()

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

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

◆ compatibleVersion()

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

Returns version of the plugin considered as compatible.

◆ dependencies()

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

Returns the list of dependencies for the plugin.

◆ description()

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

Returns the description of the UnigineEditor plugin.

◆ errorString()

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

Returns a string describing a plugin error.

◆ hasError()

bool UnigineEditor::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 UnigineEditor::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* UnigineEditor::PluginInfo::name ( ) const

Returns the name of the UnigineEditor plugin.

◆ plugin()

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

Returns the Plugin interface.

◆ state()

State UnigineEditor::PluginInfo::state ( ) const

Returns the current plugin state.

Returns
One of the PluginInfo::State enum values.

◆ vendor()

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

Returns the vendor of the UnigineEditor plugin.

◆ version()

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

Returns the version of the UnigineEditor plugin.