Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ImportPlugin.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// File: ImportParser.h
3//-----------------------------------------------------------------------------
4// Project: Kactus 2
5// Author: Esko Pekkarinen
6// Date: 17.09.2014
7//
8// Description:
9// Import plugins can be used to create elements e.g. ports in components from implementation source files
10// e.g. VHDL files. The import can be run in component wizard. After selecting the top-level file, all active
11// import plugins, whose accepted file ypes match the selected file, will be run.
12//-----------------------------------------------------------------------------
13
14#ifndef IMPORTPARSER_H
15#define IMPORTPARSER_H
16
18
19#include <QSharedPointer>
20#include <QtPlugin>
21
22class Component;
23
24class ImportPlugin : public IPlugin
25{
26public:
27
31 virtual ~ImportPlugin() = default;
32
38 virtual QStringList getSupportedFileTypes() const = 0;
39
45 virtual QString getCompatibilityWarnings() const = 0;
46
54 virtual QStringList getFileComponents(QString const& input) const = 0;
55
63 virtual QString getComponentName(QString const& componentDeclaration) const = 0;
64
72 virtual void import(QString const& input, QString const& componentDeclaration,
73 QSharedPointer<Component> targetComponent) = 0;
74
75};
76
77Q_DECLARE_INTERFACE(ImportPlugin, "com.tut.Kactus2.ImportPlugin/1.0")
78
79#endif // IMPORTPARSER_H
All plugin interfaces inherit from a common IPlugin interface which all plugins must implement....
Definition IPlugin.h:28
virtual QString getCompatibilityWarnings() const =0
virtual QString getComponentName(QString const &componentDeclaration) const =0
virtual QStringList getSupportedFileTypes() const =0
virtual QStringList getFileComponents(QString const &input) const =0
virtual ~ImportPlugin()=default