GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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  trackIds(std::vector<std::vector<std::string> >()),
36  cbColumnName1(std::string()),
37  cbVals1(std::vector<std::string>()),
38  cbColumnName2(std::vector<std::string>()),
39  cbVals2(std::vector<std::vector<std::string> >()),
40  minX(double()),
41  maxX(double()),
42  minY(double()),
43  maxY(double()),
44  width(int32_t()),
45  height(int32_t()),
46  projection(std::string()),
47  bgColor(int64_t()),
48  styleOptions(std::map<std::string, std::vector<std::string> >()),
49  options(std::map<std::string, std::string>())
50  {
51  }
52 
215  VisualizeImageClassbreakRequest(const std::vector<std::string>& tableNames_, const std::vector<std::string>& worldTableNames_, const std::string& xColumnName_, const std::string& yColumnName_, const std::vector<std::vector<std::string> >& trackIds_, const std::string& cbColumnName1_, const std::vector<std::string>& cbVals1_, const std::vector<std::string>& cbColumnName2_, const std::vector<std::vector<std::string> >& cbVals2_, 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_):
216  tableNames( tableNames_ ),
217  worldTableNames( worldTableNames_ ),
218  xColumnName( xColumnName_ ),
219  yColumnName( yColumnName_ ),
220  trackIds( trackIds_ ),
221  cbColumnName1( cbColumnName1_ ),
222  cbVals1( cbVals1_ ),
223  cbColumnName2( cbColumnName2_ ),
224  cbVals2( cbVals2_ ),
225  minX( minX_ ),
226  maxX( maxX_ ),
227  minY( minY_ ),
228  maxY( maxY_ ),
229  width( width_ ),
230  height( height_ ),
231  projection( projection_ ),
232  bgColor( bgColor_ ),
233  styleOptions( styleOptions_ ),
234  options( options_ )
235  {
236  }
237 
242  std::vector<std::string> tableNames;
243  std::vector<std::string> worldTableNames;
244  std::string xColumnName;
245  std::string yColumnName;
246  std::vector<std::vector<std::string> > trackIds;
247  std::string cbColumnName1;
248  std::vector<std::string> cbVals1;
249  std::vector<std::string> cbColumnName2;
250  std::vector<std::vector<std::string> > cbVals2;
251  double minX;
252  double maxX;
253  double minY;
254  double maxY;
255  int32_t width;
256  int32_t height;
257  std::string projection;
258  int64_t bgColor;
259  std::map<std::string, std::vector<std::string> > styleOptions;
260  std::map<std::string, std::string> options;
261  };
262 }
263 
268 namespace avro
269 {
270  template<> struct codec_traits<gpudb::VisualizeImageClassbreakRequest>
271  {
272  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakRequest& v)
273  {
274  ::avro::encode(e, v.tableNames);
275  ::avro::encode(e, v.worldTableNames);
276  ::avro::encode(e, v.xColumnName);
277  ::avro::encode(e, v.yColumnName);
278  ::avro::encode(e, v.trackIds);
279  ::avro::encode(e, v.cbColumnName1);
280  ::avro::encode(e, v.cbVals1);
281  ::avro::encode(e, v.cbColumnName2);
282  ::avro::encode(e, v.cbVals2);
283  ::avro::encode(e, v.minX);
284  ::avro::encode(e, v.maxX);
285  ::avro::encode(e, v.minY);
286  ::avro::encode(e, v.maxY);
287  ::avro::encode(e, v.width);
288  ::avro::encode(e, v.height);
289  ::avro::encode(e, v.projection);
290  ::avro::encode(e, v.bgColor);
291  ::avro::encode(e, v.styleOptions);
292  ::avro::encode(e, v.options);
293  }
294 
295  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
296  {
297  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
298  {
299  const std::vector<size_t> fo = rd->fieldOrder();
300 
301  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
302  {
303  switch (*it)
304  {
305  case 0:
306  ::avro::decode(d, v.tableNames);
307  break;
308 
309  case 1:
310  ::avro::decode(d, v.worldTableNames);
311  break;
312 
313  case 2:
314  ::avro::decode(d, v.xColumnName);
315  break;
316 
317  case 3:
318  ::avro::decode(d, v.yColumnName);
319  break;
320 
321  case 4:
322  ::avro::decode(d, v.trackIds);
323  break;
324 
325  case 5:
326  ::avro::decode(d, v.cbColumnName1);
327  break;
328 
329  case 6:
330  ::avro::decode(d, v.cbVals1);
331  break;
332 
333  case 7:
334  ::avro::decode(d, v.cbColumnName2);
335  break;
336 
337  case 8:
338  ::avro::decode(d, v.cbVals2);
339  break;
340 
341  case 9:
342  ::avro::decode(d, v.minX);
343  break;
344 
345  case 10:
346  ::avro::decode(d, v.maxX);
347  break;
348 
349  case 11:
350  ::avro::decode(d, v.minY);
351  break;
352 
353  case 12:
354  ::avro::decode(d, v.maxY);
355  break;
356 
357  case 13:
358  ::avro::decode(d, v.width);
359  break;
360 
361  case 14:
362  ::avro::decode(d, v.height);
363  break;
364 
365  case 15:
366  ::avro::decode(d, v.projection);
367  break;
368 
369  case 16:
370  ::avro::decode(d, v.bgColor);
371  break;
372 
373  case 17:
374  ::avro::decode(d, v.styleOptions);
375  break;
376 
377  case 18:
378  ::avro::decode(d, v.options);
379  break;
380 
381  default:
382  break;
383  }
384  }
385  }
386  else
387  {
388  ::avro::decode(d, v.tableNames);
389  ::avro::decode(d, v.worldTableNames);
390  ::avro::decode(d, v.xColumnName);
391  ::avro::decode(d, v.yColumnName);
392  ::avro::decode(d, v.trackIds);
393  ::avro::decode(d, v.cbColumnName1);
394  ::avro::decode(d, v.cbVals1);
395  ::avro::decode(d, v.cbColumnName2);
396  ::avro::decode(d, v.cbVals2);
397  ::avro::decode(d, v.minX);
398  ::avro::decode(d, v.maxX);
399  ::avro::decode(d, v.minY);
400  ::avro::decode(d, v.maxY);
401  ::avro::decode(d, v.width);
402  ::avro::decode(d, v.height);
403  ::avro::decode(d, v.projection);
404  ::avro::decode(d, v.bgColor);
405  ::avro::decode(d, v.styleOptions);
406  ::avro::decode(d, v.options);
407  }
408  }
409  };
410 }
411 
416 namespace gpudb
417 {
418 
425  struct VisualizeImageClassbreakResponse
426  {
427 
433  VisualizeImageClassbreakResponse() :
434  width(double()),
435  height(double()),
436  bgColor(int64_t()),
437  imageData(std::vector<uint8_t>())
438  {
439  }
440 
445  double width;
446  double height;
447  int64_t bgColor;
448  std::vector<uint8_t> imageData;
449  };
450 }
451 
456 namespace avro
457 {
458  template<> struct codec_traits<gpudb::VisualizeImageClassbreakResponse>
459  {
460  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakResponse& v)
461  {
462  ::avro::encode(e, v.width);
463  ::avro::encode(e, v.height);
464  ::avro::encode(e, v.bgColor);
465  ::avro::encode(e, v.imageData);
466  }
467 
468  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
469  {
470  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
471  {
472  const std::vector<size_t> fo = rd->fieldOrder();
473 
474  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
475  {
476  switch (*it)
477  {
478  case 0:
479  ::avro::decode(d, v.width);
480  break;
481 
482  case 1:
483  ::avro::decode(d, v.height);
484  break;
485 
486  case 2:
487  ::avro::decode(d, v.bgColor);
488  break;
489 
490  case 3:
491  ::avro::decode(d, v.imageData);
492  break;
493 
494  default:
495  break;
496  }
497  }
498  }
499  else
500  {
501  ::avro::decode(d, v.width);
502  ::avro::decode(d, v.height);
503  ::avro::decode(d, v.bgColor);
504  ::avro::decode(d, v.imageData);
505  }
506  }
507  };
508 }
509 
510 #endif