45 lines
1.8 KiB
C++
Executable File
45 lines
1.8 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ISM Custom functions (extends flm_db_impl.cpp/.h)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Iuliana Ojog, SLSE, 2016-11-26
|
|
*/
|
|
#pragma once
|
|
|
|
#include <FileManagement/flm_dtc_impl.h>
|
|
#include <functional>
|
|
|
|
//-------------------------------------------------------------------------------------------------------------
|
|
namespace FileManagement
|
|
{
|
|
namespace Interface
|
|
{
|
|
class DtcImplCustom final : public Interface::DtcImpl
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DtcImplCustom(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
|
|
|
|
bool getAllTemplates(QList<FileContent> &allTemplates) override;
|
|
|
|
bool getAllFiles(const FileType &fileType, int folderId, QStringList &allFiles, bool showHidden = false) override;
|
|
bool getFilesOperator(const FileType &fileType, int folderId, int operatorId, QStringList &allFiles) override;
|
|
bool getFile(const FileType &fileType, int folderId, const QString &fileName, FileContent &fileMetadata) override;
|
|
int getExerciseId(int folderId) override;
|
|
int getFileId(const FileType &fileType, const QString &fileName, int exerciseId, int phaseId) override;
|
|
int findFolder(int parentId, const QString &name) const override;
|
|
|
|
QString getExerciseFolderName(int exerciseId) const override { return QLatin1String("$EX_")+ QString::number(exerciseId);}
|
|
QString getPartyFolderName(int partyId) const override { return QLatin1String("$PY_")+ QString::number(partyId);}
|
|
QString getPhaseFolderName(int phaseId) const override { return QLatin1String("$PH_")+ QString::number(phaseId);}
|
|
|
|
int getExerciseFolderId(int exerciseId) const override;
|
|
int getPhaseFolderId(int exerciseId, int phaseId) const override;
|
|
int getPartyFolderId(int exerciseId, int partyId) const override;
|
|
|
|
};
|
|
} //Interface
|
|
} // namespace FileManagement
|