61 lines
1.9 KiB
C++
Executable File
61 lines
1.9 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Data Plugin for InfrastructureManagement
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2016-08-24
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Plugins/InfrastructureManagement/ism_data_plugin_interface.h>
|
|
|
|
|
|
namespace InfrastructureManagement
|
|
{
|
|
|
|
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "data:3:ism")
|
|
Q_INTERFACES(DataPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
DataPlugin() = default;
|
|
~DataPlugin() = default;
|
|
|
|
QString pluginName() const override { return QStringLiteral("InfrastructureManagement.Data"); }
|
|
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSessionDataDds *session) override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override
|
|
{
|
|
return partition == IDL::PartitionType::Exercise ||
|
|
partition == IDL::PartitionType::Global ||
|
|
partition == IDL::PartitionType::Replay;
|
|
}
|
|
};
|
|
|
|
|
|
class DataInterfaceImpl final : public DataInterface
|
|
{
|
|
public:
|
|
DataInterfaceImpl(LtsSession::LtsSessionDataDds *session,
|
|
const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc,
|
|
const std::shared_ptr<InfrastructureManagement::Interface::Ftc> &ftc);
|
|
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> getDtc() override;// { return m_dtc; }
|
|
std::shared_ptr<InfrastructureManagement::Interface::Ftc> getFtc() override;// { return m_ftc; }
|
|
std::shared_ptr<ForeignDataInterface> getForeignDataInterface() override;// { return m_foreignInterface; }
|
|
|
|
private:
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<InfrastructureManagement::Interface::Ftc> m_ftc;
|
|
bool m_dtcEnabled { false };
|
|
bool m_ftcEnabled { false };
|
|
LtsSession::LtsSessionDataDds *m_session { nullptr };
|
|
std::shared_ptr<ForeignDataInterface> m_foreignInterface;
|
|
};
|
|
|
|
} // namespace InfrastructureManagement
|