/** * DbReader for SituationReplay * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include "logger.h" class QSqlDatabase; class NSqlQuery; namespace LtsPluginManager { struct PluginInstance; } namespace SituationReplay { class DbReader final { public: explicit DbReader(const std::shared_ptr &ddsConnector, int exerciseId, bool bCanHandleSchemas); ~DbReader(); bool init(const QSqlDatabase &db); bool setReplayStartTime(qint64 startTime); bool readData(qint64 fromTime, qint64 toTime); void publish(qint64 desiredTime); void waitForAsyncOperations(qint64 desiredTime); void clearData(); private: bool loadPlugin(const LtsPluginManager::PluginInstance &pi); private: int m_exerciseId; NSqlQuery *m_query; std::shared_ptr m_ddsConnector; bool m_bCanHandleSchemas; std::vector m_plugins; LOGGER_T m_logger; }; } // namespace RecordingManagement