Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
LibraryLoader.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// File: LibraryLoader.h
3//-----------------------------------------------------------------------------
4// Project: Kactus2
5// Author: Esko Pekkarinen
6// Date: 07.04.2018
7//
8// Description:
9// Class for IP-XACT file search and type parsing.
10//-----------------------------------------------------------------------------
11
12#ifndef LIBRARYLOADER_H
13#define LIBRARYLOADER_H
14
15#include "DocumentFileAccess.h"
16
18
19#include <IPXACTmodels/common/VLNV.h>
20
21#include <QObject>
22
23//-----------------------------------------------------------------------------
25//-----------------------------------------------------------------------------
27{
28public:
29
32 {
33 QString path;
34 VLNV vlnv;
35
37 LoadTarget(VLNV const& targetVLNV = VLNV(), QString targetPath = QString()):
38 path(targetPath), vlnv(targetVLNV) {}
39 };
40
45 void clean(QStringList const& changedDirectories) const;
46
51 QVector<LoadTarget> parseLibrary(MessageMediator const* messageChannel) const;
52
53private:
54
61 VLNV getDocumentVLNV(QString const& path, MessageMediator const* messageChannel) const;
62
69 void clearDirectoryStructure(QString const& dirPath, QStringList const& libraryLocations) const;
70
77 bool containsPath(QString const& path, QStringList const& pathsToSearch) const;
78};
79
81
82#endif // LIBRARYLOADER_H
Q_DECLARE_TYPEINFO(LibraryLoader::LoadTarget, Q_MOVABLE_TYPE)
Class for IP-XACT file search and type parsing.
QVector< LoadTarget > parseLibrary(MessageMediator const *messageChannel) const
void clean(QStringList const &changedDirectories) const
Interface for outputting messages to the user.
Struct for load targets.
LoadTarget(VLNV const &targetVLNV=VLNV(), QString targetPath=QString())
Constructor.
VLNV vlnv
The VLNV defined in the file.
QString path
The path to IP-XACT file.