Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+60
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Handler for all situation replay objects
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Hanna E. Rathje, SLSE, 2016-01-13
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
#include <SituationReplay/srp_fts.h>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
namespace SituationReplay
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
struct SrpSituationReplay;
|
||||
}
|
||||
class DatabaseInterface;
|
||||
class DbReader;
|
||||
class DdsHandler;
|
||||
class ObjectSituationReplay;
|
||||
class HandlerSituationReplay final : public QObject
|
||||
, protected Interface::Fts::ChangeReplayStateRequestHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HandlerSituationReplay(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DatabaseInterface> &db,
|
||||
const std::shared_ptr<DbReader> &dbReader);
|
||||
~HandlerSituationReplay();
|
||||
|
||||
bool init(int exerciseId, int partitionId);
|
||||
|
||||
private:
|
||||
bool createObject(const Database::SrpSituationReplay &newData);
|
||||
Core::FunctionReplyObject startReplayRequest(const ChangeReplayStateRequest &request);
|
||||
Core::FunctionReplyObject stopReplayRequest(const ChangeReplayStateRequest &request);
|
||||
Core::FunctionReplyObject changeReplayStateRequest(const ChangeReplayStateRequest &request);
|
||||
|
||||
void onChangeReplayStateRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ChangeReplayStateRequest &request) override;
|
||||
|
||||
private:
|
||||
ObjectSituationReplay *m_objSrp; // only one (!) replay per partition possible
|
||||
const std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
const std::shared_ptr<DatabaseInterface> m_db;
|
||||
const std::shared_ptr<DbReader> m_dbReader;
|
||||
|
||||
int m_exerciseId;
|
||||
int m_partitionId;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user