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