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