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 symbolColumnName(std::string()),
32 geometryColumnName(std::string()),
33 trackIds(std::vector<std::vector<std::string> >()),
34 cbAttr(std::string()),
35 cbVals(std::vector<std::string>()),
36 cbPointcolorAttr(std::string()),
37 cbPointcolorVals(std::vector<std::string>()),
38 cbPointalphaAttr(std::string()),
39 cbPointalphaVals(std::vector<std::string>()),
40 cbPointsizeAttr(std::string()),
41 cbPointsizeVals(std::vector<std::string>()),
42 cbPointshapeAttr(std::string()),
43 cbPointshapeVals(std::vector<std::string>()),
50 projection(std::string()),
52 styleOptions(std::map<std::string, std::vector<std::string> >()),
53 options(std::map<std::string, std::string>()),
54 cbTransparencyVec(std::vector<int32_t>())
310 VisualizeImageClassbreakRequest(
const std::vector<std::string>& tableNames_,
const std::vector<std::string>& worldTableNames_,
const std::string& xColumnName_,
const std::string& yColumnName_,
const std::string& symbolColumnName_,
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& cbPointalphaAttr_,
const std::vector<std::string>& cbPointalphaVals_,
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_,
const std::vector<int32_t>& cbTransparencyVec_):
311 tableNames( tableNames_ ),
312 worldTableNames( worldTableNames_ ),
313 xColumnName( xColumnName_ ),
314 yColumnName( yColumnName_ ),
315 symbolColumnName( symbolColumnName_ ),
316 geometryColumnName( geometryColumnName_ ),
317 trackIds( trackIds_ ),
320 cbPointcolorAttr( cbPointcolorAttr_ ),
321 cbPointcolorVals( cbPointcolorVals_ ),
322 cbPointalphaAttr( cbPointalphaAttr_ ),
323 cbPointalphaVals( cbPointalphaVals_ ),
324 cbPointsizeAttr( cbPointsizeAttr_ ),
325 cbPointsizeVals( cbPointsizeVals_ ),
326 cbPointshapeAttr( cbPointshapeAttr_ ),
327 cbPointshapeVals( cbPointshapeVals_ ),
334 projection( projection_ ),
336 styleOptions( styleOptions_ ),
338 cbTransparencyVec( cbTransparencyVec_ )
342 std::vector<std::string> tableNames;
343 std::vector<std::string> worldTableNames;
344 std::string xColumnName;
345 std::string yColumnName;
346 std::string symbolColumnName;
347 std::string geometryColumnName;
348 std::vector<std::vector<std::string> > trackIds;
350 std::vector<std::string> cbVals;
351 std::string cbPointcolorAttr;
352 std::vector<std::string> cbPointcolorVals;
353 std::string cbPointalphaAttr;
354 std::vector<std::string> cbPointalphaVals;
355 std::string cbPointsizeAttr;
356 std::vector<std::string> cbPointsizeVals;
357 std::string cbPointshapeAttr;
358 std::vector<std::string> cbPointshapeVals;
365 std::string projection;
367 std::map<std::string, std::vector<std::string> > styleOptions;
368 std::map<std::string, std::string> options;
369 std::vector<int32_t> cbTransparencyVec;
379 template<>
struct codec_traits<gpudb::VisualizeImageClassbreakRequest>
381 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakRequest& v)
383 ::avro::encode(e, v.tableNames);
384 ::avro::encode(e, v.worldTableNames);
385 ::avro::encode(e, v.xColumnName);
386 ::avro::encode(e, v.yColumnName);
387 ::avro::encode(e, v.symbolColumnName);
388 ::avro::encode(e, v.geometryColumnName);
389 ::avro::encode(e, v.trackIds);
390 ::avro::encode(e, v.cbAttr);
391 ::avro::encode(e, v.cbVals);
392 ::avro::encode(e, v.cbPointcolorAttr);
393 ::avro::encode(e, v.cbPointcolorVals);
394 ::avro::encode(e, v.cbPointalphaAttr);
395 ::avro::encode(e, v.cbPointalphaVals);
396 ::avro::encode(e, v.cbPointsizeAttr);
397 ::avro::encode(e, v.cbPointsizeVals);
398 ::avro::encode(e, v.cbPointshapeAttr);
399 ::avro::encode(e, v.cbPointshapeVals);
400 ::avro::encode(e, v.minX);
401 ::avro::encode(e, v.maxX);
402 ::avro::encode(e, v.minY);
403 ::avro::encode(e, v.maxY);
404 ::avro::encode(e, v.width);
405 ::avro::encode(e, v.height);
406 ::avro::encode(e, v.projection);
407 ::avro::encode(e, v.bgColor);
408 ::avro::encode(e, v.styleOptions);
409 ::avro::encode(e, v.options);
410 ::avro::encode(e, v.cbTransparencyVec);
413 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
415 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
417 const std::vector<size_t> fo = rd->fieldOrder();
419 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
424 ::avro::decode(d, v.tableNames);
428 ::avro::decode(d, v.worldTableNames);
432 ::avro::decode(d, v.xColumnName);
436 ::avro::decode(d, v.yColumnName);
440 ::avro::decode(d, v.symbolColumnName);
444 ::avro::decode(d, v.geometryColumnName);
448 ::avro::decode(d, v.trackIds);
452 ::avro::decode(d, v.cbAttr);
456 ::avro::decode(d, v.cbVals);
460 ::avro::decode(d, v.cbPointcolorAttr);
464 ::avro::decode(d, v.cbPointcolorVals);
468 ::avro::decode(d, v.cbPointalphaAttr);
472 ::avro::decode(d, v.cbPointalphaVals);
476 ::avro::decode(d, v.cbPointsizeAttr);
480 ::avro::decode(d, v.cbPointsizeVals);
484 ::avro::decode(d, v.cbPointshapeAttr);
488 ::avro::decode(d, v.cbPointshapeVals);
492 ::avro::decode(d, v.minX);
496 ::avro::decode(d, v.maxX);
500 ::avro::decode(d, v.minY);
504 ::avro::decode(d, v.maxY);
508 ::avro::decode(d, v.width);
512 ::avro::decode(d, v.height);
516 ::avro::decode(d, v.projection);
520 ::avro::decode(d, v.bgColor);
524 ::avro::decode(d, v.styleOptions);
528 ::avro::decode(d, v.options);
532 ::avro::decode(d, v.cbTransparencyVec);
542 ::avro::decode(d, v.tableNames);
543 ::avro::decode(d, v.worldTableNames);
544 ::avro::decode(d, v.xColumnName);
545 ::avro::decode(d, v.yColumnName);
546 ::avro::decode(d, v.symbolColumnName);
547 ::avro::decode(d, v.geometryColumnName);
548 ::avro::decode(d, v.trackIds);
549 ::avro::decode(d, v.cbAttr);
550 ::avro::decode(d, v.cbVals);
551 ::avro::decode(d, v.cbPointcolorAttr);
552 ::avro::decode(d, v.cbPointcolorVals);
553 ::avro::decode(d, v.cbPointalphaAttr);
554 ::avro::decode(d, v.cbPointalphaVals);
555 ::avro::decode(d, v.cbPointsizeAttr);
556 ::avro::decode(d, v.cbPointsizeVals);
557 ::avro::decode(d, v.cbPointshapeAttr);
558 ::avro::decode(d, v.cbPointshapeVals);
559 ::avro::decode(d, v.minX);
560 ::avro::decode(d, v.maxX);
561 ::avro::decode(d, v.minY);
562 ::avro::decode(d, v.maxY);
563 ::avro::decode(d, v.width);
564 ::avro::decode(d, v.height);
565 ::avro::decode(d, v.projection);
566 ::avro::decode(d, v.bgColor);
567 ::avro::decode(d, v.styleOptions);
568 ::avro::decode(d, v.options);
569 ::avro::decode(d, v.cbTransparencyVec);
584 struct VisualizeImageClassbreakResponse
592 VisualizeImageClassbreakResponse() :
596 imageData(std::vector<uint8_t>()),
597 info(std::map<std::string, std::string>())
604 std::vector<uint8_t> imageData;
605 std::map<std::string, std::string> info;
615 template<>
struct codec_traits<gpudb::VisualizeImageClassbreakResponse>
617 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakResponse& v)
619 ::avro::encode(e, v.width);
620 ::avro::encode(e, v.height);
621 ::avro::encode(e, v.bgColor);
622 ::avro::encode(e, v.imageData);
623 ::avro::encode(e, v.info);
626 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
628 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
630 const std::vector<size_t> fo = rd->fieldOrder();
632 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
637 ::avro::decode(d, v.width);
641 ::avro::decode(d, v.height);
645 ::avro::decode(d, v.bgColor);
649 ::avro::decode(d, v.imageData);
653 ::avro::decode(d, v.info);
663 ::avro::decode(d, v.width);
664 ::avro::decode(d, v.height);
665 ::avro::decode(d, v.bgColor);
666 ::avro::decode(d, v.imageData);
667 ::avro::decode(d, v.info);