Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ISourceAnalyzerPlugin.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// File: ISourceAnalyzerPlugin.h
3//-----------------------------------------------------------------------------
4// Project: Kactus 2
5// Author: Joni-Matti Maatta
6// Date: 14.01.2013
7//
8// Description:
9// Source analyzer plugin interface for dependency analysis.
10//-----------------------------------------------------------------------------
11
12#ifndef ISOURCEANALYZER_H
13#define ISOURCEANALYZER_H
14
15#include "IPlugin.h"
16#include "IPluginUtility.h"
17
18#include <QString>
19#include <QStringList>
20#include <QSharedPointer>
21#include <QList>
22#include <QtPlugin>
23
24class Component;
25class FileDependency;
26
27//-----------------------------------------------------------------------------
29//-----------------------------------------------------------------------------
31{
33 QString filename;
36 QString description;
37
44
45 bool operator==(const FileDependencyDesc& lhs) const
46 {
47 return lhs.filename == filename;
48 }
49};
50
51//-----------------------------------------------------------------------------
56//-----------------------------------------------------------------------------
58{
59public:
64
70 virtual QStringList getSupportedFileTypes() const = 0;
71
80 virtual QString calculateHash(QString const& filename) = 0;
81
91 virtual void beginAnalysis(Component const* component, QString const& componentPath) = 0;
92
102 virtual void endAnalysis(Component const* component, QString const& componentPath) = 0;
103
113 virtual QList<FileDependencyDesc> getFileDependencies(Component const* component,
114 QString const& componentPath,
115 QString const& filename) = 0;
116};
117
118//-----------------------------------------------------------------------------
119
120Q_DECLARE_INTERFACE(ISourceAnalyzerPlugin, "com.tut.Kactus2.ISourceAnalyzerPlugin/1.0")
121
122#endif // ISOURCEANALYZER_H
All plugin interfaces inherit from a common IPlugin interface which all plugins must implement....
Definition IPlugin.h:28
Kactus2 contains a dependency analyzer to manage and visualize dependencies between source files of a...
virtual void beginAnalysis(Component const *component, QString const &componentPath)=0
virtual QList< FileDependencyDesc > getFileDependencies(Component const *component, QString const &componentPath, QString const &filename)=0
virtual QStringList getSupportedFileTypes() const =0
virtual void endAnalysis(Component const *component, QString const &componentPath)=0
virtual QString calculateHash(QString const &filename)=0
QString filename
The name of the dependent file, for example "componentName.vhd".
QString description
Possible automatically deduced description for the dependency, for example "Component instantiation f...
bool operator==(const FileDependencyDesc &lhs) const