GPUdb C++ API  Version 6.1.0.0
visualize_video.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_VIDEO_H__
7 #define __VISUALIZE_VIDEO_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeVideoRequest
23  {
24 
30  VisualizeVideoRequest() :
31  tableNames(std::vector<std::string>()),
32  worldTableNames(std::vector<std::string>()),
33  trackIds(std::vector<std::vector<std::string> >()),
34  xColumnName(std::string()),
35  yColumnName(std::string()),
36  geometryColumnName(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  timeIntervals(std::vector<std::vector<double> >()),
46  videoStyle(std::string()),
47  sessionKey(std::string()),
48  styleOptions(std::map<std::string, std::vector<std::string> >()),
49  options(std::map<std::string, std::string>())
50  {
51  }
52 
201  VisualizeVideoRequest(const std::vector<std::string>& tableNames_, const std::vector<std::string>& worldTableNames_, const std::vector<std::vector<std::string> >& trackIds_, const std::string& xColumnName_, const std::string& yColumnName_, const std::string& geometryColumnName_, 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::vector<std::vector<double> >& timeIntervals_, const std::string& videoStyle_, const std::string& sessionKey_, const std::map<std::string, std::vector<std::string> >& styleOptions_, const std::map<std::string, std::string>& options_):
202  tableNames( tableNames_ ),
203  worldTableNames( worldTableNames_ ),
204  trackIds( trackIds_ ),
205  xColumnName( xColumnName_ ),
206  yColumnName( yColumnName_ ),
207  geometryColumnName( geometryColumnName_ ),
208  minX( minX_ ),
209  maxX( maxX_ ),
210  minY( minY_ ),
211  maxY( maxY_ ),
212  width( width_ ),
213  height( height_ ),
214  projection( projection_ ),
215  bgColor( bgColor_ ),
216  timeIntervals( timeIntervals_ ),
217  videoStyle( videoStyle_ ),
218  sessionKey( sessionKey_ ),
219  styleOptions( styleOptions_ ),
220  options( options_ )
221  {
222  }
223 
228  std::vector<std::string> tableNames;
229  std::vector<std::string> worldTableNames;
230  std::vector<std::vector<std::string> > trackIds;
231  std::string xColumnName;
232  std::string yColumnName;
233  std::string geometryColumnName;
234  double minX;
235  double maxX;
236  double minY;
237  double maxY;
238  int32_t width;
239  int32_t height;
240  std::string projection;
241  int64_t bgColor;
242  std::vector<std::vector<double> > timeIntervals;
243  std::string videoStyle;
244  std::string sessionKey;
245  std::map<std::string, std::vector<std::string> > styleOptions;
246  std::map<std::string, std::string> options;
247  };
248 }
249 
254 namespace avro
255 {
256  template<> struct codec_traits<gpudb::VisualizeVideoRequest>
257  {
258  static void encode(Encoder& e, const gpudb::VisualizeVideoRequest& v)
259  {
260  ::avro::encode(e, v.tableNames);
261  ::avro::encode(e, v.worldTableNames);
262  ::avro::encode(e, v.trackIds);
263  ::avro::encode(e, v.xColumnName);
264  ::avro::encode(e, v.yColumnName);
265  ::avro::encode(e, v.geometryColumnName);
266  ::avro::encode(e, v.minX);
267  ::avro::encode(e, v.maxX);
268  ::avro::encode(e, v.minY);
269  ::avro::encode(e, v.maxY);
270  ::avro::encode(e, v.width);
271  ::avro::encode(e, v.height);
272  ::avro::encode(e, v.projection);
273  ::avro::encode(e, v.bgColor);
274  ::avro::encode(e, v.timeIntervals);
275  ::avro::encode(e, v.videoStyle);
276  ::avro::encode(e, v.sessionKey);
277  ::avro::encode(e, v.styleOptions);
278  ::avro::encode(e, v.options);
279  }
280 
281  static void decode(Decoder& d, gpudb::VisualizeVideoRequest& v)
282  {
283  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
284  {
285  const std::vector<size_t> fo = rd->fieldOrder();
286 
287  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
288  {
289  switch (*it)
290  {
291  case 0:
292  ::avro::decode(d, v.tableNames);
293  break;
294 
295  case 1:
296  ::avro::decode(d, v.worldTableNames);
297  break;
298 
299  case 2:
300  ::avro::decode(d, v.trackIds);
301  break;
302 
303  case 3:
304  ::avro::decode(d, v.xColumnName);
305  break;
306 
307  case 4:
308  ::avro::decode(d, v.yColumnName);
309  break;
310 
311  case 5:
312  ::avro::decode(d, v.geometryColumnName);
313  break;
314 
315  case 6:
316  ::avro::decode(d, v.minX);
317  break;
318 
319  case 7:
320  ::avro::decode(d, v.maxX);
321  break;
322 
323  case 8:
324  ::avro::decode(d, v.minY);
325  break;
326 
327  case 9:
328  ::avro::decode(d, v.maxY);
329  break;
330 
331  case 10:
332  ::avro::decode(d, v.width);
333  break;
334 
335  case 11:
336  ::avro::decode(d, v.height);
337  break;
338 
339  case 12:
340  ::avro::decode(d, v.projection);
341  break;
342 
343  case 13:
344  ::avro::decode(d, v.bgColor);
345  break;
346 
347  case 14:
348  ::avro::decode(d, v.timeIntervals);
349  break;
350 
351  case 15:
352  ::avro::decode(d, v.videoStyle);
353  break;
354 
355  case 16:
356  ::avro::decode(d, v.sessionKey);
357  break;
358 
359  case 17:
360  ::avro::decode(d, v.styleOptions);
361  break;
362 
363  case 18:
364  ::avro::decode(d, v.options);
365  break;
366 
367  default:
368  break;
369  }
370  }
371  }
372  else
373  {
374  ::avro::decode(d, v.tableNames);
375  ::avro::decode(d, v.worldTableNames);
376  ::avro::decode(d, v.trackIds);
377  ::avro::decode(d, v.xColumnName);
378  ::avro::decode(d, v.yColumnName);
379  ::avro::decode(d, v.geometryColumnName);
380  ::avro::decode(d, v.minX);
381  ::avro::decode(d, v.maxX);
382  ::avro::decode(d, v.minY);
383  ::avro::decode(d, v.maxY);
384  ::avro::decode(d, v.width);
385  ::avro::decode(d, v.height);
386  ::avro::decode(d, v.projection);
387  ::avro::decode(d, v.bgColor);
388  ::avro::decode(d, v.timeIntervals);
389  ::avro::decode(d, v.videoStyle);
390  ::avro::decode(d, v.sessionKey);
391  ::avro::decode(d, v.styleOptions);
392  ::avro::decode(d, v.options);
393  }
394  }
395  };
396 }
397 
402 namespace gpudb
403 {
404 
411  struct VisualizeVideoResponse
412  {
413 
419  VisualizeVideoResponse() :
420  width(double()),
421  height(double()),
422  bgColor(int64_t()),
423  numFrames(int32_t()),
424  sessionKey(std::string()),
425  data(std::vector<std::vector<uint8_t> >())
426  {
427  }
428 
433  double width;
434  double height;
435  int64_t bgColor;
436  int32_t numFrames;
437  std::string sessionKey;
438  std::vector<std::vector<uint8_t> > data;
439  };
440 }
441 
446 namespace avro
447 {
448  template<> struct codec_traits<gpudb::VisualizeVideoResponse>
449  {
450  static void encode(Encoder& e, const gpudb::VisualizeVideoResponse& 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.numFrames);
456  ::avro::encode(e, v.sessionKey);
457  ::avro::encode(e, v.data);
458  }
459 
460  static void decode(Decoder& d, gpudb::VisualizeVideoResponse& v)
461  {
462  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
463  {
464  const std::vector<size_t> fo = rd->fieldOrder();
465 
466  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
467  {
468  switch (*it)
469  {
470  case 0:
471  ::avro::decode(d, v.width);
472  break;
473 
474  case 1:
475  ::avro::decode(d, v.height);
476  break;
477 
478  case 2:
479  ::avro::decode(d, v.bgColor);
480  break;
481 
482  case 3:
483  ::avro::decode(d, v.numFrames);
484  break;
485 
486  case 4:
487  ::avro::decode(d, v.sessionKey);
488  break;
489 
490  case 5:
491  ::avro::decode(d, v.data);
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.numFrames);
505  ::avro::decode(d, v.sessionKey);
506  ::avro::decode(d, v.data);
507  }
508  }
509  };
510 }
511 
512 #endif