GPUdb C++ API  Version 6.1.0.0
visualize_video_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_VIDEO_HEATMAP_H__
7 #define __VISUALIZE_VIDEO_HEATMAP_H__
8 
13 namespace gpudb
14 {
15 
22  struct VisualizeVideoHeatmapRequest
23  {
24 
30  VisualizeVideoHeatmapRequest() :
31  tableNames(std::vector<std::string>()),
32  xColumnName(std::string()),
33  yColumnName(std::string()),
34  minX(double()),
35  maxX(double()),
36  minY(double()),
37  maxY(double()),
38  timeIntervals(std::vector<std::vector<double> >()),
39  width(int32_t()),
40  height(int32_t()),
41  projection(std::string()),
42  videoStyle(std::string()),
43  sessionKey(std::string()),
44  styleOptions(std::map<std::string, std::string>()),
45  options(std::map<std::string, std::string>())
46  {
47  }
48 
129  VisualizeVideoHeatmapRequest(const std::vector<std::string>& tableNames_, const std::string& xColumnName_, const std::string& yColumnName_, const double minX_, const double maxX_, const double minY_, const double maxY_, const std::vector<std::vector<double> >& timeIntervals_, const int32_t width_, const int32_t height_, const std::string& projection_, const std::string& videoStyle_, const std::string& sessionKey_, 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  minX( minX_ ),
134  maxX( maxX_ ),
135  minY( minY_ ),
136  maxY( maxY_ ),
137  timeIntervals( timeIntervals_ ),
138  width( width_ ),
139  height( height_ ),
140  projection( projection_ ),
141  videoStyle( videoStyle_ ),
142  sessionKey( sessionKey_ ),
143  styleOptions( styleOptions_ ),
144  options( options_ )
145  {
146  }
147 
152  std::vector<std::string> tableNames;
153  std::string xColumnName;
154  std::string yColumnName;
155  double minX;
156  double maxX;
157  double minY;
158  double maxY;
159  std::vector<std::vector<double> > timeIntervals;
160  int32_t width;
161  int32_t height;
162  std::string projection;
163  std::string videoStyle;
164  std::string sessionKey;
165  std::map<std::string, std::string> styleOptions;
166  std::map<std::string, std::string> options;
167  };
168 }
169 
174 namespace avro
175 {
176  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapRequest>
177  {
178  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapRequest& v)
179  {
180  ::avro::encode(e, v.tableNames);
181  ::avro::encode(e, v.xColumnName);
182  ::avro::encode(e, v.yColumnName);
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.timeIntervals);
188  ::avro::encode(e, v.width);
189  ::avro::encode(e, v.height);
190  ::avro::encode(e, v.projection);
191  ::avro::encode(e, v.videoStyle);
192  ::avro::encode(e, v.sessionKey);
193  ::avro::encode(e, v.styleOptions);
194  ::avro::encode(e, v.options);
195  }
196 
197  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapRequest& v)
198  {
199  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
200  {
201  const std::vector<size_t> fo = rd->fieldOrder();
202 
203  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
204  {
205  switch (*it)
206  {
207  case 0:
208  ::avro::decode(d, v.tableNames);
209  break;
210 
211  case 1:
212  ::avro::decode(d, v.xColumnName);
213  break;
214 
215  case 2:
216  ::avro::decode(d, v.yColumnName);
217  break;
218 
219  case 3:
220  ::avro::decode(d, v.minX);
221  break;
222 
223  case 4:
224  ::avro::decode(d, v.maxX);
225  break;
226 
227  case 5:
228  ::avro::decode(d, v.minY);
229  break;
230 
231  case 6:
232  ::avro::decode(d, v.maxY);
233  break;
234 
235  case 7:
236  ::avro::decode(d, v.timeIntervals);
237  break;
238 
239  case 8:
240  ::avro::decode(d, v.width);
241  break;
242 
243  case 9:
244  ::avro::decode(d, v.height);
245  break;
246 
247  case 10:
248  ::avro::decode(d, v.projection);
249  break;
250 
251  case 11:
252  ::avro::decode(d, v.videoStyle);
253  break;
254 
255  case 12:
256  ::avro::decode(d, v.sessionKey);
257  break;
258 
259  case 13:
260  ::avro::decode(d, v.styleOptions);
261  break;
262 
263  case 14:
264  ::avro::decode(d, v.options);
265  break;
266 
267  default:
268  break;
269  }
270  }
271  }
272  else
273  {
274  ::avro::decode(d, v.tableNames);
275  ::avro::decode(d, v.xColumnName);
276  ::avro::decode(d, v.yColumnName);
277  ::avro::decode(d, v.minX);
278  ::avro::decode(d, v.maxX);
279  ::avro::decode(d, v.minY);
280  ::avro::decode(d, v.maxY);
281  ::avro::decode(d, v.timeIntervals);
282  ::avro::decode(d, v.width);
283  ::avro::decode(d, v.height);
284  ::avro::decode(d, v.projection);
285  ::avro::decode(d, v.videoStyle);
286  ::avro::decode(d, v.sessionKey);
287  ::avro::decode(d, v.styleOptions);
288  ::avro::decode(d, v.options);
289  }
290  }
291  };
292 }
293 
298 namespace gpudb
299 {
300 
307  struct VisualizeVideoHeatmapResponse
308  {
309 
315  VisualizeVideoHeatmapResponse() :
316  width(double()),
317  height(double()),
318  bgColor(int64_t()),
319  numFrames(int32_t()),
320  sessionKey(std::string()),
321  data(std::vector<std::vector<uint8_t> >())
322  {
323  }
324 
329  double width;
330  double height;
331  int64_t bgColor;
332  int32_t numFrames;
333  std::string sessionKey;
334  std::vector<std::vector<uint8_t> > data;
335  };
336 }
337 
342 namespace avro
343 {
344  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapResponse>
345  {
346  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapResponse& v)
347  {
348  ::avro::encode(e, v.width);
349  ::avro::encode(e, v.height);
350  ::avro::encode(e, v.bgColor);
351  ::avro::encode(e, v.numFrames);
352  ::avro::encode(e, v.sessionKey);
353  ::avro::encode(e, v.data);
354  }
355 
356  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapResponse& v)
357  {
358  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
359  {
360  const std::vector<size_t> fo = rd->fieldOrder();
361 
362  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
363  {
364  switch (*it)
365  {
366  case 0:
367  ::avro::decode(d, v.width);
368  break;
369 
370  case 1:
371  ::avro::decode(d, v.height);
372  break;
373 
374  case 2:
375  ::avro::decode(d, v.bgColor);
376  break;
377 
378  case 3:
379  ::avro::decode(d, v.numFrames);
380  break;
381 
382  case 4:
383  ::avro::decode(d, v.sessionKey);
384  break;
385 
386  case 5:
387  ::avro::decode(d, v.data);
388  break;
389 
390  default:
391  break;
392  }
393  }
394  }
395  else
396  {
397  ::avro::decode(d, v.width);
398  ::avro::decode(d, v.height);
399  ::avro::decode(d, v.bgColor);
400  ::avro::decode(d, v.numFrames);
401  ::avro::decode(d, v.sessionKey);
402  ::avro::decode(d, v.data);
403  }
404  }
405  };
406 }
407 
408 #endif