GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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  minX(double()),
36  maxX(double()),
37  minY(double()),
38  maxY(double()),
39  width(int32_t()),
40  height(int32_t()),
41  projection(std::string()),
42  styleOptions(std::map<std::string, std::string>()),
43  options(std::map<std::string, std::string>())
44  {
45  }
46 
123  VisualizeImageHeatmapRequest(const std::vector<std::string>& tableNames_, const std::string& xColumnName_, const std::string& yColumnName_, const std::string& valueColumnName_, 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_):
124  tableNames( tableNames_ ),
125  xColumnName( xColumnName_ ),
126  yColumnName( yColumnName_ ),
127  valueColumnName( valueColumnName_ ),
128  minX( minX_ ),
129  maxX( maxX_ ),
130  minY( minY_ ),
131  maxY( maxY_ ),
132  width( width_ ),
133  height( height_ ),
134  projection( projection_ ),
135  styleOptions( styleOptions_ ),
136  options( options_ )
137  {
138  }
139 
144  std::vector<std::string> tableNames;
145  std::string xColumnName;
146  std::string yColumnName;
147  std::string valueColumnName;
148  double minX;
149  double maxX;
150  double minY;
151  double maxY;
152  int32_t width;
153  int32_t height;
154  std::string projection;
155  std::map<std::string, std::string> styleOptions;
156  std::map<std::string, std::string> options;
157  };
158 }
159 
164 namespace avro
165 {
166  template<> struct codec_traits<gpudb::VisualizeImageHeatmapRequest>
167  {
168  static void encode(Encoder& e, const gpudb::VisualizeImageHeatmapRequest& v)
169  {
170  ::avro::encode(e, v.tableNames);
171  ::avro::encode(e, v.xColumnName);
172  ::avro::encode(e, v.yColumnName);
173  ::avro::encode(e, v.valueColumnName);
174  ::avro::encode(e, v.minX);
175  ::avro::encode(e, v.maxX);
176  ::avro::encode(e, v.minY);
177  ::avro::encode(e, v.maxY);
178  ::avro::encode(e, v.width);
179  ::avro::encode(e, v.height);
180  ::avro::encode(e, v.projection);
181  ::avro::encode(e, v.styleOptions);
182  ::avro::encode(e, v.options);
183  }
184 
185  static void decode(Decoder& d, gpudb::VisualizeImageHeatmapRequest& v)
186  {
187  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
188  {
189  const std::vector<size_t> fo = rd->fieldOrder();
190 
191  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
192  {
193  switch (*it)
194  {
195  case 0:
196  ::avro::decode(d, v.tableNames);
197  break;
198 
199  case 1:
200  ::avro::decode(d, v.xColumnName);
201  break;
202 
203  case 2:
204  ::avro::decode(d, v.yColumnName);
205  break;
206 
207  case 3:
208  ::avro::decode(d, v.valueColumnName);
209  break;
210 
211  case 4:
212  ::avro::decode(d, v.minX);
213  break;
214 
215  case 5:
216  ::avro::decode(d, v.maxX);
217  break;
218 
219  case 6:
220  ::avro::decode(d, v.minY);
221  break;
222 
223  case 7:
224  ::avro::decode(d, v.maxY);
225  break;
226 
227  case 8:
228  ::avro::decode(d, v.width);
229  break;
230 
231  case 9:
232  ::avro::decode(d, v.height);
233  break;
234 
235  case 10:
236  ::avro::decode(d, v.projection);
237  break;
238 
239  case 11:
240  ::avro::decode(d, v.styleOptions);
241  break;
242 
243  case 12:
244  ::avro::decode(d, v.options);
245  break;
246 
247  default:
248  break;
249  }
250  }
251  }
252  else
253  {
254  ::avro::decode(d, v.tableNames);
255  ::avro::decode(d, v.xColumnName);
256  ::avro::decode(d, v.yColumnName);
257  ::avro::decode(d, v.valueColumnName);
258  ::avro::decode(d, v.minX);
259  ::avro::decode(d, v.maxX);
260  ::avro::decode(d, v.minY);
261  ::avro::decode(d, v.maxY);
262  ::avro::decode(d, v.width);
263  ::avro::decode(d, v.height);
264  ::avro::decode(d, v.projection);
265  ::avro::decode(d, v.styleOptions);
266  ::avro::decode(d, v.options);
267  }
268  }
269  };
270 }
271 
276 namespace gpudb
277 {
278 
285  struct VisualizeImageHeatmapResponse
286  {
287 
293  VisualizeImageHeatmapResponse() :
294  width(int32_t()),
295  height(int32_t()),
296  bgColor(int64_t()),
297  imageData(std::vector<uint8_t>())
298  {
299  }
300 
305  int32_t width;
306  int32_t height;
307  int64_t bgColor;
308  std::vector<uint8_t> imageData;
309  };
310 }
311 
316 namespace avro
317 {
318  template<> struct codec_traits<gpudb::VisualizeImageHeatmapResponse>
319  {
320  static void encode(Encoder& e, const gpudb::VisualizeImageHeatmapResponse& v)
321  {
322  ::avro::encode(e, v.width);
323  ::avro::encode(e, v.height);
324  ::avro::encode(e, v.bgColor);
325  ::avro::encode(e, v.imageData);
326  }
327 
328  static void decode(Decoder& d, gpudb::VisualizeImageHeatmapResponse& v)
329  {
330  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
331  {
332  const std::vector<size_t> fo = rd->fieldOrder();
333 
334  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
335  {
336  switch (*it)
337  {
338  case 0:
339  ::avro::decode(d, v.width);
340  break;
341 
342  case 1:
343  ::avro::decode(d, v.height);
344  break;
345 
346  case 2:
347  ::avro::decode(d, v.bgColor);
348  break;
349 
350  case 3:
351  ::avro::decode(d, v.imageData);
352  break;
353 
354  default:
355  break;
356  }
357  }
358  }
359  else
360  {
361  ::avro::decode(d, v.width);
362  ::avro::decode(d, v.height);
363  ::avro::decode(d, v.bgColor);
364  ::avro::decode(d, v.imageData);
365  }
366  }
367  };
368 }
369 
370 #endif