GPUdb C++ API  Version 5.2.0.0
visualize_image_classbreak.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_CLASSBREAK_H__
7 #define __VISUALIZE_IMAGE_CLASSBREAK_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeImageClassbreakRequest
23  {
24 
30  VisualizeImageClassbreakRequest() :
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  cbColumnName1(std::string()),
37  cbVals1(std::vector<std::string>()),
38  cbColumnName2(std::vector<std::string>()),
39  cbVals2(std::vector<std::vector<std::string> >()),
40  minX(double()),
41  maxX(double()),
42  minY(double()),
43  maxY(double()),
44  width(int32_t()),
45  height(int32_t()),
46  projection(std::string()),
47  bgColor(int64_t()),
48  styleOptions(std::map<std::string, std::vector<std::string> >()),
49  options(std::map<std::string, std::string>())
50  {
51  }
52 
115  VisualizeImageClassbreakRequest(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 std::string& cbColumnName1, const std::vector<std::string>& cbVals1, const std::vector<std::string>& cbColumnName2, const std::vector<std::vector<std::string> >& cbVals2, 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):
116  tableNames(tableNames),
117  worldTableNames(worldTableNames),
118  xColumnName(xColumnName),
119  yColumnName(yColumnName),
120  trackIds(trackIds),
121  cbColumnName1(cbColumnName1),
122  cbVals1(cbVals1),
123  cbColumnName2(cbColumnName2),
124  cbVals2(cbVals2),
125  minX(minX),
126  maxX(maxX),
127  minY(minY),
128  maxY(maxY),
129  width(width),
130  height(height),
131  projection(projection),
132  bgColor(bgColor),
133  styleOptions(styleOptions),
134  options(options)
135  {
136  }
137 
142  std::vector<std::string> tableNames;
143  std::vector<std::string> worldTableNames;
144  std::string xColumnName;
145  std::string yColumnName;
146  std::vector<std::vector<std::string> > trackIds;
147  std::string cbColumnName1;
148  std::vector<std::string> cbVals1;
149  std::vector<std::string> cbColumnName2;
150  std::vector<std::vector<std::string> > cbVals2;
151  double minX;
152  double maxX;
153  double minY;
154  double maxY;
155  int32_t width;
156  int32_t height;
157  std::string projection;
158  int64_t bgColor;
159  std::map<std::string, std::vector<std::string> > styleOptions;
160  std::map<std::string, std::string> options;
161  };
162 }
163 
168 namespace avro
169 {
170  template<> struct codec_traits<gpudb::VisualizeImageClassbreakRequest>
171  {
172  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakRequest& v)
173  {
174  ::avro::encode(e, v.tableNames);
175  ::avro::encode(e, v.worldTableNames);
176  ::avro::encode(e, v.xColumnName);
177  ::avro::encode(e, v.yColumnName);
178  ::avro::encode(e, v.trackIds);
179  ::avro::encode(e, v.cbColumnName1);
180  ::avro::encode(e, v.cbVals1);
181  ::avro::encode(e, v.cbColumnName2);
182  ::avro::encode(e, v.cbVals2);
183  ::avro::encode(e, v.minX);
184  ::avro::encode(e, v.maxX);
185  ::avro::encode(e, v.minY);
186  ::avro::encode(e, v.maxY);
187  ::avro::encode(e, v.width);
188  ::avro::encode(e, v.height);
189  ::avro::encode(e, v.projection);
190  ::avro::encode(e, v.bgColor);
191  ::avro::encode(e, v.styleOptions);
192  ::avro::encode(e, v.options);
193  }
194 
195  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
196  {
197  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
198  {
199  const std::vector<size_t> fo = rd->fieldOrder();
200 
201  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
202  {
203  switch (*it)
204  {
205  case 0:
206  ::avro::decode(d, v.tableNames);
207  break;
208 
209  case 1:
210  ::avro::decode(d, v.worldTableNames);
211  break;
212 
213  case 2:
214  ::avro::decode(d, v.xColumnName);
215  break;
216 
217  case 3:
218  ::avro::decode(d, v.yColumnName);
219  break;
220 
221  case 4:
222  ::avro::decode(d, v.trackIds);
223  break;
224 
225  case 5:
226  ::avro::decode(d, v.cbColumnName1);
227  break;
228 
229  case 6:
230  ::avro::decode(d, v.cbVals1);
231  break;
232 
233  case 7:
234  ::avro::decode(d, v.cbColumnName2);
235  break;
236 
237  case 8:
238  ::avro::decode(d, v.cbVals2);
239  break;
240 
241  case 9:
242  ::avro::decode(d, v.minX);
243  break;
244 
245  case 10:
246  ::avro::decode(d, v.maxX);
247  break;
248 
249  case 11:
250  ::avro::decode(d, v.minY);
251  break;
252 
253  case 12:
254  ::avro::decode(d, v.maxY);
255  break;
256 
257  case 13:
258  ::avro::decode(d, v.width);
259  break;
260 
261  case 14:
262  ::avro::decode(d, v.height);
263  break;
264 
265  case 15:
266  ::avro::decode(d, v.projection);
267  break;
268 
269  case 16:
270  ::avro::decode(d, v.bgColor);
271  break;
272 
273  case 17:
274  ::avro::decode(d, v.styleOptions);
275  break;
276 
277  case 18:
278  ::avro::decode(d, v.options);
279  break;
280 
281  default:
282  break;
283  }
284  }
285  }
286  else
287  {
288  ::avro::decode(d, v.tableNames);
289  ::avro::decode(d, v.worldTableNames);
290  ::avro::decode(d, v.xColumnName);
291  ::avro::decode(d, v.yColumnName);
292  ::avro::decode(d, v.trackIds);
293  ::avro::decode(d, v.cbColumnName1);
294  ::avro::decode(d, v.cbVals1);
295  ::avro::decode(d, v.cbColumnName2);
296  ::avro::decode(d, v.cbVals2);
297  ::avro::decode(d, v.minX);
298  ::avro::decode(d, v.maxX);
299  ::avro::decode(d, v.minY);
300  ::avro::decode(d, v.maxY);
301  ::avro::decode(d, v.width);
302  ::avro::decode(d, v.height);
303  ::avro::decode(d, v.projection);
304  ::avro::decode(d, v.bgColor);
305  ::avro::decode(d, v.styleOptions);
306  ::avro::decode(d, v.options);
307  }
308  }
309  };
310 }
311 
316 namespace gpudb
317 {
318 
325  struct VisualizeImageClassbreakResponse
326  {
327 
333  VisualizeImageClassbreakResponse() :
334  width(double()),
335  height(double()),
336  bgColor(int64_t()),
337  imageData(std::vector<uint8_t>())
338  {
339  }
340 
345  double width;
346  double height;
347  int64_t bgColor;
348  std::vector<uint8_t> imageData;
349  };
350 }
351 
356 namespace avro
357 {
358  template<> struct codec_traits<gpudb::VisualizeImageClassbreakResponse>
359  {
360  static void encode(Encoder& e, const gpudb::VisualizeImageClassbreakResponse& v)
361  {
362  ::avro::encode(e, v.width);
363  ::avro::encode(e, v.height);
364  ::avro::encode(e, v.bgColor);
365  ::avro::encode(e, v.imageData);
366  }
367 
368  static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
369  {
370  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
371  {
372  const std::vector<size_t> fo = rd->fieldOrder();
373 
374  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
375  {
376  switch (*it)
377  {
378  case 0:
379  ::avro::decode(d, v.width);
380  break;
381 
382  case 1:
383  ::avro::decode(d, v.height);
384  break;
385 
386  case 2:
387  ::avro::decode(d, v.bgColor);
388  break;
389 
390  case 3:
391  ::avro::decode(d, v.imageData);
392  break;
393 
394  default:
395  break;
396  }
397  }
398  }
399  else
400  {
401  ::avro::decode(d, v.width);
402  ::avro::decode(d, v.height);
403  ::avro::decode(d, v.bgColor);
404  ::avro::decode(d, v.imageData);
405  }
406  }
407  };
408 }
409 
410 #endif