#ifndef ATTRIBUTE_HPP #define ATTRIBUTE_HPP #include #include #include #include #include "mvt.hpp" #include "milo/dtoa_milo.h" enum attribute_op { op_sum, op_product, op_mean, op_concat, op_comma, op_max, op_min, op_count, }; struct accum_state { double sum = 0; double count = 0; }; struct serial_val; struct key_pool; void set_attribute_accum(std::unordered_map &attribute_accum, std::string name, std::string type); void set_attribute_accum(std::unordered_map &attribute_accum, const char *arg, char **argv); void preserve_attribute(attribute_op const &op, std::string const &key, serial_val const &val, std::vector> &full_keys, std::vector &full_values, std::unordered_map &attribute_accum_state, key_pool &key_pool); void preserve_attribute(attribute_op const &op, std::string const &key, mvt_value const &val, std::vector> &full_keys, std::vector &full_values, std::unordered_map &attribute_accum_state, key_pool &key_pool); extern std::map numeric_operations; #endif