GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
visualize_image.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __VISUALIZE_IMAGE_H__
7 #define __VISUALIZE_IMAGE_H__
8 
9 namespace gpudb
10 {
11 
18  struct VisualizeImageRequest
19  {
20 
26  VisualizeImageRequest() :
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  minX(double()),
35  maxX(double()),
36  minY(double()),
37  maxY(double()),
38  width(int32_t()),
39  height(int32_t()),
40  projection(std::string()),
41  bgColor(int64_t()),
42  styleOptions(std::map<std::string, std::vector<std::string> >()),
43  options(std::map<std::string, std::string>())
44  {
45  }
46 
276  VisualizeImageRequest(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 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  symbolColumnName( symbolColumnName_ ),
282  geometryColumnName( geometryColumnName_ ),
283  trackIds( trackIds_ ),
284  minX( minX_ ),
285  maxX( maxX_ ),
286  minY( minY_ ),
287  maxY( maxY_ ),
288  width( width_ ),
289  height( height_ ),
290  projection( projection_ ),
291  bgColor( bgColor_ ),
292  styleOptions( styleOptions_ ),
293  options( options_ )
294  {
295  }
296 
297  std::vector<std::string> tableNames;
298  std::vector<std::string> worldTableNames;
299  std::string xColumnName;
300  std::string yColumnName;
301  std::string symbolColumnName;
302  std::string geometryColumnName;
303  std::vector<std::vector<std::string> > trackIds;
304  double minX;
305  double maxX;
306  double minY;
307  double maxY;
308  int32_t width;
309  int32_t height;
310  std::string projection;
311  int64_t bgColor;
312  std::map<std::string, std::vector<std::string> > styleOptions;
313  std::map<std::string, std::string> options;
314  };
315 }
316 
321 namespace avro
322 {
323  template<> struct codec_traits<gpudb::VisualizeImageRequest>
324  {
325  static void encode(Encoder& e, const gpudb::VisualizeImageRequest& v)
326  {
327  ::avro::encode(e, v.tableNames);
328  ::avro::encode(e, v.worldTableNames);
329  ::avro::encode(e, v.xColumnName);
330  ::avro::encode(e, v.yColumnName);
331  ::avro::encode(e, v.symbolColumnName);
332  ::avro::encode(e, v.geometryColumnName);
333  ::avro::encode(e, v.trackIds);
334  ::avro::encode(e, v.minX);
335  ::avro::encode(e, v.maxX);
336  ::avro::encode(e, v.minY);
337  ::avro::encode(e, v.maxY);
338  ::avro::encode(e, v.width);
339  ::avro::encode(e, v.height);
340  ::avro::encode(e, v.projection);
341  ::avro::encode(e, v.bgColor);
342  ::avro::encode(e, v.styleOptions);
343  ::avro::encode(e, v.options);
344  }
345 
346  static void decode(Decoder& d, gpudb::VisualizeImageRequest& v)
347  {
348  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
349  {
350  const std::vector<size_t> fo = rd->fieldOrder();
351 
352  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
353  {
354  switch (*it)
355  {
356  case 0:
357  ::avro::decode(d, v.tableNames);
358  break;
359 
360  case 1:
361  ::avro::decode(d, v.worldTableNames);
362  break;
363 
364  case 2:
365  ::avro::decode(d, v.xColumnName);
366  break;
367 
368  case 3:
369  ::avro::decode(d, v.yColumnName);
370  break;
371 
372  case 4:
373  ::avro::decode(d, v.symbolColumnName);
374  break;
375 
376  case 5:
377  ::avro::decode(d, v.geometryColumnName);
378  break;
379 
380  case 6:
381  ::avro::decode(d, v.trackIds);
382  break;
383 
384  case 7:
385  ::avro::decode(d, v.minX);
386  break;
387 
388  case 8:
389  ::avro::decode(d, v.maxX);
390  break;
391 
392  case 9:
393  ::avro::decode(d, v.minY);
394  break;
395 
396  case 10:
397  ::avro::decode(d, v.maxY);
398  break;
399 
400  case 11:
401  ::avro::decode(d, v.width);
402  break;
403 
404  case 12:
405  ::avro::decode(d, v.height);
406  break;
407 
408  case 13:
409  ::avro::decode(d, v.projection);
410  break;
411 
412  case 14:
413  ::avro::decode(d, v.bgColor);
414  break;
415 
416  case 15:
417  ::avro::decode(d, v.styleOptions);
418  break;
419 
420  case 16:
421  ::avro::decode(d, v.options);
422  break;
423 
424  default:
425  break;
426  }
427  }
428  }
429  else
430  {
431  ::avro::decode(d, v.tableNames);
432  ::avro::decode(d, v.worldTableNames);
433  ::avro::decode(d, v.xColumnName);
434  ::avro::decode(d, v.yColumnName);
435  ::avro::decode(d, v.symbolColumnName);
436  ::avro::decode(d, v.geometryColumnName);
437  ::avro::decode(d, v.trackIds);
438  ::avro::decode(d, v.minX);
439  ::avro::decode(d, v.maxX);
440  ::avro::decode(d, v.minY);
441  ::avro::decode(d, v.maxY);
442  ::avro::decode(d, v.width);
443  ::avro::decode(d, v.height);
444  ::avro::decode(d, v.projection);
445  ::avro::decode(d, v.bgColor);
446  ::avro::decode(d, v.styleOptions);
447  ::avro::decode(d, v.options);
448  }
449  }
450  };
451 }
452 
453 namespace gpudb
454 {
455 
462  struct VisualizeImageResponse
463  {
464 
470  VisualizeImageResponse() :
471  width(double()),
472  height(double()),
473  bgColor(int64_t()),
474  imageData(std::vector<uint8_t>()),
475  info(std::map<std::string, std::string>())
476  {
477  }
478 
479  double width;
480  double height;
481  int64_t bgColor;
482  std::vector<uint8_t> imageData;
483  std::map<std::string, std::string> info;
484  };
485 }
486 
491 namespace avro
492 {
493  template<> struct codec_traits<gpudb::VisualizeImageResponse>
494  {
495  static void encode(Encoder& e, const gpudb::VisualizeImageResponse& v)
496  {
497  ::avro::encode(e, v.width);
498  ::avro::encode(e, v.height);
499  ::avro::encode(e, v.bgColor);
500  ::avro::encode(e, v.imageData);
501  ::avro::encode(e, v.info);
502  }
503 
504  static void decode(Decoder& d, gpudb::VisualizeImageResponse& v)
505  {
506  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
507  {
508  const std::vector<size_t> fo = rd->fieldOrder();
509 
510  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
511  {
512  switch (*it)
513  {
514  case 0:
515  ::avro::decode(d, v.width);
516  break;
517 
518  case 1:
519  ::avro::decode(d, v.height);
520  break;
521 
522  case 2:
523  ::avro::decode(d, v.bgColor);
524  break;
525 
526  case 3:
527  ::avro::decode(d, v.imageData);
528  break;
529 
530  case 4:
531  ::avro::decode(d, v.info);
532  break;
533 
534  default:
535  break;
536  }
537  }
538  }
539  else
540  {
541  ::avro::decode(d, v.width);
542  ::avro::decode(d, v.height);
543  ::avro::decode(d, v.bgColor);
544  ::avro::decode(d, v.imageData);
545  ::avro::decode(d, v.info);
546  }
547  }
548  };
549 }
550 
551 #endif