6 #ifndef __VISUALIZE_IMAGE_HEATMAP_H__     7 #define __VISUALIZE_IMAGE_HEATMAP_H__    22     struct VisualizeImageHeatmapRequest
    30         VisualizeImageHeatmapRequest() :
    31             tableNames(std::vector<std::string>()),
    32             xColumnName(std::string()),
    33             yColumnName(std::string()),
    34             valueColumnName(std::string()),
    41             projection(std::string()),
    42             styleOptions(std::map<std::string, std::string>()),
    43             options(std::map<std::string, std::string>())
    80         VisualizeImageHeatmapRequest(
const std::vector<std::string>& tableNames, 
const std::string& xColumnName, 
const std::string& yColumnName, 
const std::string& valueColumnName, 
const double minX, 
const double maxX, 
const double minY, 
const double maxY, 
const int32_t width, 
const int32_t height, 
const std::string& projection, 
const std::map<std::string, std::string>& styleOptions, 
const std::map<std::string, std::string>& options):
    81             tableNames(tableNames),
    82             xColumnName(xColumnName),
    83             yColumnName(yColumnName),
    84             valueColumnName(valueColumnName),
    91             projection(projection),
    92             styleOptions(styleOptions),
   101         std::vector<std::string> tableNames;
   102         std::string xColumnName;
   103         std::string yColumnName;
   104         std::string valueColumnName;
   111         std::string projection;
   112         std::map<std::string, std::string> styleOptions;
   113         std::map<std::string, std::string> options;
   123     template<> 
struct codec_traits<
gpudb::VisualizeImageHeatmapRequest>
   125         static void encode(Encoder& e, 
const gpudb::VisualizeImageHeatmapRequest& v)
   127             ::avro::encode(e, v.tableNames);
   128             ::avro::encode(e, v.xColumnName);
   129             ::avro::encode(e, v.yColumnName);
   130             ::avro::encode(e, v.valueColumnName);
   131             ::avro::encode(e, v.minX);
   132             ::avro::encode(e, v.maxX);
   133             ::avro::encode(e, v.minY);
   134             ::avro::encode(e, v.maxY);
   135             ::avro::encode(e, v.width);
   136             ::avro::encode(e, v.height);
   137             ::avro::encode(e, v.projection);
   138             ::avro::encode(e, v.styleOptions);
   139             ::avro::encode(e, v.options);
   142         static void decode(Decoder& d, gpudb::VisualizeImageHeatmapRequest& v)
   144             if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
   146                 const std::vector<size_t> fo = rd->fieldOrder();
   148                 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
   153                             ::avro::decode(d, v.tableNames);
   157                             ::avro::decode(d, v.xColumnName);
   161                             ::avro::decode(d, v.yColumnName);
   165                             ::avro::decode(d, v.valueColumnName);
   169                             ::avro::decode(d, v.minX);
   173                             ::avro::decode(d, v.maxX);
   177                             ::avro::decode(d, v.minY);
   181                             ::avro::decode(d, v.maxY);
   185                             ::avro::decode(d, v.width);
   189                             ::avro::decode(d, v.height);
   193                             ::avro::decode(d, v.projection);
   197                             ::avro::decode(d, v.styleOptions);
   201                             ::avro::decode(d, v.options);
   211                 ::avro::decode(d, v.tableNames);
   212                 ::avro::decode(d, v.xColumnName);
   213                 ::avro::decode(d, v.yColumnName);
   214                 ::avro::decode(d, v.valueColumnName);
   215                 ::avro::decode(d, v.minX);
   216                 ::avro::decode(d, v.maxX);
   217                 ::avro::decode(d, v.minY);
   218                 ::avro::decode(d, v.maxY);
   219                 ::avro::decode(d, v.width);
   220                 ::avro::decode(d, v.height);
   221                 ::avro::decode(d, v.projection);
   222                 ::avro::decode(d, v.styleOptions);
   223                 ::avro::decode(d, v.options);
   242     struct VisualizeImageHeatmapResponse
   250         VisualizeImageHeatmapResponse() :
   254             imageData(std::vector<uint8_t>())
   265         std::vector<uint8_t> imageData;
   275     template<> 
struct codec_traits<
gpudb::VisualizeImageHeatmapResponse>
   277         static void encode(Encoder& e, 
const gpudb::VisualizeImageHeatmapResponse& v)
   279             ::avro::encode(e, v.width);
   280             ::avro::encode(e, v.height);
   281             ::avro::encode(e, v.bgColor);
   282             ::avro::encode(e, v.imageData);
   285         static void decode(Decoder& d, gpudb::VisualizeImageHeatmapResponse& v)
   287             if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
   289                 const std::vector<size_t> fo = rd->fieldOrder();
   291                 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
   296                             ::avro::decode(d, v.width);
   300                             ::avro::decode(d, v.height);
   304                             ::avro::decode(d, v.bgColor);
   308                             ::avro::decode(d, v.imageData);
   318                 ::avro::decode(d, v.width);
   319                 ::avro::decode(d, v.height);
   320                 ::avro::decode(d, v.bgColor);
   321                 ::avro::decode(d, v.imageData);