GPUdb C++ API  Version 5.2.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  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 
94  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):
95  tableName(tableName),
96  xColumnName(xColumnName),
97  yColumnName(yColumnName),
98  xOffset(xOffset),
99  yOffset(yOffset),
100  textString(textString),
101  font(font),
102  textColor(textColor),
103  textAngle(textAngle),
104  textScale(textScale),
105  drawBox(drawBox),
106  drawLeader(drawLeader),
107  lineWidth(lineWidth),
108  lineColor(lineColor),
109  fillColor(fillColor),
110  leaderXColumnName(leaderXColumnName),
111  leaderYColumnName(leaderYColumnName),
112  minX(minX),
113  maxX(maxX),
114  minY(minY),
115  maxY(maxY),
116  width(width),
117  height(height),
118  projection(projection),
119  options(options)
120  {
121  }
122 
127  std::string tableName;
128  std::string xColumnName;
129  std::string yColumnName;
130  std::string xOffset;
131  std::string yOffset;
132  std::string textString;
133  std::string font;
134  std::string textColor;
135  std::string textAngle;
136  std::string textScale;
137  std::string drawBox;
138  std::string drawLeader;
139  std::string lineWidth;
140  std::string lineColor;
141  std::string fillColor;
142  std::string leaderXColumnName;
143  std::string leaderYColumnName;
144  double minX;
145  double maxX;
146  double minY;
147  double maxY;
148  int32_t width;
149  int32_t height;
150  std::string projection;
151  std::map<std::string, std::string> options;
152  };
153 }
154 
159 namespace avro
160 {
161  template<> struct codec_traits<gpudb::VisualizeImageLabelsRequest>
162  {
163  static void encode(Encoder& e, const gpudb::VisualizeImageLabelsRequest& v)
164  {
165  ::avro::encode(e, v.tableName);
166  ::avro::encode(e, v.xColumnName);
167  ::avro::encode(e, v.yColumnName);
168  ::avro::encode(e, v.xOffset);
169  ::avro::encode(e, v.yOffset);
170  ::avro::encode(e, v.textString);
171  ::avro::encode(e, v.font);
172  ::avro::encode(e, v.textColor);
173  ::avro::encode(e, v.textAngle);
174  ::avro::encode(e, v.textScale);
175  ::avro::encode(e, v.drawBox);
176  ::avro::encode(e, v.drawLeader);
177  ::avro::encode(e, v.lineWidth);
178  ::avro::encode(e, v.lineColor);
179  ::avro::encode(e, v.fillColor);
180  ::avro::encode(e, v.leaderXColumnName);
181  ::avro::encode(e, v.leaderYColumnName);
182  ::avro::encode(e, v.minX);
183  ::avro::encode(e, v.maxX);
184  ::avro::encode(e, v.minY);
185  ::avro::encode(e, v.maxY);
186  ::avro::encode(e, v.width);
187  ::avro::encode(e, v.height);
188  ::avro::encode(e, v.projection);
189  ::avro::encode(e, v.options);
190  }
191 
192  static void decode(Decoder& d, gpudb::VisualizeImageLabelsRequest& v)
193  {
194  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
195  {
196  const std::vector<size_t> fo = rd->fieldOrder();
197 
198  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
199  {
200  switch (*it)
201  {
202  case 0:
203  ::avro::decode(d, v.tableName);
204  break;
205 
206  case 1:
207  ::avro::decode(d, v.xColumnName);
208  break;
209 
210  case 2:
211  ::avro::decode(d, v.yColumnName);
212  break;
213 
214  case 3:
215  ::avro::decode(d, v.xOffset);
216  break;
217 
218  case 4:
219  ::avro::decode(d, v.yOffset);
220  break;
221 
222  case 5:
223  ::avro::decode(d, v.textString);
224  break;
225 
226  case 6:
227  ::avro::decode(d, v.font);
228  break;
229 
230  case 7:
231  ::avro::decode(d, v.textColor);
232  break;
233 
234  case 8:
235  ::avro::decode(d, v.textAngle);
236  break;
237 
238  case 9:
239  ::avro::decode(d, v.textScale);
240  break;
241 
242  case 10:
243  ::avro::decode(d, v.drawBox);
244  break;
245 
246  case 11:
247  ::avro::decode(d, v.drawLeader);
248  break;
249 
250  case 12:
251  ::avro::decode(d, v.lineWidth);
252  break;
253 
254  case 13:
255  ::avro::decode(d, v.lineColor);
256  break;
257 
258  case 14:
259  ::avro::decode(d, v.fillColor);
260  break;
261 
262  case 15:
263  ::avro::decode(d, v.leaderXColumnName);
264  break;
265 
266  case 16:
267  ::avro::decode(d, v.leaderYColumnName);
268  break;
269 
270  case 17:
271  ::avro::decode(d, v.minX);
272  break;
273 
274  case 18:
275  ::avro::decode(d, v.maxX);
276  break;
277 
278  case 19:
279  ::avro::decode(d, v.minY);
280  break;
281 
282  case 20:
283  ::avro::decode(d, v.maxY);
284  break;
285 
286  case 21:
287  ::avro::decode(d, v.width);
288  break;
289 
290  case 22:
291  ::avro::decode(d, v.height);
292  break;
293 
294  case 23:
295  ::avro::decode(d, v.projection);
296  break;
297 
298  case 24:
299  ::avro::decode(d, v.options);
300  break;
301 
302  default:
303  break;
304  }
305  }
306  }
307  else
308  {
309  ::avro::decode(d, v.tableName);
310  ::avro::decode(d, v.xColumnName);
311  ::avro::decode(d, v.yColumnName);
312  ::avro::decode(d, v.xOffset);
313  ::avro::decode(d, v.yOffset);
314  ::avro::decode(d, v.textString);
315  ::avro::decode(d, v.font);
316  ::avro::decode(d, v.textColor);
317  ::avro::decode(d, v.textAngle);
318  ::avro::decode(d, v.textScale);
319  ::avro::decode(d, v.drawBox);
320  ::avro::decode(d, v.drawLeader);
321  ::avro::decode(d, v.lineWidth);
322  ::avro::decode(d, v.lineColor);
323  ::avro::decode(d, v.fillColor);
324  ::avro::decode(d, v.leaderXColumnName);
325  ::avro::decode(d, v.leaderYColumnName);
326  ::avro::decode(d, v.minX);
327  ::avro::decode(d, v.maxX);
328  ::avro::decode(d, v.minY);
329  ::avro::decode(d, v.maxY);
330  ::avro::decode(d, v.width);
331  ::avro::decode(d, v.height);
332  ::avro::decode(d, v.projection);
333  ::avro::decode(d, v.options);
334  }
335  }
336  };
337 }
338 
343 namespace gpudb
344 {
345 
352  struct VisualizeImageLabelsResponse
353  {
354 
360  VisualizeImageLabelsResponse() :
361  width(double()),
362  height(double()),
363  bgColor(int64_t()),
364  imageData(std::vector<uint8_t>())
365  {
366  }
367 
372  double width;
373  double height;
374  int64_t bgColor;
375  std::vector<uint8_t> imageData;
376  };
377 }
378 
383 namespace avro
384 {
385  template<> struct codec_traits<gpudb::VisualizeImageLabelsResponse>
386  {
387  static void encode(Encoder& e, const gpudb::VisualizeImageLabelsResponse& v)
388  {
389  ::avro::encode(e, v.width);
390  ::avro::encode(e, v.height);
391  ::avro::encode(e, v.bgColor);
392  ::avro::encode(e, v.imageData);
393  }
394 
395  static void decode(Decoder& d, gpudb::VisualizeImageLabelsResponse& v)
396  {
397  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
398  {
399  const std::vector<size_t> fo = rd->fieldOrder();
400 
401  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
402  {
403  switch (*it)
404  {
405  case 0:
406  ::avro::decode(d, v.width);
407  break;
408 
409  case 1:
410  ::avro::decode(d, v.height);
411  break;
412 
413  case 2:
414  ::avro::decode(d, v.bgColor);
415  break;
416 
417  case 3:
418  ::avro::decode(d, v.imageData);
419  break;
420 
421  default:
422  break;
423  }
424  }
425  }
426  else
427  {
428  ::avro::decode(d, v.width);
429  ::avro::decode(d, v.height);
430  ::avro::decode(d, v.bgColor);
431  ::avro::decode(d, v.imageData);
432  }
433  }
434  };
435 }
436 
437 #endif