51 std::unordered_map<std::string, PlotGroup::Ptr>
groups;
74 std::unordered_set<std::string>
getAllNames()
const;
80 bool erase(
const std::string& name);
83 template <
typename Value>
85 std::unordered_map<std::string, Value>&
data)
92 std::vector<std::string> temp_key;
93 temp_key.reserve(data.size());
94 std::vector<Value> temp_value;
95 temp_value.reserve(data.size());
100 key.reserve(prefix.size() + 2 + it.first.size());
101 key = (it.first.front() ==
'/') ? (prefix + it.first) : (prefix +
"/" + it.first);
103 temp_key.emplace_back(key);
104 temp_value.emplace_back(
std::move(it.second));
109 for (
size_t i = 0; i < temp_key.size(); i++)
111 const std::string& key = temp_key[i];
113 auto it = data.emplace(std::piecewise_construct, std::forward_as_tuple(key),
123 #endif // PJ_PLOTDATA_H
ScatterXYMap::iterator addScatterXY(const std::string &name, PlotGroup::Ptr group={})
PlotData & getOrCreateNumeric(const std::string &name, PlotGroup::Ptr group={})
PlotDataAny & getOrCreateUserDefined(const std::string &name, PlotGroup::Ptr group={})
std::unordered_map< std::string, PlotData > TimeseriesMap
The PlotDataMapRef is the main data structure used to store all the timeseries in a single place...
std::unordered_map< std::string, StringSeries > StringSeriesMap
std::shared_ptr< PlotGroup > Ptr
std::unordered_map< std::string, PlotDataXY > ScatterXYMap
std::unordered_set< std::string > getAllNames() const
bool erase(const std::string &name)
void setMaximumRangeX(double range)
TimeseriesMap numeric
Numerical timeseries.
StringSeries & getOrCreateStringSeries(const std::string &name, PlotGroup::Ptr group={})
PlotDataXY & getOrCreateScatterXY(const std::string &name, PlotGroup::Ptr group={})
StringSeriesMap strings
Series of strings.
TimeseriesMap::iterator addNumeric(const std::string &name, PlotGroup::Ptr group={})
AnySeriesMap::iterator addUserDefined(const std::string &name, PlotGroup::Ptr group={})
StringSeriesMap::iterator addStringSeries(const std::string &name, PlotGroup::Ptr group={})
const T & move(const T &v)
PlotGroup::Ptr getOrCreateGroup(const std::string &name)
std::unordered_map< std::string, PlotDataAny > AnySeriesMap
std::unordered_map< std::string, PlotGroup::Ptr > groups
Each series can have (optionally) a group. Groups can have their own properties.
void AddPrefixToPlotData(const std::string &prefix, std::unordered_map< std::string, Value > &data)
AnySeriesMap user_defined