##// END OF EJS Templates
Removed bad dependency between VC and VariableModel, moved mime stuff...
Removed bad dependency between VC and VariableModel, moved mime stuff from VC to static Variable methods Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r12:4e36a737f884
r27:c08d1b8ad297
Show More
SingleThresholdCacheStrategy.h
22 lines | 712 B | text/x-c | CLexer
/ include / Variable / SingleThresholdCacheStrategy.h
#ifndef SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H
#define SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H
#include "Settings/SqpSettingsDefs.h"
#include "VariableCacheStrategy.h"
class SCIQLOP_CORE_EXPORT SingleThresholdCacheStrategy : public VariableCacheStrategy {
public:
SingleThresholdCacheStrategy() = default;
DateTimeRange computeRange(const DateTimeRange &currentCacheRange,
const DateTimeRange &rangeRequested) override
{
Q_UNUSED(currentCacheRange);
if(currentCacheRange.contains (rangeRequested*1.1))
return currentCacheRange;
return rangeRequested*2.;
}
};
#endif // SCIQLOP_SINGLETHRESHOLDCACHESTRATEGY_H