6 #ifndef __VISUALIZE_IMAGE_CONTOUR_H__     7 #define __VISUALIZE_IMAGE_CONTOUR_H__    18     struct VisualizeImageContourRequest
    26         VisualizeImageContourRequest() :
    27             tableNames(std::vector<std::string>()),
    28             xColumnName(std::string()),
    29             yColumnName(std::string()),
    30             valueColumnName(std::string()),
    37             projection(std::string()),
    38             styleOptions(std::map<std::string, std::string>()),
    39             options(std::map<std::string, std::string>())
   337         VisualizeImageContourRequest(
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_):
   338             tableNames( tableNames_ ),
   339             xColumnName( xColumnName_ ),
   340             yColumnName( yColumnName_ ),
   341             valueColumnName( valueColumnName_ ),
   348             projection( projection_ ),
   349             styleOptions( styleOptions_ ),
   354         std::vector<std::string> tableNames;
   355         std::string xColumnName;
   356         std::string yColumnName;
   357         std::string valueColumnName;
   364         std::string projection;
   365         std::map<std::string, std::string> styleOptions;
   366         std::map<std::string, std::string> options;
   376     template<> 
struct codec_traits<
gpudb::VisualizeImageContourRequest>
   378         static void encode(Encoder& e, 
const gpudb::VisualizeImageContourRequest& v)
   380             ::avro::encode(e, v.tableNames);
   381             ::avro::encode(e, v.xColumnName);
   382             ::avro::encode(e, v.yColumnName);
   383             ::avro::encode(e, v.valueColumnName);
   384             ::avro::encode(e, v.minX);
   385             ::avro::encode(e, v.maxX);
   386             ::avro::encode(e, v.minY);
   387             ::avro::encode(e, v.maxY);
   388             ::avro::encode(e, v.width);
   389             ::avro::encode(e, v.height);
   390             ::avro::encode(e, v.projection);
   391             ::avro::encode(e, v.styleOptions);
   392             ::avro::encode(e, v.options);
   395         static void decode(Decoder& d, gpudb::VisualizeImageContourRequest& v)
   397             if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
   399                 const std::vector<size_t> fo = rd->fieldOrder();
   401                 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
   406                             ::avro::decode(d, v.tableNames);
   410                             ::avro::decode(d, v.xColumnName);
   414                             ::avro::decode(d, v.yColumnName);
   418                             ::avro::decode(d, v.valueColumnName);
   422                             ::avro::decode(d, v.minX);
   426                             ::avro::decode(d, v.maxX);
   430                             ::avro::decode(d, v.minY);
   434                             ::avro::decode(d, v.maxY);
   438                             ::avro::decode(d, v.width);
   442                             ::avro::decode(d, v.height);
   446                             ::avro::decode(d, v.projection);
   450                             ::avro::decode(d, v.styleOptions);
   454                             ::avro::decode(d, v.options);
   464                 ::avro::decode(d, v.tableNames);
   465                 ::avro::decode(d, v.xColumnName);
   466                 ::avro::decode(d, v.yColumnName);
   467                 ::avro::decode(d, v.valueColumnName);
   468                 ::avro::decode(d, v.minX);
   469                 ::avro::decode(d, v.maxX);
   470                 ::avro::decode(d, v.minY);
   471                 ::avro::decode(d, v.maxY);
   472                 ::avro::decode(d, v.width);
   473                 ::avro::decode(d, v.height);
   474                 ::avro::decode(d, v.projection);
   475                 ::avro::decode(d, v.styleOptions);
   476                 ::avro::decode(d, v.options);
   491     struct VisualizeImageContourResponse
   499         VisualizeImageContourResponse() :
   503             imageData(std::vector<uint8_t>()),
   504             gridData(std::vector<uint8_t>()),
   509             samplesUsed(int64_t())
   516         std::vector<uint8_t> imageData;
   517         std::vector<uint8_t> gridData;
   532     template<> 
struct codec_traits<
gpudb::VisualizeImageContourResponse>
   534         static void encode(Encoder& e, 
const gpudb::VisualizeImageContourResponse& v)
   536             ::avro::encode(e, v.width);
   537             ::avro::encode(e, v.height);
   538             ::avro::encode(e, v.bgColor);
   539             ::avro::encode(e, v.imageData);
   540             ::avro::encode(e, v.gridData);
   541             ::avro::encode(e, v.fillN0);
   542             ::avro::encode(e, v.fillNn);
   543             ::avro::encode(e, v.minLevel);
   544             ::avro::encode(e, v.maxLevel);
   545             ::avro::encode(e, v.samplesUsed);
   548         static void decode(Decoder& d, gpudb::VisualizeImageContourResponse& v)
   550             if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
   552                 const std::vector<size_t> fo = rd->fieldOrder();
   554                 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
   559                             ::avro::decode(d, v.width);
   563                             ::avro::decode(d, v.height);
   567                             ::avro::decode(d, v.bgColor);
   571                             ::avro::decode(d, v.imageData);
   575                             ::avro::decode(d, v.gridData);
   579                             ::avro::decode(d, v.fillN0);
   583                             ::avro::decode(d, v.fillNn);
   587                             ::avro::decode(d, v.minLevel);
   591                             ::avro::decode(d, v.maxLevel);
   595                             ::avro::decode(d, v.samplesUsed);
   605                 ::avro::decode(d, v.width);
   606                 ::avro::decode(d, v.height);
   607                 ::avro::decode(d, v.bgColor);
   608                 ::avro::decode(d, v.imageData);
   609                 ::avro::decode(d, v.gridData);
   610                 ::avro::decode(d, v.fillN0);
   611                 ::avro::decode(d, v.fillNn);
   612                 ::avro::decode(d, v.minLevel);
   613                 ::avro::decode(d, v.maxLevel);
   614                 ::avro::decode(d, v.samplesUsed);