43 std::vector<ElementInfoStatistic> stats_;
47 explicit ProvidesStats(T* UNUSED(t)) :
48 stats_(InfoStats<T>::get())
52 const std::vector<ElementInfoStatistic>& getValidStats()
const {
return stats_; }
54 void toString(std::ostream& os)
const;
56 template <
class XMLNode>
57 void outputXML(XMLNode* node)
const
61 for (
const auto& stat : stats_ ) {
63 auto* XMLStatElement =
new XMLNode(
"Statistic");
64 XMLStatElement->SetAttribute(
"Index", idx);
65 XMLStatElement->SetAttribute(
"Name", stat.name);
66 XMLStatElement->SetAttribute(
"Description", stat.description ? stat.description :
"none");
67 XMLStatElement->SetAttribute(
"Units", stat.units ? stat.units :
"none");
68 XMLStatElement->SetAttribute(
"EnableLevel", stat.enable_level);
69 node->LinkEndChild(XMLStatElement);