GPUdb C++ API  Version 6.1.0.0
visualize_image_heatmap.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_HEATMAP_H__
7 #define __VISUALIZE_IMAGE_HEATMAP_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeImageHeatmapRequest
23  {
24 
30  VisualizeImageHeatmapRequest() :
31  tableNames(std::vector<std::string>()),
32  xColumnName(std::string()),
33  yColumnName(std::string()),
34  valueColumnName(std::string()),
35  geometryColumnName(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  styleOptions(std::map<std::string, std::string>()),
44  options(std::map<std::string, std::string>())
45  {
46  }
47 
129  VisualizeImageHeatmapRequest(const std::vector<std::string>& tableNames_, const std::string& xColumnName_, const std::string& yColumnName_, const std::string& valueColumnName_, const std::string& geometryColumnName_, 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>& styleOptions_, const std::map<std::string, std::string>& options_):
130  tableNames( tableNames_ ),
131  xColumnName( xColumnName_ ),
132  yColumnName( yColumnName_ ),
133  valueColumnName( valueColumnName_ ),
134  geometryColumnName( geometryColumnName_ ),
135  minX( minX_ ),
136  maxX( maxX_ ),
137  minY( minY_ ),
138  maxY( maxY_ ),
139  width( width_ ),
140  height( height_ ),
141  projection( projection_ ),
142  styleOptions( styleOptions_ ),
143  options( options_ )
144  {
145  }
146 
151  std::vector<std::string> tableNames;
152  std::string xColumnName;
153  std::string yColumnName;
154  std::string valueColumnName;
155  std::string geometryColumnName;
156  double minX;
157  double maxX;
158  double minY;
159  double maxY;
160  int32_t width;
161  int32_t height;
162  std::string projection;
163  std::map<std::string, std::string> styleOptions;
164  std::map<std::string, std::string> options;
165  };
166 }
167 
172 namespace avro
173 {
174  template<> struct codec_traits<gpudb::VisualizeImageHeatmapRequest>
175  {
176  static void encode(Encoder& e, const gpudb::VisualizeImageHeatmapRequest& v)
177  {
178  ::avro::encode(e, v.tableNames);
179  ::avro::encode(e, v.xColumnName);
180  ::avro::encode(e, v.yColumnName);
181  ::avro::encode(e, v.valueColumnName);
182  ::avro::encode(e, v.geometryColumnName);
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.styleOptions);
191  ::avro::encode(e, v.options);
192  }
193 
194  static void decode(Decoder& d, gpudb::VisualizeImageHeatmapRequest& v)
195  {
196  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
197  {
198  const std::vector<size_t> fo = rd->fieldOrder();
199 
200  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
201  {
202  switch (*it)
203  {
204  case 0:
205  ::avro::decode(d, v.tableNames);
206  break;
207 
208  case 1:
209  ::avro::decode(d, v.xColumnName);
210  break;
211 
212  case 2:
213  ::avro::decode(d, v.yColumnName);
214  break;
215 
216  case 3:
217  ::avro::decode(d, v.valueColumnName);
218  break;
219 
220  case 4:
221  ::avro::decode(d, v.geometryColumnName);
222  break;
223 
224  case 5:
225  ::avro::decode(d, v.minX);
226  break;
227 
228  case 6:
229  ::avro::decode(d, v.maxX);
230  break;
231 
232  case 7:
233  ::avro::decode(d, v.minY);
234  break;
235 
236  case 8:
237  ::avro::decode(d, v.maxY);
238  break;
239 
240  case 9:
241  ::avro::decode(d, v.width);
242  break;
243 
244  case 10:
245  ::avro::decode(d, v.height);
246  break;
247 
248  case 11:
249  ::avro::decode(d, v.projection);
250  break;
251 
252  case 12:
253  ::avro::decode(d, v.styleOptions);
254  break;
255 
256  case 13:
257  ::avro::decode(d, v.options);
258  break;
259 
260  default:
261  break;
262  }
263  }
264  }
265  else
266  {
267  ::avro::decode(d, v.tableNames);
268  ::avro::decode(d, v.xColumnName);
269  ::avro::decode(d, v.yColumnName);
270  ::avro::decode(d, v.valueColumnName);
271  ::avro::decode(d, v.geometryColumnName);
272  ::avro::decode(d, v.minX);
273  ::avro::decode(d, v.maxX);
274  ::avro::decode(d, v.minY);
275  ::avro::decode(d, v.maxY);
276  ::avro::decode(d, v.width);
277  ::avro::decode(d, v.height);
278  ::avro::decode(d, v.projection);
279  ::avro::decode(d, v.styleOptions);
280  ::avro::decode(d, v.options);
281  }
282  }
283  };
284 }
285 
290 namespace gpudb
291 {
292 
299  struct VisualizeImageHeatmapResponse
300  {
301 
307  VisualizeImageHeatmapResponse() :
308  width(int32_t()),
309  height(int32_t()),
310  bgColor(int64_t()),
311  imageData(std::vector<uint8_t>())
312  {
313  }
314 
319  int32_t width;
320  int32_t height;
321  int64_t bgColor;
322  std::vector<uint8_t> imageData;
323  };
324 }
325 
330 namespace avro
331 {
332  template<> struct codec_traits<gpudb::VisualizeImageHeatmapResponse>
333  {
334  static void encode(Encoder& e, const gpudb::VisualizeImageHeatmapResponse& v)
335  {
336  ::avro::encode(e, v.width);
337  ::avro::encode(e, v.height);
338  ::avro::encode(e, v.bgColor);
339  ::avro::encode(e, v.imageData);
340  }
341 
342  static void decode(Decoder& d, gpudb::VisualizeImageHeatmapResponse& v)
343  {
344  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
345  {
346  const std::vector<size_t> fo = rd->fieldOrder();
347 
348  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
349  {
350  switch (*it)
351  {
352  case 0:
353  ::avro::decode(d, v.width);
354  break;
355 
356  case 1:
357  ::avro::decode(d, v.height);
358  break;
359 
360  case 2:
361  ::avro::decode(d, v.bgColor);
362  break;
363 
364  case 3:
365  ::avro::decode(d, v.imageData);
366  break;
367 
368  default:
369  break;
370  }
371  }
372  }
373  else
374  {
375  ::avro::decode(d, v.width);
376  ::avro::decode(d, v.height);
377  ::avro::decode(d, v.bgColor);
378  ::avro::decode(d, v.imageData);
379  }
380  }
381  };
382 }
383 
384 #endif