Emergency 20 Dokumentation  4.2.0
em5::editor::Plugin Class Reference

EMERGENCY 5 editor plugin implementation. More...

#include <Plugin.h>

Inheritance diagram for em5::editor::Plugin:
qsf::Plugin

Public Member Functions

 Plugin ()
 Default constructor. More...
 
virtual ~Plugin ()
 Destructor. More...
 
virtual const char * getName () const override
 Return the name of the plugin. More...
 
virtual const char * getVendor () const override
 Return the vendor of the plugin. More...
 
virtual const char * getDescription () const override
 Return the description of the plugin. More...
 
- Public Member Functions inherited from qsf::Plugin
const std::string & getFilename () const
 Return the filename of the file this plugin is in. More...
 
const std::vector< const camp::Class * > & getCampClasses () const
 Return the list of CAMP metaclasses registered by this plugin. More...
 
const PluginVersionBasegetPluginVersion () const
 Return plugin version information. More...
 
std::string getPluginVersionString () const
 Return the version string of the plugin. More...
 

Static Public Member Functions

static Plugininstance ()
 Return the global EMERGENCY 5 editor plugin instance. More...
 
static PlugingetInstanceSafe ()
 Return the global EMERGENCY 5 editor plugin instance; throws an exception when it is not initialized. More...
 

Protected Member Functions

virtual bool onInstall () override
 Install the plugin. More...
 
virtual bool onStartup () override
 Startup the plugin. More...
 
virtual void onShutdown () override
 Shutdown the plugin. More...
 
virtual void onUninstall () override
 Uninstall the plugin. More...
 
- Protected Member Functions inherited from qsf::Plugin
 Plugin (PluginVersionBase *pluginVersion)
 Constructor. More...
 
void addCampClass (const camp::Class &campClass)
 Add a CAMP class registered by this plugin. More...
 

Detailed Description

EMERGENCY 5 editor plugin implementation.

Constructor & Destructor Documentation

em5::editor::Plugin::Plugin ( )

Default constructor.

em5::editor::Plugin::~Plugin ( )
inlinevirtual

Destructor.

Reimplemented from qsf::Plugin.

Member Function Documentation

const char * em5::editor::Plugin::getDescription ( ) const
inlineoverridevirtual

Return the description of the plugin.

Returns
The null terminated ASCII description of the plugin, never a null pointer, do not free the returned memory

Implements qsf::Plugin.

Plugin & em5::editor::Plugin::getInstanceSafe ( )
inlinestatic

Return the global EMERGENCY 5 editor plugin instance; throws an exception when it is not initialized.

const char * em5::editor::Plugin::getName ( ) const
inlineoverridevirtual

Return the name of the plugin.

Returns
The null terminated ASCII name of the plugin, never a null pointer, do not free the returned memory

Implements qsf::Plugin.

const char * em5::editor::Plugin::getVendor ( ) const
inlineoverridevirtual

Return the vendor of the plugin.

Returns
The null terminated ASCII vendor of the plugin, never a null pointer, do not free the returned memory

Implements qsf::Plugin.

Plugin * em5::editor::Plugin::instance ( )
inlinestatic

Return the global EMERGENCY 5 editor plugin instance.

Returns
The global EMERGENCY 5 editor plugin instance, null pointer in case there's no such global instance, do no destroy the returned instance
Remarks
This EMERGENCY 5 editor plugin class plays a central role and therefore we decided to make it to a singleton. The approach is the same as the one used by Qt's "QCoreApplication::instance()".
virtual bool em5::editor::Plugin::onInstall ( )
overrideprotectedvirtual

Install the plugin.

Returns
"true" if all went fine, else "false"
Remarks
Keep the installation implementation lightweight. For example register your CAMP metaclasses in here or create instances of new system components.
Note
  • Register plugin systems in here

Implements qsf::Plugin.

virtual void em5::editor::Plugin::onShutdown ( )
overrideprotectedvirtual

Shutdown the plugin.

Note
  • Only called in case "onStartup()" was called and returned successfully
  • Shutdown plugin systems in here

Implements qsf::Plugin.

virtual bool em5::editor::Plugin::onStartup ( )
overrideprotectedvirtual

Startup the plugin.

Returns
"true" if all went fine, else "false"
Note
  • Only called in case "onInstall()" returned successfully
  • Startup plugin systems in here
  • Not called if QSF runs in server mode

Implements qsf::Plugin.

virtual void em5::editor::Plugin::onUninstall ( )
overrideprotectedvirtual

Uninstall the plugin.

Remarks
Keep the installation implementation lightweight. For example unregister your CAMP metaclasses in here or destroy instances of created system components.
Note
  • Only called in case "onInstall()" returned successfully
  • Unregister plugin systems in here

Implements qsf::Plugin.


The documentation for this class was generated from the following files: