57 bool destination_updated =
false;
59 std::vector<QString> added_curves;
62 const std::string&
name = it.first;
63 if (it.second.size() > 0 && destination.
numeric.count(name) == 0)
65 added_curves.push_back(QString::fromStdString(name));
71 const std::string&
name = it.first;
72 auto& source_plot = it.second;
73 auto plot_with_same_name = destination.
numeric.find(name);
76 if (plot_with_same_name == destination.
numeric.end())
80 .emplace(std::piecewise_construct, std::forward_as_tuple(name), std::forward_as_tuple(name))
83 auto& destination_plot = plot_with_same_name->second;
84 for (
size_t i = 0; i < source_plot.size(); i++)
86 destination_plot.pushBack(source_plot.at(i));
87 destination_updated =
true;
94 const std::string&
name = it.first;
95 auto& source_plot = it.second;
96 auto plot_with_same_name = destination.
user_defined.find(name);
99 if (plot_with_same_name == destination.
user_defined.end())
101 plot_with_same_name =
103 .emplace(std::piecewise_construct, std::forward_as_tuple(name), std::forward_as_tuple(name))
106 auto& destination_plot = plot_with_same_name->second;
107 for (
size_t i = 0; i < source_plot.size(); i++)
109 destination_plot.pushBack(
std::move(source_plot.at(i)) );
110 destination_updated =
true;
114 return { added_curves, destination_updated };
std::unordered_map< std::string, PlotData > numeric
const T & move(const T &v)
std::pair< std::vector< QString >, bool > MoveData(PlotDataMapRef &source, PlotDataMapRef &destination)
std::unordered_map< std::string, PlotDataAny > user_defined