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