##// END OF EJS Templates
Added basic cache tests for new VC...
Added basic cache tests for new VC Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r10:1c3b4c2c9c11
r11:d2d15e1be6f5
Show More
ProportionalCacheStrategy.h
24 lines | 849 B | text/x-c | CLexer
/ include / Variable / ProportionalCacheStrategy.h
First init from SciQLop Core module...
r0 #ifndef SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H
#define SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H
#include "Settings/SqpSettingsDefs.h"
#include "VariableCacheStrategy.h"
/// This class aims to hande the cache strategy.
Many fixes plus implemented var synchronization...
r9 class SCIQLOP_CORE_EXPORT ProportionalCacheStrategy : public VariableCacheStrategy {
First init from SciQLop Core module...
r0 public:
Many fixes plus implemented var synchronization...
r9 ProportionalCacheStrategy() = default;
First init from SciQLop Core module...
r0
Many fixes plus implemented var synchronization...
r9 DateTimeRange computeRange(const DateTimeRange &currentCacheRange,
First init from SciQLop Core module...
r0 const DateTimeRange &rangeRequested) override
{
Many fixes plus implemented var synchronization...
r9 Q_UNUSED(currentCacheRange);
First init from SciQLop Core module...
r0 auto toleranceFactor = SqpSettings::toleranceValue(
GENERAL_TOLERANCE_AT_UPDATE_KEY, GENERAL_TOLERANCE_AT_UPDATE_DEFAULT_VALUE);
Added basic usage of cache in VC, not tested yet...
r10 return rangeRequested*(1.+toleranceFactor);
First init from SciQLop Core module...
r0 }
};
#endif // SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H