VariableCacheController.h
40 lines
| 1.1 KiB
| text/x-c
|
CLexer
r209 | #ifndef SCIQLOP_VARIABLECACHECONTROLLER_H | |||
#define SCIQLOP_VARIABLECACHECONTROLLER_H | ||||
#include <QObject> | ||||
#include <Data/SqpDateTime.h> | ||||
r271 | #include <QLoggingCategory> | |||
r209 | #include <Common/spimpl.h> | |||
class Variable; | ||||
r271 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheController) | |||
r227 | /// This class aims to store in the cache all of the dateTime already requested to the variable. | |||
r209 | class VariableCacheController : public QObject { | |||
Q_OBJECT | ||||
public: | ||||
explicit VariableCacheController(QObject *parent = 0); | ||||
void addDateTime(std::shared_ptr<Variable> variable, const SqpDateTime &dateTime); | ||||
r214 | /// Return all of the SqpDataTime part of the dateTime whose are not in the cache | |||
QVector<SqpDateTime> provideNotInCacheDateTimeList(std::shared_ptr<Variable> variable, | ||||
const SqpDateTime &dateTime); | ||||
QVector<SqpDateTime> dateCacheList(std::shared_ptr<Variable> variable) const noexcept; | ||||
r271 | void displayCache(std::shared_ptr<Variable> variable); | |||
r209 | private: | |||
class VariableCacheControllerPrivate; | ||||
spimpl::unique_impl_ptr<VariableCacheControllerPrivate> impl; | ||||
}; | ||||
#endif // SCIQLOP_VARIABLECACHECONTROLLER_H | ||||