VariableCacheController.h
46 lines
| 1.3 KiB
| text/x-c
|
CLexer
r225 | #ifndef SCIQLOP_VARIABLECACHECONTROLLER_H | |||
#define SCIQLOP_VARIABLECACHECONTROLLER_H | ||||
Alexandre Leroux
|
r331 | #include <QLoggingCategory> | ||
r225 | #include <QObject> | |||
#include <Data/SqpDateTime.h> | ||||
r293 | #include <QLoggingCategory> | |||
r225 | #include <Common/spimpl.h> | |||
Alexandre Leroux
|
r331 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheController) | ||
r225 | class Variable; | |||
r293 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheController) | |||
r243 | /// This class aims to store in the cache all of the dateTime already requested to the variable. | |||
r225 | class VariableCacheController : public QObject { | |||
Q_OBJECT | ||||
public: | ||||
explicit VariableCacheController(QObject *parent = 0); | ||||
void addDateTime(std::shared_ptr<Variable> variable, const SqpDateTime &dateTime); | ||||
Alexandre Leroux
|
r331 | /// Clears cache concerning a variable | ||
void clear(std::shared_ptr<Variable> variable) noexcept; | ||||
r230 | /// 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; | ||||
r300 | void displayCache(std::shared_ptr<Variable> variable) const; | |||
r293 | ||||
r225 | private: | |||
class VariableCacheControllerPrivate; | ||||
spimpl::unique_impl_ptr<VariableCacheControllerPrivate> impl; | ||||
}; | ||||
#endif // SCIQLOP_VARIABLECACHECONTROLLER_H | ||||