GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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  trackIds(std::vector<std::vector<std::string> >()),
36  minX(double()),
37  maxX(double()),
38  minY(double()),
39  maxY(double()),
40  width(int32_t()),
41  height(int32_t()),
42  projection(std::string()),
43  bgColor(int64_t()),
44  styleOptions(std::map<std::string, std::vector<std::string> >()),
45  options(std::map<std::string, std::string>())
46  {
47  }
48 
187  VisualizeImageRequest(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 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_):
188  tableNames( tableNames_ ),
189  worldTableNames( worldTableNames_ ),
190  xColumnName( xColumnName_ ),
191  yColumnName( yColumnName_ ),
192  trackIds( trackIds_ ),
193  minX( minX_ ),
194  maxX( maxX_ ),
195  minY( minY_ ),
196  maxY( maxY_ ),
197  width( width_ ),
198  height( height_ ),
199  projection( projection_ ),
200  bgColor( bgColor_ ),
201  styleOptions( styleOptions_ ),
202  options( options_ )
203  {
204  }
205 
210  std::vector<std::string> tableNames;
211  std::vector<std::string> worldTableNames;
212  std::string xColumnName;
213  std::string yColumnName;
214  std::vector<std::vector<std::string> > trackIds;
215  double minX;
216  double maxX;
217  double minY;
218  double maxY;
219  int32_t width;
220  int32_t height;
221  std::string projection;
222  int64_t bgColor;
223  std::map<std::string, std::vector<std::string> > styleOptions;
224  std::map<std::string, std::string> options;
225  };
226 }
227 
232 namespace avro
233 {
234  template<> struct codec_traits<gpudb::VisualizeImageRequest>
235  {
236  static void encode(Encoder& e, const gpudb::VisualizeImageRequest& v)
237  {
238  ::avro::encode(e, v.tableNames);
239  ::avro::encode(e, v.worldTableNames);
240  ::avro::encode(e, v.xColumnName);
241  ::avro::encode(e, v.yColumnName);
242  ::avro::encode(e, v.trackIds);
243  ::avro::encode(e, v.minX);
244  ::avro::encode(e, v.maxX);
245  ::avro::encode(e, v.minY);
246  ::avro::encode(e, v.maxY);
247  ::avro::encode(e, v.width);
248  ::avro::encode(e, v.height);
249  ::avro::encode(e, v.projection);
250  ::avro::encode(e, v.bgColor);
251  ::avro::encode(e, v.styleOptions);
252  ::avro::encode(e, v.options);
253  }
254 
255  static void decode(Decoder& d, gpudb::VisualizeImageRequest& v)
256  {
257  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
258  {
259  const std::vector<size_t> fo = rd->fieldOrder();
260 
261  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
262  {
263  switch (*it)
264  {
265  case 0:
266  ::avro::decode(d, v.tableNames);
267  break;
268 
269  case 1:
270  ::avro::decode(d, v.worldTableNames);
271  break;
272 
273  case 2:
274  ::avro::decode(d, v.xColumnName);
275  break;
276 
277  case 3:
278  ::avro::decode(d, v.yColumnName);
279  break;
280 
281  case 4:
282  ::avro::decode(d, v.trackIds);
283  break;
284 
285  case 5:
286  ::avro::decode(d, v.minX);
287  break;
288 
289  case 6:
290  ::avro::decode(d, v.maxX);
291  break;
292 
293  case 7:
294  ::avro::decode(d, v.minY);
295  break;
296 
297  case 8:
298  ::avro::decode(d, v.maxY);
299  break;
300 
301  case 9:
302  ::avro::decode(d, v.width);
303  break;
304 
305  case 10:
306  ::avro::decode(d, v.height);
307  break;
308 
309  case 11:
310  ::avro::decode(d, v.projection);
311  break;
312 
313  case 12:
314  ::avro::decode(d, v.bgColor);
315  break;
316 
317  case 13:
318  ::avro::decode(d, v.styleOptions);
319  break;
320 
321  case 14:
322  ::avro::decode(d, v.options);
323  break;
324 
325  default:
326  break;
327  }
328  }
329  }
330  else
331  {
332  ::avro::decode(d, v.tableNames);
333  ::avro::decode(d, v.worldTableNames);
334  ::avro::decode(d, v.xColumnName);
335  ::avro::decode(d, v.yColumnName);
336  ::avro::decode(d, v.trackIds);
337  ::avro::decode(d, v.minX);
338  ::avro::decode(d, v.maxX);
339  ::avro::decode(d, v.minY);
340  ::avro::decode(d, v.maxY);
341  ::avro::decode(d, v.width);
342  ::avro::decode(d, v.height);
343  ::avro::decode(d, v.projection);
344  ::avro::decode(d, v.bgColor);
345  ::avro::decode(d, v.styleOptions);
346  ::avro::decode(d, v.options);
347  }
348  }
349  };
350 }
351 
356 namespace gpudb
357 {
358 
365  struct VisualizeImageResponse
366  {
367 
373  VisualizeImageResponse() :
374  width(double()),
375  height(double()),
376  bgColor(int64_t()),
377  imageData(std::vector<uint8_t>())
378  {
379  }
380 
385  double width;
386  double height;
387  int64_t bgColor;
388  std::vector<uint8_t> imageData;
389  };
390 }
391 
396 namespace avro
397 {
398  template<> struct codec_traits<gpudb::VisualizeImageResponse>
399  {
400  static void encode(Encoder& e, const gpudb::VisualizeImageResponse& v)
401  {
402  ::avro::encode(e, v.width);
403  ::avro::encode(e, v.height);
404  ::avro::encode(e, v.bgColor);
405  ::avro::encode(e, v.imageData);
406  }
407 
408  static void decode(Decoder& d, gpudb::VisualizeImageResponse& v)
409  {
410  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
411  {
412  const std::vector<size_t> fo = rd->fieldOrder();
413 
414  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
415  {
416  switch (*it)
417  {
418  case 0:
419  ::avro::decode(d, v.width);
420  break;
421 
422  case 1:
423  ::avro::decode(d, v.height);
424  break;
425 
426  case 2:
427  ::avro::decode(d, v.bgColor);
428  break;
429 
430  case 3:
431  ::avro::decode(d, v.imageData);
432  break;
433 
434  default:
435  break;
436  }
437  }
438  }
439  else
440  {
441  ::avro::decode(d, v.width);
442  ::avro::decode(d, v.height);
443  ::avro::decode(d, v.bgColor);
444  ::avro::decode(d, v.imageData);
445  }
446  }
447  };
448 }
449 
450 #endif