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 cbPointalphaAttr(std::string()),
38 cbPointalphaVals(std::vector<std::string>()),
39 cbPointsizeAttr(std::string()),
40 cbPointsizeVals(std::vector<std::string>()),
41 cbPointshapeAttr(std::string()),
42 cbPointshapeVals(std::vector<std::string>()),
49 projection(std::string()),
51 styleOptions(std::map<std::string, std::vector<std::string> >()),
52 options(std::map<std::string, std::string>()),
53 cbTransparencyVec(std::vector<int32_t>())
285 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& 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_):
286 tableNames( tableNames_ ),
287 worldTableNames( worldTableNames_ ),
288 xColumnName( xColumnName_ ),
289 yColumnName( yColumnName_ ),
290 geometryColumnName( geometryColumnName_ ),
291 trackIds( trackIds_ ),
294 cbPointcolorAttr( cbPointcolorAttr_ ),
295 cbPointcolorVals( cbPointcolorVals_ ),
296 cbPointalphaAttr( cbPointalphaAttr_ ),
297 cbPointalphaVals( cbPointalphaVals_ ),
298 cbPointsizeAttr( cbPointsizeAttr_ ),
299 cbPointsizeVals( cbPointsizeVals_ ),
300 cbPointshapeAttr( cbPointshapeAttr_ ),
301 cbPointshapeVals( cbPointshapeVals_ ),
308 projection( projection_ ),
310 styleOptions( styleOptions_ ),
312 cbTransparencyVec( cbTransparencyVec_ )
316 std::vector<std::string> tableNames;
317 std::vector<std::string> worldTableNames;
318 std::string xColumnName;
319 std::string yColumnName;
320 std::string geometryColumnName;
321 std::vector<std::vector<std::string> > trackIds;
323 std::vector<std::string> cbVals;
324 std::string cbPointcolorAttr;
325 std::vector<std::string> cbPointcolorVals;
326 std::string cbPointalphaAttr;
327 std::vector<std::string> cbPointalphaVals;
328 std::string cbPointsizeAttr;
329 std::vector<std::string> cbPointsizeVals;
330 std::string cbPointshapeAttr;
331 std::vector<std::string> cbPointshapeVals;
338 std::string projection;
340 std::map<std::string, std::vector<std::string> > styleOptions;
341 std::map<std::string, std::string> options;
342 std::vector<int32_t> cbTransparencyVec;
352 template<>
struct codec_traits<gpudb::VisualizeImageClassbreakRequest>
354 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakRequest& v)
356 ::avro::encode(e, v.tableNames);
357 ::avro::encode(e, v.worldTableNames);
358 ::avro::encode(e, v.xColumnName);
359 ::avro::encode(e, v.yColumnName);
360 ::avro::encode(e, v.geometryColumnName);
361 ::avro::encode(e, v.trackIds);
362 ::avro::encode(e, v.cbAttr);
363 ::avro::encode(e, v.cbVals);
364 ::avro::encode(e, v.cbPointcolorAttr);
365 ::avro::encode(e, v.cbPointcolorVals);
366 ::avro::encode(e, v.cbPointalphaAttr);
367 ::avro::encode(e, v.cbPointalphaVals);
368 ::avro::encode(e, v.cbPointsizeAttr);
369 ::avro::encode(e, v.cbPointsizeVals);
370 ::avro::encode(e, v.cbPointshapeAttr);
371 ::avro::encode(e, v.cbPointshapeVals);
372 ::avro::encode(e, v.minX);
373 ::avro::encode(e, v.maxX);
374 ::avro::encode(e, v.minY);
375 ::avro::encode(e, v.maxY);
376 ::avro::encode(e, v.width);
377 ::avro::encode(e, v.height);
378 ::avro::encode(e, v.projection);
379 ::avro::encode(e, v.bgColor);
380 ::avro::encode(e, v.styleOptions);
381 ::avro::encode(e, v.options);
382 ::avro::encode(e, v.cbTransparencyVec);
385 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
387 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
389 const std::vector<size_t> fo = rd->fieldOrder();
391 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
396 ::avro::decode(d, v.tableNames);
400 ::avro::decode(d, v.worldTableNames);
404 ::avro::decode(d, v.xColumnName);
408 ::avro::decode(d, v.yColumnName);
412 ::avro::decode(d, v.geometryColumnName);
416 ::avro::decode(d, v.trackIds);
420 ::avro::decode(d, v.cbAttr);
424 ::avro::decode(d, v.cbVals);
428 ::avro::decode(d, v.cbPointcolorAttr);
432 ::avro::decode(d, v.cbPointcolorVals);
436 ::avro::decode(d, v.cbPointalphaAttr);
440 ::avro::decode(d, v.cbPointalphaVals);
444 ::avro::decode(d, v.cbPointsizeAttr);
448 ::avro::decode(d, v.cbPointsizeVals);
452 ::avro::decode(d, v.cbPointshapeAttr);
456 ::avro::decode(d, v.cbPointshapeVals);
460 ::avro::decode(d, v.minX);
464 ::avro::decode(d, v.maxX);
468 ::avro::decode(d, v.minY);
472 ::avro::decode(d, v.maxY);
476 ::avro::decode(d, v.width);
480 ::avro::decode(d, v.height);
484 ::avro::decode(d, v.projection);
488 ::avro::decode(d, v.bgColor);
492 ::avro::decode(d, v.styleOptions);
496 ::avro::decode(d, v.options);
500 ::avro::decode(d, v.cbTransparencyVec);
510 ::avro::decode(d, v.tableNames);
511 ::avro::decode(d, v.worldTableNames);
512 ::avro::decode(d, v.xColumnName);
513 ::avro::decode(d, v.yColumnName);
514 ::avro::decode(d, v.geometryColumnName);
515 ::avro::decode(d, v.trackIds);
516 ::avro::decode(d, v.cbAttr);
517 ::avro::decode(d, v.cbVals);
518 ::avro::decode(d, v.cbPointcolorAttr);
519 ::avro::decode(d, v.cbPointcolorVals);
520 ::avro::decode(d, v.cbPointalphaAttr);
521 ::avro::decode(d, v.cbPointalphaVals);
522 ::avro::decode(d, v.cbPointsizeAttr);
523 ::avro::decode(d, v.cbPointsizeVals);
524 ::avro::decode(d, v.cbPointshapeAttr);
525 ::avro::decode(d, v.cbPointshapeVals);
526 ::avro::decode(d, v.minX);
527 ::avro::decode(d, v.maxX);
528 ::avro::decode(d, v.minY);
529 ::avro::decode(d, v.maxY);
530 ::avro::decode(d, v.width);
531 ::avro::decode(d, v.height);
532 ::avro::decode(d, v.projection);
533 ::avro::decode(d, v.bgColor);
534 ::avro::decode(d, v.styleOptions);
535 ::avro::decode(d, v.options);
536 ::avro::decode(d, v.cbTransparencyVec);
551 struct VisualizeImageClassbreakResponse
559 VisualizeImageClassbreakResponse() :
563 imageData(std::vector<uint8_t>()),
564 info(std::map<std::string, std::string>())
571 std::vector<uint8_t> imageData;
572 std::map<std::string, std::string> info;
582 template<>
struct codec_traits<gpudb::VisualizeImageClassbreakResponse>
584 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakResponse& v)
586 ::avro::encode(e, v.width);
587 ::avro::encode(e, v.height);
588 ::avro::encode(e, v.bgColor);
589 ::avro::encode(e, v.imageData);
590 ::avro::encode(e, v.info);
593 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
595 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
597 const std::vector<size_t> fo = rd->fieldOrder();
599 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
604 ::avro::decode(d, v.width);
608 ::avro::decode(d, v.height);
612 ::avro::decode(d, v.bgColor);
616 ::avro::decode(d, v.imageData);
620 ::avro::decode(d, v.info);
630 ::avro::decode(d, v.width);
631 ::avro::decode(d, v.height);
632 ::avro::decode(d, v.bgColor);
633 ::avro::decode(d, v.imageData);
634 ::avro::decode(d, v.info);