GPUdb C++ API  Version 6.1.0.0
visualize_image_labels.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_LABELS_H__
7 #define __VISUALIZE_IMAGE_LABELS_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeImageLabelsRequest
23  {
24 
30  VisualizeImageLabelsRequest() :
31  tableName(std::string()),
32  xColumnName(std::string()),
33  yColumnName(std::string()),
34  xOffset(std::string()),
35  yOffset(std::string()),
36  textString(std::string()),
37  font(std::string()),
38  textColor(std::string()),
39  textAngle(std::string()),
40  textScale(std::string()),
41  drawBox(std::string()),
42  drawLeader(std::string()),
43  lineWidth(std::string()),
44  lineColor(std::string()),
45  fillColor(std::string()),
46  leaderXColumnName(std::string()),
47  leaderYColumnName(std::string()),
48  filter(std::string()),
49  minX(double()),
50  maxX(double()),
51  minY(double()),
52  maxY(double()),
53  width(int32_t()),
54  height(int32_t()),
55  projection(std::string()),
56  options(std::map<std::string, std::string>())
57  {
58  }
59 
115  VisualizeImageLabelsRequest(const std::string& tableName_, const std::string& xColumnName_, const std::string& yColumnName_, const std::string& xOffset_, const std::string& yOffset_, const std::string& textString_, const std::string& font_, const std::string& textColor_, const std::string& textAngle_, const std::string& textScale_, const std::string& drawBox_, const std::string& drawLeader_, const std::string& lineWidth_, const std::string& lineColor_, const std::string& fillColor_, const std::string& leaderXColumnName_, const std::string& leaderYColumnName_, const std::string& filter_, 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 std::map<std::string, std::string>& options_):
116  tableName( tableName_ ),
117  xColumnName( xColumnName_ ),
118  yColumnName( yColumnName_ ),
119  xOffset( xOffset_ ),
120  yOffset( yOffset_ ),
121  textString( textString_ ),
122  font( font_ ),
123  textColor( textColor_ ),
124  textAngle( textAngle_ ),
125  textScale( textScale_ ),
126  drawBox( drawBox_ ),
127  drawLeader( drawLeader_ ),
128  lineWidth( lineWidth_ ),
129  lineColor( lineColor_ ),
130  fillColor( fillColor_ ),
131  leaderXColumnName( leaderXColumnName_ ),
132  leaderYColumnName( leaderYColumnName_ ),
133  filter( filter_ ),
134  minX( minX_ ),
135  maxX( maxX_ ),
136  minY( minY_ ),
137  maxY( maxY_ ),
138  width( width_ ),
139  height( height_ ),
140  projection( projection_ ),
141  options( options_ )
142  {
143  }
144 
149  std::string tableName;
150  std::string xColumnName;
151  std::string yColumnName;
152  std::string xOffset;
153  std::string yOffset;
154  std::string textString;
155  std::string font;
156  std::string textColor;
157  std::string textAngle;
158  std::string textScale;
159  std::string drawBox;
160  std::string drawLeader;
161  std::string lineWidth;
162  std::string lineColor;
163  std::string fillColor;
164  std::string leaderXColumnName;
165  std::string leaderYColumnName;
166  std::string filter;
167  double minX;
168  double maxX;
169  double minY;
170  double maxY;
171  int32_t width;
172  int32_t height;
173  std::string projection;
174  std::map<std::string, std::string> options;
175  };
176 }
177 
182 namespace avro
183 {
184  template<> struct codec_traits<gpudb::VisualizeImageLabelsRequest>
185  {
186  static void encode(Encoder& e, const gpudb::VisualizeImageLabelsRequest& v)
187  {
188  ::avro::encode(e, v.tableName);
189  ::avro::encode(e, v.xColumnName);
190  ::avro::encode(e, v.yColumnName);
191  ::avro::encode(e, v.xOffset);
192  ::avro::encode(e, v.yOffset);
193  ::avro::encode(e, v.textString);
194  ::avro::encode(e, v.font);
195  ::avro::encode(e, v.textColor);
196  ::avro::encode(e, v.textAngle);
197  ::avro::encode(e, v.textScale);
198  ::avro::encode(e, v.drawBox);
199  ::avro::encode(e, v.drawLeader);
200  ::avro::encode(e, v.lineWidth);
201  ::avro::encode(e, v.lineColor);
202  ::avro::encode(e, v.fillColor);
203  ::avro::encode(e, v.leaderXColumnName);
204  ::avro::encode(e, v.leaderYColumnName);
205  ::avro::encode(e, v.filter);
206  ::avro::encode(e, v.minX);
207  ::avro::encode(e, v.maxX);
208  ::avro::encode(e, v.minY);
209  ::avro::encode(e, v.maxY);
210  ::avro::encode(e, v.width);
211  ::avro::encode(e, v.height);
212  ::avro::encode(e, v.projection);
213  ::avro::encode(e, v.options);
214  }
215 
216  static void decode(Decoder& d, gpudb::VisualizeImageLabelsRequest& v)
217  {
218  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
219  {
220  const std::vector<size_t> fo = rd->fieldOrder();
221 
222  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
223  {
224  switch (*it)
225  {
226  case 0:
227  ::avro::decode(d, v.tableName);
228  break;
229 
230  case 1:
231  ::avro::decode(d, v.xColumnName);
232  break;
233 
234  case 2:
235  ::avro::decode(d, v.yColumnName);
236  break;
237 
238  case 3:
239  ::avro::decode(d, v.xOffset);
240  break;
241 
242  case 4:
243  ::avro::decode(d, v.yOffset);
244  break;
245 
246  case 5:
247  ::avro::decode(d, v.textString);
248  break;
249 
250  case 6:
251  ::avro::decode(d, v.font);
252  break;
253 
254  case 7:
255  ::avro::decode(d, v.textColor);
256  break;
257 
258  case 8:
259  ::avro::decode(d, v.textAngle);
260  break;
261 
262  case 9:
263  ::avro::decode(d, v.textScale);
264  break;
265 
266  case 10:
267  ::avro::decode(d, v.drawBox);
268  break;
269 
270  case 11:
271  ::avro::decode(d, v.drawLeader);
272  break;
273 
274  case 12:
275  ::avro::decode(d, v.lineWidth);
276  break;
277 
278  case 13:
279  ::avro::decode(d, v.lineColor);
280  break;
281 
282  case 14:
283  ::avro::decode(d, v.fillColor);
284  break;
285 
286  case 15:
287  ::avro::decode(d, v.leaderXColumnName);
288  break;
289 
290  case 16:
291  ::avro::decode(d, v.leaderYColumnName);
292  break;
293 
294  case 17:
295  ::avro::decode(d, v.filter);
296  break;
297 
298  case 18:
299  ::avro::decode(d, v.minX);
300  break;
301 
302  case 19:
303  ::avro::decode(d, v.maxX);
304  break;
305 
306  case 20:
307  ::avro::decode(d, v.minY);
308  break;
309 
310  case 21:
311  ::avro::decode(d, v.maxY);
312  break;
313 
314  case 22:
315  ::avro::decode(d, v.width);
316  break;
317 
318  case 23:
319  ::avro::decode(d, v.height);
320  break;
321 
322  case 24:
323  ::avro::decode(d, v.projection);
324  break;
325 
326  case 25:
327  ::avro::decode(d, v.options);
328  break;
329 
330  default:
331  break;
332  }
333  }
334  }
335  else
336  {
337  ::avro::decode(d, v.tableName);
338  ::avro::decode(d, v.xColumnName);
339  ::avro::decode(d, v.yColumnName);
340  ::avro::decode(d, v.xOffset);
341  ::avro::decode(d, v.yOffset);
342  ::avro::decode(d, v.textString);
343  ::avro::decode(d, v.font);
344  ::avro::decode(d, v.textColor);
345  ::avro::decode(d, v.textAngle);
346  ::avro::decode(d, v.textScale);
347  ::avro::decode(d, v.drawBox);
348  ::avro::decode(d, v.drawLeader);
349  ::avro::decode(d, v.lineWidth);
350  ::avro::decode(d, v.lineColor);
351  ::avro::decode(d, v.fillColor);
352  ::avro::decode(d, v.leaderXColumnName);
353  ::avro::decode(d, v.leaderYColumnName);
354  ::avro::decode(d, v.filter);
355  ::avro::decode(d, v.minX);
356  ::avro::decode(d, v.maxX);
357  ::avro::decode(d, v.minY);
358  ::avro::decode(d, v.maxY);
359  ::avro::decode(d, v.width);
360  ::avro::decode(d, v.height);
361  ::avro::decode(d, v.projection);
362  ::avro::decode(d, v.options);
363  }
364  }
365  };
366 }
367 
372 namespace gpudb
373 {
374 
381  struct VisualizeImageLabelsResponse
382  {
383 
389  VisualizeImageLabelsResponse() :
390  width(double()),
391  height(double()),
392  bgColor(int64_t()),
393  imageData(std::vector<uint8_t>())
394  {
395  }
396 
401  double width;
402  double height;
403  int64_t bgColor;
404  std::vector<uint8_t> imageData;
405  };
406 }
407 
412 namespace avro
413 {
414  template<> struct codec_traits<gpudb::VisualizeImageLabelsResponse>
415  {
416  static void encode(Encoder& e, const gpudb::VisualizeImageLabelsResponse& v)
417  {
418  ::avro::encode(e, v.width);
419  ::avro::encode(e, v.height);
420  ::avro::encode(e, v.bgColor);
421  ::avro::encode(e, v.imageData);
422  }
423 
424  static void decode(Decoder& d, gpudb::VisualizeImageLabelsResponse& v)
425  {
426  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
427  {
428  const std::vector<size_t> fo = rd->fieldOrder();
429 
430  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
431  {
432  switch (*it)
433  {
434  case 0:
435  ::avro::decode(d, v.width);
436  break;
437 
438  case 1:
439  ::avro::decode(d, v.height);
440  break;
441 
442  case 2:
443  ::avro::decode(d, v.bgColor);
444  break;
445 
446  case 3:
447  ::avro::decode(d, v.imageData);
448  break;
449 
450  default:
451  break;
452  }
453  }
454  }
455  else
456  {
457  ::avro::decode(d, v.width);
458  ::avro::decode(d, v.height);
459  ::avro::decode(d, v.bgColor);
460  ::avro::decode(d, v.imageData);
461  }
462  }
463  };
464 }
465 
466 #endif
FilterResponse filter(const FilterRequest &request_) const
Filters data based on the specified expression.