52 lines
1.5 KiB
C++
Executable File
52 lines
1.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* The DataManager class is a convenience class for managing structure data
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, SLST, 2017-12-05
|
|
*/
|
|
#pragma once
|
|
|
|
#include <LtsWebSocket/data_manager_base_dl.h>
|
|
#include <ParticipantManagement/ppm_db.h>
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include "logger.h"
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
class MainHandler;
|
|
|
|
namespace WebSocketInterface
|
|
{
|
|
|
|
/**
|
|
* @brief The DataManager class is a convenience class for managing structure data
|
|
*/
|
|
class DataManager final : public LtsWebSocket::DataManagerBaseDl<DatabaseInterface>
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* @brief DataManager Constructor
|
|
* @param mainHandler Source for needed handlers
|
|
*/
|
|
explicit DataManager(int exerciseId,
|
|
const std::shared_ptr<DatabaseInterface> &dbInterface,
|
|
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &dtc);
|
|
|
|
int exerciseId() const { return m_exerciseId; }
|
|
|
|
LtsWebSocket::ReplyMessage *equipmentTypeBaseData(const QString &uuid) const;
|
|
LtsWebSocket::ReplyMessage *typeBaseData(const QString &uuid) const;
|
|
LtsWebSocket::ReplyMessage *partyBaseData(const QString &uuid) const;
|
|
LtsWebSocket::ReplyMessage *participantBaseData(const QString &uuid) const;
|
|
LtsWebSocket::ReplyMessage *ocPositionData(int equipmentNr, const QString &uuid) const;
|
|
|
|
private:
|
|
int m_exerciseId;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
}; // class DataManager
|
|
} // namespace WebSocketInterface
|
|
} // namespace ParticipantManagement
|