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

Kactus2 contains a dependency analyzer to manage and visualize dependencies between source files of a component. Source analyzer plugins are used in the dependency analyzer to add support for different code languages and even custom file types. Single source analyzer plugin implements support for a single language or predefined file types. More...

#include <ISourceAnalyzerPlugin.h>

Inheritance diagram for ISourceAnalyzerPlugin:
IPlugin

Public Member Functions

virtual ~ISourceAnalyzerPlugin ()
 
virtual void beginAnalysis (Component const *component, QString const &componentPath)=0
 
virtual QString calculateHash (QString const &filename)=0
 
virtual void endAnalysis (Component const *component, QString const &componentPath)=0
 
virtual QList< FileDependencyDescgetFileDependencies (Component const *component, QString const &componentPath, QString const &filename)=0
 
virtual QStringList getSupportedFileTypes () const =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

Kactus2 contains a dependency analyzer to manage and visualize dependencies between source files of a component. Source analyzer plugins are used in the dependency analyzer to add support for different code languages and even custom file types. Single source analyzer plugin implements support for a single language or predefined file types.

Definition at line 57 of file ISourceAnalyzerPlugin.h.

Constructor & Destructor Documentation

◆ ~ISourceAnalyzerPlugin()

virtual ISourceAnalyzerPlugin::~ISourceAnalyzerPlugin ( )
inlinevirtual

Destructor.

Definition at line 63 of file ISourceAnalyzerPlugin.h.

Member Function Documentation

◆ beginAnalysis()

virtual void ISourceAnalyzerPlugin::beginAnalysis ( Component const * component,
QString const & componentPath )
pure virtual

This function is called once when the dependency analysis scan is started. It gives the plugin the ability to do preparations before any file is analyzed.

Parameters
[in]componentThe component to which the dependency scan is being run.
[in]componentPathThe path to the directory where the component is located.
Remarks
Any preparations needed for the file dependency analysis should be made here.

◆ calculateHash()

virtual QString ISourceAnalyzerPlugin::calculateHash ( QString const & filename)
pure virtual

Calculates a language-dependent hash for the analyzed file. Hash calculation here may ignore whitespace and comments.

Parameters
[in]filenameThe name of the file.
Returns
The hash value for the file.

◆ endAnalysis()

virtual void ISourceAnalyzerPlugin::endAnalysis ( Component const * component,
QString const & componentPath )
pure virtual

This function is called once after the dependency analysis scan has completed. It allows the plugin to make cleanup operations after the dependency scan has been finished, e.g destroy internal data structures.

Parameters
[in]componentThe component to which the dependency scan is being run.
[in]componentPathThe path to the directory where the component is located.
Remarks
Any cleanups needed should be made here.

◆ getFileDependencies()

virtual QList< FileDependencyDesc > ISourceAnalyzerPlugin::getFileDependencies ( Component const * component,
QString const & componentPath,
QString const & filename )
pure virtual

Retrieves all file dependencies the given file has.

Parameters
[in]componentThe component to which the dependency scan is being run.
[in]componentPathThe path to the directory where the component is located.
[in]filenameThe name of the file to which the analysis is run.
Returns
The list of found dependencies.

◆ getSupportedFileTypes()

virtual QStringList ISourceAnalyzerPlugin::getSupportedFileTypes ( ) const
pure virtual

Returns the list of file types this plugin can run analysis for. File type is described as an IP-XACT style string, e.g. cppSource or vhdlSource. Kactus2 includes a settings page for setting which file extensions map to which file types so that the analyzer plugin doesn't have to hard-code the supported extensions.


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