Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
IGeneratorPlugin Class Referenceabstract

Generator plugins can be used in the component editor and design editors to generate content for the currently active document. The content can //! be, e.g., new source files or direct modifications to the IP-XACT metadata of the document. Plugin generators will automatically appear in the Kactus2 ribbon menu under the Generation group. More...

#include <IGeneratorPlugin.h>

Inheritance diagram for IGeneratorPlugin:
IPlugin

Public Member Functions

virtual ~IGeneratorPlugin ()
 
virtual bool checkGeneratorSupport (QSharedPointer< Component const > component, QSharedPointer< Design const > design, QSharedPointer< DesignConfiguration const > designConfiguration) const =0
 
virtual QIcon getIcon () const =0
 
virtual void runGenerator (IPluginUtility *utility, QSharedPointer< Component > component, QSharedPointer< Design > design, QSharedPointer< DesignConfiguration > designConfiguration)=0
 
- Public Member Functions inherited from IPlugin
virtual ~IPlugin ()
 
virtual QString getDescription () const =0
 
virtual QString getLicense () const =0
 
virtual QString getLicenseHolder () const =0
 
virtual QString getName () const =0
 
virtual QList< ExternalProgramRequirementgetProgramRequirements ()=0
 
virtual PluginSettingsModelgetSettingsModel ()=0
 
virtual QWidget * getSettingsWidget ()=0
 
virtual QString getVendor () const =0
 
virtual QString getVersion () const =0
 

Detailed Description

Generator plugins can be used in the component editor and design editors to generate content for the currently active document. The content can //! be, e.g., new source files or direct modifications to the IP-XACT metadata of the document. Plugin generators will automatically appear in the Kactus2 ribbon menu under the Generation group.

Definition at line 31 of file IGeneratorPlugin.h.

Constructor & Destructor Documentation

◆ ~IGeneratorPlugin()

virtual IGeneratorPlugin::~IGeneratorPlugin ( )
inlinevirtual

Destructor.

Definition at line 37 of file IGeneratorPlugin.h.

Member Function Documentation

◆ checkGeneratorSupport()

virtual bool IGeneratorPlugin::checkGeneratorSupport ( QSharedPointer< Component const > component,
QSharedPointer< Design const > design,
QSharedPointer< DesignConfiguration const > designConfiguration ) const
pure virtual

Checks whether the generator may run for the given component or design.

Parameters
[in]componentThe component for which to check support. If design is not null, component will refer to design or designConfiguration.
[in]designThe design, if the generator is ran for a design.
[in]designConfigurationThe design configuration for design, if it is not null.
Returns
True, if the generator may run the given component. Otherwise false.

◆ getIcon()

virtual QIcon IGeneratorPlugin::getIcon ( ) const
pure virtual

Returns the icon for the generator.

◆ runGenerator()

virtual void IGeneratorPlugin::runGenerator ( IPluginUtility * utility,
QSharedPointer< Component > component,
QSharedPointer< Design > design,
QSharedPointer< DesignConfiguration > designConfiguration )
pure virtual

Runs the generation, creating new files and/or modifying the IP-XACT metadata. The function has also access to the parent window widget, so that it can show dialogs for the user to aid the generation.

Parameters
[in]utilityThe plugin utility interface.
[in]componentThe component for which to check support. If design is not null, component will refer to design or designConfiguration.
[in]designThe design, if the generator is ran for a design.
[in]designConfigurationThe design configuration for design, if it is not null.

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