6 #ifndef __VISUALIZE_IMAGE_CLASSBREAK_H__ 7 #define __VISUALIZE_IMAGE_CLASSBREAK_H__ 18 struct VisualizeImageClassbreakRequest
26 VisualizeImageClassbreakRequest() :
27 tableNames(std::vector<std::string>()),
28 worldTableNames(std::vector<std::string>()),
29 xColumnName(std::string()),
30 yColumnName(std::string()),
31 geometryColumnName(std::string()),
32 trackIds(std::vector<std::vector<std::string> >()),
33 cbAttr(std::string()),
34 cbVals(std::vector<std::string>()),
35 cbPointcolorAttr(std::string()),
36 cbPointcolorVals(std::vector<std::string>()),
37 cbPointsizeAttr(std::string()),
38 cbPointsizeVals(std::vector<std::string>()),
39 cbPointshapeAttr(std::string()),
40 cbPointshapeVals(std::vector<std::string>()),
47 projection(std::string()),
49 styleOptions(std::map<std::string, std::vector<std::string> >()),
50 options(std::map<std::string, std::string>())
276 VisualizeImageClassbreakRequest(
const std::vector<std::string>& tableNames_,
const std::vector<std::string>& worldTableNames_,
const std::string& xColumnName_,
const std::string& yColumnName_,
const std::string& geometryColumnName_,
const std::vector<std::vector<std::string> >& trackIds_,
const std::string& cbAttr_,
const std::vector<std::string>& cbVals_,
const std::string& cbPointcolorAttr_,
const std::vector<std::string>& cbPointcolorVals_,
const std::string& cbPointsizeAttr_,
const std::vector<std::string>& cbPointsizeVals_,
const std::string& cbPointshapeAttr_,
const std::vector<std::string>& cbPointshapeVals_,
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 int64_t bgColor_,
const std::map<std::string, std::vector<std::string> >& styleOptions_,
const std::map<std::string, std::string>& options_):
277 tableNames( tableNames_ ),
278 worldTableNames( worldTableNames_ ),
279 xColumnName( xColumnName_ ),
280 yColumnName( yColumnName_ ),
281 geometryColumnName( geometryColumnName_ ),
282 trackIds( trackIds_ ),
285 cbPointcolorAttr( cbPointcolorAttr_ ),
286 cbPointcolorVals( cbPointcolorVals_ ),
287 cbPointsizeAttr( cbPointsizeAttr_ ),
288 cbPointsizeVals( cbPointsizeVals_ ),
289 cbPointshapeAttr( cbPointshapeAttr_ ),
290 cbPointshapeVals( cbPointshapeVals_ ),
297 projection( projection_ ),
299 styleOptions( styleOptions_ ),
304 std::vector<std::string> tableNames;
305 std::vector<std::string> worldTableNames;
306 std::string xColumnName;
307 std::string yColumnName;
308 std::string geometryColumnName;
309 std::vector<std::vector<std::string> > trackIds;
311 std::vector<std::string> cbVals;
312 std::string cbPointcolorAttr;
313 std::vector<std::string> cbPointcolorVals;
314 std::string cbPointsizeAttr;
315 std::vector<std::string> cbPointsizeVals;
316 std::string cbPointshapeAttr;
317 std::vector<std::string> cbPointshapeVals;
324 std::string projection;
326 std::map<std::string, std::vector<std::string> > styleOptions;
327 std::map<std::string, std::string> options;
337 template<>
struct codec_traits<
gpudb::VisualizeImageClassbreakRequest>
339 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakRequest& v)
341 ::avro::encode(e, v.tableNames);
342 ::avro::encode(e, v.worldTableNames);
343 ::avro::encode(e, v.xColumnName);
344 ::avro::encode(e, v.yColumnName);
345 ::avro::encode(e, v.geometryColumnName);
346 ::avro::encode(e, v.trackIds);
347 ::avro::encode(e, v.cbAttr);
348 ::avro::encode(e, v.cbVals);
349 ::avro::encode(e, v.cbPointcolorAttr);
350 ::avro::encode(e, v.cbPointcolorVals);
351 ::avro::encode(e, v.cbPointsizeAttr);
352 ::avro::encode(e, v.cbPointsizeVals);
353 ::avro::encode(e, v.cbPointshapeAttr);
354 ::avro::encode(e, v.cbPointshapeVals);
355 ::avro::encode(e, v.minX);
356 ::avro::encode(e, v.maxX);
357 ::avro::encode(e, v.minY);
358 ::avro::encode(e, v.maxY);
359 ::avro::encode(e, v.width);
360 ::avro::encode(e, v.height);
361 ::avro::encode(e, v.projection);
362 ::avro::encode(e, v.bgColor);
363 ::avro::encode(e, v.styleOptions);
364 ::avro::encode(e, v.options);
367 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
369 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
371 const std::vector<size_t> fo = rd->fieldOrder();
373 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
378 ::avro::decode(d, v.tableNames);
382 ::avro::decode(d, v.worldTableNames);
386 ::avro::decode(d, v.xColumnName);
390 ::avro::decode(d, v.yColumnName);
394 ::avro::decode(d, v.geometryColumnName);
398 ::avro::decode(d, v.trackIds);
402 ::avro::decode(d, v.cbAttr);
406 ::avro::decode(d, v.cbVals);
410 ::avro::decode(d, v.cbPointcolorAttr);
414 ::avro::decode(d, v.cbPointcolorVals);
418 ::avro::decode(d, v.cbPointsizeAttr);
422 ::avro::decode(d, v.cbPointsizeVals);
426 ::avro::decode(d, v.cbPointshapeAttr);
430 ::avro::decode(d, v.cbPointshapeVals);
434 ::avro::decode(d, v.minX);
438 ::avro::decode(d, v.maxX);
442 ::avro::decode(d, v.minY);
446 ::avro::decode(d, v.maxY);
450 ::avro::decode(d, v.width);
454 ::avro::decode(d, v.height);
458 ::avro::decode(d, v.projection);
462 ::avro::decode(d, v.bgColor);
466 ::avro::decode(d, v.styleOptions);
470 ::avro::decode(d, v.options);
480 ::avro::decode(d, v.tableNames);
481 ::avro::decode(d, v.worldTableNames);
482 ::avro::decode(d, v.xColumnName);
483 ::avro::decode(d, v.yColumnName);
484 ::avro::decode(d, v.geometryColumnName);
485 ::avro::decode(d, v.trackIds);
486 ::avro::decode(d, v.cbAttr);
487 ::avro::decode(d, v.cbVals);
488 ::avro::decode(d, v.cbPointcolorAttr);
489 ::avro::decode(d, v.cbPointcolorVals);
490 ::avro::decode(d, v.cbPointsizeAttr);
491 ::avro::decode(d, v.cbPointsizeVals);
492 ::avro::decode(d, v.cbPointshapeAttr);
493 ::avro::decode(d, v.cbPointshapeVals);
494 ::avro::decode(d, v.minX);
495 ::avro::decode(d, v.maxX);
496 ::avro::decode(d, v.minY);
497 ::avro::decode(d, v.maxY);
498 ::avro::decode(d, v.width);
499 ::avro::decode(d, v.height);
500 ::avro::decode(d, v.projection);
501 ::avro::decode(d, v.bgColor);
502 ::avro::decode(d, v.styleOptions);
503 ::avro::decode(d, v.options);
518 struct VisualizeImageClassbreakResponse
526 VisualizeImageClassbreakResponse() :
530 imageData(std::vector<uint8_t>())
537 std::vector<uint8_t> imageData;
547 template<>
struct codec_traits<
gpudb::VisualizeImageClassbreakResponse>
549 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakResponse& v)
551 ::avro::encode(e, v.width);
552 ::avro::encode(e, v.height);
553 ::avro::encode(e, v.bgColor);
554 ::avro::encode(e, v.imageData);
557 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
559 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
561 const std::vector<size_t> fo = rd->fieldOrder();
563 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
568 ::avro::decode(d, v.width);
572 ::avro::decode(d, v.height);
576 ::avro::decode(d, v.bgColor);
580 ::avro::decode(d, v.imageData);
590 ::avro::decode(d, v.width);
591 ::avro::decode(d, v.height);
592 ::avro::decode(d, v.bgColor);
593 ::avro::decode(d, v.imageData);