##// END OF EJS Templates
Variable slot is called when x range of its graph changed
Variable slot is called when x range of its graph changed

File last commit:

r225:9423975d81b3
r226:f1820cb4eabb
Show More
VariableCacheController.cpp
25 lines | 794 B | text/x-c | CppLexer
/ core / src / Variable / VariableCacheController.cpp
Create a variable notify the variable cache parameter
r225 #include "Variable/VariableCacheController.h"
#include "Variable/Variable.h"
#include <unordered_map>
struct VariableCacheController::VariableCacheControllerPrivate {
std::unordered_map<std::shared_ptr<Variable>, std::list<SqpDateTime> >
m_VariableToSqpDateTimeListMap;
};
VariableCacheController::VariableCacheController(QObject *parent)
: QObject(parent), impl{spimpl::make_unique_impl<VariableCacheControllerPrivate>()}
{
}
void VariableCacheController::addDateTime(std::shared_ptr<Variable> variable,
const SqpDateTime &dateTime)
{
if (variable) {
// TODO: squeeze the map to let it only some SqpDateTime without intersection
impl->m_VariableToSqpDateTimeListMap[variable].push_back(dateTime);
}
}