##// END OF EJS Templates
Added static plugin support...
Added static plugin support In case of fully static exe even plugins must be static to allow single file executable. Small fix, when using resources in app from library they must be initialized with Q_INIT_RESOURCE. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r771:fa4cc23d1d91
r1123:247dc18789c6
Show More
VariableSingleThresholdCacheStrategy.h
32 lines | 1.1 KiB | text/x-c | CLexer
/ core / include / Variable / VariableSingleThresholdCacheStrategy.h
Alexandre Leroux
Updates cache strategy
r771 #ifndef SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H
#define SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H
#include "Settings/SqpSettingsDefs.h"
#include "VariableCacheStrategy.h"
/// This class aims to hande the cache strategy.
class SCIQLOP_CORE_EXPORT VariableSingleThresholdCacheStrategy : public VariableCacheStrategy {
public:
VariableSingleThresholdCacheStrategy() = default;
std::pair<SqpRange, SqpRange> computeRange(const SqpRange &vRange,
const SqpRange &rangeRequested) override
{
auto varRanges = std::pair<SqpRange, SqpRange>{};
auto toleranceFactor = SqpSettings::toleranceValue(
GENERAL_TOLERANCE_AT_UPDATE_KEY, GENERAL_TOLERANCE_AT_UPDATE_DEFAULT_VALUE);
auto tolerance = toleranceFactor * (rangeRequested.m_TEnd - rangeRequested.m_TStart);
varRanges.first = rangeRequested;
varRanges.second
= SqpRange{rangeRequested.m_TStart - tolerance, rangeRequested.m_TEnd + tolerance};
return varRanges;
}
};
#endif // SCIQLOP_VARIABLESINGLETHRESHOLDCACHESTRATEGY_H