GPUdb C++ API  Version 6.1.0.0
visualize_image_classbreak.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_CLASSBREAK_H__
7 #define __VISUALIZE_IMAGE_CLASSBREAK_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeImageClassbreakRequest
23  {
24 
30  VisualizeImageClassbreakRequest() :
31  tableNames(std::vector<std::string>()),
32  worldTableNames(std::vector<std::string>()),
33  xColumnName(std::string()),
34  yColumnName(std::string()),
35  geometryColumnName(std::string()),
36  trackIds(std::vector<std::vector<std::string> >()),
37  cbColumnName(std::string()),
38  cbVals(std::vector<std::string>()),
39  minX(double()),
40  maxX(double()),
41  minY(double()),
42  maxY(double()),
43  width(int32_t()),
44  height(int32_t()),
45  projection(std::string()),
46  bgColor(int64_t()),
47  styleOptions(std::map<std::string, std::vector<std::string> >()),
48  options(std::map<std::string, std::string>())
49  {
50  }
51 
247  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& cbColumnName_, const std::vector<std::string>& cbVals_, 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_):
248  tableNames( tableNames_ ),
249  worldTableNames( worldTableNames_ ),
250  xColumnName( xColumnName_ ),
251  yColumnName( yColumnName_ ),
252  geometryColumnName( geometryColumnName_ ),
253  trackIds( trackIds_ ),
254  cbColumnName( cbColumnName_ ),
255  cbVals( cbVals_ ),
256  minX( minX_ ),
257  maxX( maxX_ ),
258  minY( minY_ ),
259  maxY( maxY_ ),
260  width( width_ ),
261  height( height_ ),
262  projection( projection_ ),
263  bgColor( bgColor_ ),
264  styleOptions( styleOptions_ ),
265  options( options_ )
266  {
267  }
268 
273  std::vector<std::string> tableNames;
274  std::vector<std::string> worldTableNames;
275  std::string xColumnName;
276  std::string yColumnName;
277  std::string geometryColumnName;
278  std::vector<std::vector<std::string> > trackIds;
279  std::string cbColumnName;
280  std::vector<std::string> cbVals;
281  double minX;
282  double maxX;
283  double minY;
284  double maxY;
285  int32_t width;
286  int32_t height;
287  std::string projection;
288  int64_t bgColor;
289  std::map<std::string, std::vector<std::string> > styleOptions;
290  std::map<std::string, std::string> options;
291  };
292 }
293 
298 namespace avro
299 {
300  template<> struct codec_traits<gpudb::VisualizeImageClassbreakRequest>
301  {
302  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakRequest& v)
303  {
304  ::avro::encode(e, v.tableNames);
305  ::avro::encode(e, v.worldTableNames);
306  ::avro::encode(e, v.xColumnName);
307  ::avro::encode(e, v.yColumnName);
308  ::avro::encode(e, v.geometryColumnName);
309  ::avro::encode(e, v.trackIds);
310  ::avro::encode(e, v.cbColumnName);
311  ::avro::encode(e, v.cbVals);
312  ::avro::encode(e, v.minX);
313  ::avro::encode(e, v.maxX);
314  ::avro::encode(e, v.minY);
315  ::avro::encode(e, v.maxY);
316  ::avro::encode(e, v.width);
317  ::avro::encode(e, v.height);
318  ::avro::encode(e, v.projection);
319  ::avro::encode(e, v.bgColor);
320  ::avro::encode(e, v.styleOptions);
321  ::avro::encode(e, v.options);
322  }
323 
324  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
325  {
326  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
327  {
328  const std::vector<size_t> fo = rd->fieldOrder();
329 
330  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
331  {
332  switch (*it)
333  {
334  case 0:
335  ::avro::decode(d, v.tableNames);
336  break;
337 
338  case 1:
339  ::avro::decode(d, v.worldTableNames);
340  break;
341 
342  case 2:
343  ::avro::decode(d, v.xColumnName);
344  break;
345 
346  case 3:
347  ::avro::decode(d, v.yColumnName);
348  break;
349 
350  case 4:
351  ::avro::decode(d, v.geometryColumnName);
352  break;
353 
354  case 5:
355  ::avro::decode(d, v.trackIds);
356  break;
357 
358  case 6:
359  ::avro::decode(d, v.cbColumnName);
360  break;
361 
362  case 7:
363  ::avro::decode(d, v.cbVals);
364  break;
365 
366  case 8:
367  ::avro::decode(d, v.minX);
368  break;
369 
370  case 9:
371  ::avro::decode(d, v.maxX);
372  break;
373 
374  case 10:
375  ::avro::decode(d, v.minY);
376  break;
377 
378  case 11:
379  ::avro::decode(d, v.maxY);
380  break;
381 
382  case 12:
383  ::avro::decode(d, v.width);
384  break;
385 
386  case 13:
387  ::avro::decode(d, v.height);
388  break;
389 
390  case 14:
391  ::avro::decode(d, v.projection);
392  break;
393 
394  case 15:
395  ::avro::decode(d, v.bgColor);
396  break;
397 
398  case 16:
399  ::avro::decode(d, v.styleOptions);
400  break;
401 
402  case 17:
403  ::avro::decode(d, v.options);
404  break;
405 
406  default:
407  break;
408  }
409  }
410  }
411  else
412  {
413  ::avro::decode(d, v.tableNames);
414  ::avro::decode(d, v.worldTableNames);
415  ::avro::decode(d, v.xColumnName);
416  ::avro::decode(d, v.yColumnName);
417  ::avro::decode(d, v.geometryColumnName);
418  ::avro::decode(d, v.trackIds);
419  ::avro::decode(d, v.cbColumnName);
420  ::avro::decode(d, v.cbVals);
421  ::avro::decode(d, v.minX);
422  ::avro::decode(d, v.maxX);
423  ::avro::decode(d, v.minY);
424  ::avro::decode(d, v.maxY);
425  ::avro::decode(d, v.width);
426  ::avro::decode(d, v.height);
427  ::avro::decode(d, v.projection);
428  ::avro::decode(d, v.bgColor);
429  ::avro::decode(d, v.styleOptions);
430  ::avro::decode(d, v.options);
431  }
432  }
433  };
434 }
435 
440 namespace gpudb
441 {
442 
449  struct VisualizeImageClassbreakResponse
450  {
451 
457  VisualizeImageClassbreakResponse() :
458  width(double()),
459  height(double()),
460  bgColor(int64_t()),
461  imageData(std::vector<uint8_t>())
462  {
463  }
464 
469  double width;
470  double height;
471  int64_t bgColor;
472  std::vector<uint8_t> imageData;
473  };
474 }
475 
480 namespace avro
481 {
482  template<> struct codec_traits<gpudb::VisualizeImageClassbreakResponse>
483  {
484  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakResponse& v)
485  {
486  ::avro::encode(e, v.width);
487  ::avro::encode(e, v.height);
488  ::avro::encode(e, v.bgColor);
489  ::avro::encode(e, v.imageData);
490  }
491 
492  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
493  {
494  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
495  {
496  const std::vector<size_t> fo = rd->fieldOrder();
497 
498  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
499  {
500  switch (*it)
501  {
502  case 0:
503  ::avro::decode(d, v.width);
504  break;
505 
506  case 1:
507  ::avro::decode(d, v.height);
508  break;
509 
510  case 2:
511  ::avro::decode(d, v.bgColor);
512  break;
513 
514  case 3:
515  ::avro::decode(d, v.imageData);
516  break;
517 
518  default:
519  break;
520  }
521  }
522  }
523  else
524  {
525  ::avro::decode(d, v.width);
526  ::avro::decode(d, v.height);
527  ::avro::decode(d, v.bgColor);
528  ::avro::decode(d, v.imageData);
529  }
530  }
531  };
532 }
533 
534 #endif