##// END OF EJS Templates
Add impletation for displaying data that are already in cache when...
Add impletation for displaying data that are already in cache when acquisition is requested

File last commit:

r502:41183664294f
r539:575eda7156d0
Show More
VariableCacheStrategy.h
40 lines | 952 B | text/x-c | CLexer
/ core / include / Variable / VariableCacheStrategy.h
#ifndef SCIQLOP_VARIABLECACHESTRATEGY_H
#define SCIQLOP_VARIABLECACHESTRATEGY_H
#include "CoreGlobal.h"
#include <QLoggingCategory>
#include <QObject>
#include <Data/SqpRange.h>
#include <QLoggingCategory>
#include <Common/spimpl.h>
#include <utility>
Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheStrategy)
class Variable;
/**
* Possible types of zoom operation
*/
enum class CacheStrategy { FixedTolerance, TwoThreashold };
/// This class aims to hande the cache strategy.
class SCIQLOP_CORE_EXPORT VariableCacheStrategy : public QObject {
Q_OBJECT
public:
explicit VariableCacheStrategy(QObject *parent = 0);
std::pair<SqpRange, SqpRange> computeCacheRange(const SqpRange &vRange,
const SqpRange &rangeRequested);
private:
class VariableCacheStrategyPrivate;
spimpl::unique_impl_ptr<VariableCacheStrategyPrivate> impl;
};
#endif // SCIQLOP_VARIABLECACHESTRATEGY_H