Add an all-mvt_value attribute accumulation path

This commit is contained in:
Erica Fischer
2024-10-18 13:09:21 -07:00
parent 28efc40e6e
commit 0d281d3bd6
4 changed files with 143 additions and 29 deletions
+2
View File
@@ -4,6 +4,7 @@
#include <vector>
#include <unordered_map>
#include <map>
#include "mvt.hpp"
enum attribute_op {
op_sum,
@@ -26,6 +27,7 @@ struct serial_val;
void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribute_accum, std::string name, std::string type);
void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribute_accum, const char *arg, char **argv);
void preserve_attribute(attribute_op const &op, const std::string &key, serial_val const &val, std::vector<std::string> &full_keys, std::vector<serial_val> &full_values, std::unordered_map<std::string, accum_state> &attribute_accum_state);
void preserve_attribute(attribute_op const &op, std::string const &key, mvt_value const &val, std::vector<std::string> &full_keys, std::vector<mvt_value> &full_values, std::unordered_map<std::string, accum_state> &attribute_accum_state);
extern std::map<std::string, attribute_op> numeric_operations;