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>
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.
◆ ~ISourceAnalyzerPlugin()
virtual ISourceAnalyzerPlugin::~ISourceAnalyzerPlugin |
( |
| ) |
|
|
inlinevirtual |
◆ 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] | component | The component to which the dependency scan is being run. |
[in] | componentPath | The path to the directory where the component is located. |
◆ 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] | filename | The 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] | component | The component to which the dependency scan is being run. |
[in] | componentPath | The path to the directory where the component is located. |
◆ 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] | component | The component to which the dependency scan is being run. |
[in] | componentPath | The path to the directory where the component is located. |
[in] | filename | The 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: