GPUdb C++ API  Version 6.1.0.0
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 
13 namespace gpudb
14 {
15 
22  struct VisualizeImageRequest
23  {
24 
30  VisualizeImageRequest() :
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  minX(double()),
38  maxX(double()),
39  minY(double()),
40  maxY(double()),
41  width(int32_t()),
42  height(int32_t()),
43  projection(std::string()),
44  bgColor(int64_t()),
45  styleOptions(std::map<std::string, std::vector<std::string> >()),
46  options(std::map<std::string, std::string>())
47  {
48  }
49 
229  VisualizeImageRequest(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 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_):
230  tableNames( tableNames_ ),
231  worldTableNames( worldTableNames_ ),
232  xColumnName( xColumnName_ ),
233  yColumnName( yColumnName_ ),
234  geometryColumnName( geometryColumnName_ ),
235  trackIds( trackIds_ ),
236  minX( minX_ ),
237  maxX( maxX_ ),
238  minY( minY_ ),
239  maxY( maxY_ ),
240  width( width_ ),
241  height( height_ ),
242  projection( projection_ ),
243  bgColor( bgColor_ ),
244  styleOptions( styleOptions_ ),
245  options( options_ )
246  {
247  }
248 
253  std::vector<std::string> tableNames;
254  std::vector<std::string> worldTableNames;
255  std::string xColumnName;
256  std::string yColumnName;
257  std::string geometryColumnName;
258  std::vector<std::vector<std::string> > trackIds;
259  double minX;
260  double maxX;
261  double minY;
262  double maxY;
263  int32_t width;
264  int32_t height;
265  std::string projection;
266  int64_t bgColor;
267  std::map<std::string, std::vector<std::string> > styleOptions;
268  std::map<std::string, std::string> options;
269  };
270 }
271 
276 namespace avro
277 {
278  template<> struct codec_traits<gpudb::VisualizeImageRequest>
279  {
280  static void encode(Encoder& e, const gpudb::VisualizeImageRequest& v)
281  {
282  ::avro::encode(e, v.tableNames);
283  ::avro::encode(e, v.worldTableNames);
284  ::avro::encode(e, v.xColumnName);
285  ::avro::encode(e, v.yColumnName);
286  ::avro::encode(e, v.geometryColumnName);
287  ::avro::encode(e, v.trackIds);
288  ::avro::encode(e, v.minX);
289  ::avro::encode(e, v.maxX);
290  ::avro::encode(e, v.minY);
291  ::avro::encode(e, v.maxY);
292  ::avro::encode(e, v.width);
293  ::avro::encode(e, v.height);
294  ::avro::encode(e, v.projection);
295  ::avro::encode(e, v.bgColor);
296  ::avro::encode(e, v.styleOptions);
297  ::avro::encode(e, v.options);
298  }
299 
300  static void decode(Decoder& d, gpudb::VisualizeImageRequest& v)
301  {
302  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
303  {
304  const std::vector<size_t> fo = rd->fieldOrder();
305 
306  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
307  {
308  switch (*it)
309  {
310  case 0:
311  ::avro::decode(d, v.tableNames);
312  break;
313 
314  case 1:
315  ::avro::decode(d, v.worldTableNames);
316  break;
317 
318  case 2:
319  ::avro::decode(d, v.xColumnName);
320  break;
321 
322  case 3:
323  ::avro::decode(d, v.yColumnName);
324  break;
325 
326  case 4:
327  ::avro::decode(d, v.geometryColumnName);
328  break;
329 
330  case 5:
331  ::avro::decode(d, v.trackIds);
332  break;
333 
334  case 6:
335  ::avro::decode(d, v.minX);
336  break;
337 
338  case 7:
339  ::avro::decode(d, v.maxX);
340  break;
341 
342  case 8:
343  ::avro::decode(d, v.minY);
344  break;
345 
346  case 9:
347  ::avro::decode(d, v.maxY);
348  break;
349 
350  case 10:
351  ::avro::decode(d, v.width);
352  break;
353 
354  case 11:
355  ::avro::decode(d, v.height);
356  break;
357 
358  case 12:
359  ::avro::decode(d, v.projection);
360  break;
361 
362  case 13:
363  ::avro::decode(d, v.bgColor);
364  break;
365 
366  case 14:
367  ::avro::decode(d, v.styleOptions);
368  break;
369 
370  case 15:
371  ::avro::decode(d, v.options);
372  break;
373 
374  default:
375  break;
376  }
377  }
378  }
379  else
380  {
381  ::avro::decode(d, v.tableNames);
382  ::avro::decode(d, v.worldTableNames);
383  ::avro::decode(d, v.xColumnName);
384  ::avro::decode(d, v.yColumnName);
385  ::avro::decode(d, v.geometryColumnName);
386  ::avro::decode(d, v.trackIds);
387  ::avro::decode(d, v.minX);
388  ::avro::decode(d, v.maxX);
389  ::avro::decode(d, v.minY);
390  ::avro::decode(d, v.maxY);
391  ::avro::decode(d, v.width);
392  ::avro::decode(d, v.height);
393  ::avro::decode(d, v.projection);
394  ::avro::decode(d, v.bgColor);
395  ::avro::decode(d, v.styleOptions);
396  ::avro::decode(d, v.options);
397  }
398  }
399  };
400 }
401 
406 namespace gpudb
407 {
408 
415  struct VisualizeImageResponse
416  {
417 
423  VisualizeImageResponse() :
424  width(double()),
425  height(double()),
426  bgColor(int64_t()),
427  imageData(std::vector<uint8_t>())
428  {
429  }
430 
435  double width;
436  double height;
437  int64_t bgColor;
438  std::vector<uint8_t> imageData;
439  };
440 }
441 
446 namespace avro
447 {
448  template<> struct codec_traits<gpudb::VisualizeImageResponse>
449  {
450  static void encode(Encoder& e, const gpudb::VisualizeImageResponse& v)
451  {
452  ::avro::encode(e, v.width);
453  ::avro::encode(e, v.height);
454  ::avro::encode(e, v.bgColor);
455  ::avro::encode(e, v.imageData);
456  }
457 
458  static void decode(Decoder& d, gpudb::VisualizeImageResponse& v)
459  {
460  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
461  {
462  const std::vector<size_t> fo = rd->fieldOrder();
463 
464  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
465  {
466  switch (*it)
467  {
468  case 0:
469  ::avro::decode(d, v.width);
470  break;
471 
472  case 1:
473  ::avro::decode(d, v.height);
474  break;
475 
476  case 2:
477  ::avro::decode(d, v.bgColor);
478  break;
479 
480  case 3:
481  ::avro::decode(d, v.imageData);
482  break;
483 
484  default:
485  break;
486  }
487  }
488  }
489  else
490  {
491  ::avro::decode(d, v.width);
492  ::avro::decode(d, v.height);
493  ::avro::decode(d, v.bgColor);
494  ::avro::decode(d, v.imageData);
495  }
496  }
497  };
498 }
499 
500 #endif