GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 
125  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_):
126  tableNames( tableNames_ ),
127  xColumnName( xColumnName_ ),
128  yColumnName( yColumnName_ ),
129  minX( minX_ ),
130  maxX( maxX_ ),
131  minY( minY_ ),
132  maxY( maxY_ ),
133  timeIntervals( timeIntervals_ ),
134  width( width_ ),
135  height( height_ ),
136  projection( projection_ ),
137  videoStyle( videoStyle_ ),
138  sessionKey( sessionKey_ ),
139  styleOptions( styleOptions_ ),
140  options( options_ )
141  {
142  }
143 
148  std::vector<std::string> tableNames;
149  std::string xColumnName;
150  std::string yColumnName;
151  double minX;
152  double maxX;
153  double minY;
154  double maxY;
155  std::vector<std::vector<double> > timeIntervals;
156  int32_t width;
157  int32_t height;
158  std::string projection;
159  std::string videoStyle;
160  std::string sessionKey;
161  std::map<std::string, std::string> styleOptions;
162  std::map<std::string, std::string> options;
163  };
164 }
165 
170 namespace avro
171 {
172  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapRequest>
173  {
174  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapRequest& v)
175  {
176  ::avro::encode(e, v.tableNames);
177  ::avro::encode(e, v.xColumnName);
178  ::avro::encode(e, v.yColumnName);
179  ::avro::encode(e, v.minX);
180  ::avro::encode(e, v.maxX);
181  ::avro::encode(e, v.minY);
182  ::avro::encode(e, v.maxY);
183  ::avro::encode(e, v.timeIntervals);
184  ::avro::encode(e, v.width);
185  ::avro::encode(e, v.height);
186  ::avro::encode(e, v.projection);
187  ::avro::encode(e, v.videoStyle);
188  ::avro::encode(e, v.sessionKey);
189  ::avro::encode(e, v.styleOptions);
190  ::avro::encode(e, v.options);
191  }
192 
193  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapRequest& v)
194  {
195  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
196  {
197  const std::vector<size_t> fo = rd->fieldOrder();
198 
199  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
200  {
201  switch (*it)
202  {
203  case 0:
204  ::avro::decode(d, v.tableNames);
205  break;
206 
207  case 1:
208  ::avro::decode(d, v.xColumnName);
209  break;
210 
211  case 2:
212  ::avro::decode(d, v.yColumnName);
213  break;
214 
215  case 3:
216  ::avro::decode(d, v.minX);
217  break;
218 
219  case 4:
220  ::avro::decode(d, v.maxX);
221  break;
222 
223  case 5:
224  ::avro::decode(d, v.minY);
225  break;
226 
227  case 6:
228  ::avro::decode(d, v.maxY);
229  break;
230 
231  case 7:
232  ::avro::decode(d, v.timeIntervals);
233  break;
234 
235  case 8:
236  ::avro::decode(d, v.width);
237  break;
238 
239  case 9:
240  ::avro::decode(d, v.height);
241  break;
242 
243  case 10:
244  ::avro::decode(d, v.projection);
245  break;
246 
247  case 11:
248  ::avro::decode(d, v.videoStyle);
249  break;
250 
251  case 12:
252  ::avro::decode(d, v.sessionKey);
253  break;
254 
255  case 13:
256  ::avro::decode(d, v.styleOptions);
257  break;
258 
259  case 14:
260  ::avro::decode(d, v.options);
261  break;
262 
263  default:
264  break;
265  }
266  }
267  }
268  else
269  {
270  ::avro::decode(d, v.tableNames);
271  ::avro::decode(d, v.xColumnName);
272  ::avro::decode(d, v.yColumnName);
273  ::avro::decode(d, v.minX);
274  ::avro::decode(d, v.maxX);
275  ::avro::decode(d, v.minY);
276  ::avro::decode(d, v.maxY);
277  ::avro::decode(d, v.timeIntervals);
278  ::avro::decode(d, v.width);
279  ::avro::decode(d, v.height);
280  ::avro::decode(d, v.projection);
281  ::avro::decode(d, v.videoStyle);
282  ::avro::decode(d, v.sessionKey);
283  ::avro::decode(d, v.styleOptions);
284  ::avro::decode(d, v.options);
285  }
286  }
287  };
288 }
289 
294 namespace gpudb
295 {
296 
303  struct VisualizeVideoHeatmapResponse
304  {
305 
311  VisualizeVideoHeatmapResponse() :
312  width(double()),
313  height(double()),
314  bgColor(int64_t()),
315  numFrames(int32_t()),
316  sessionKey(std::string()),
317  data(std::vector<std::vector<uint8_t> >())
318  {
319  }
320 
325  double width;
326  double height;
327  int64_t bgColor;
328  int32_t numFrames;
329  std::string sessionKey;
330  std::vector<std::vector<uint8_t> > data;
331  };
332 }
333 
338 namespace avro
339 {
340  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapResponse>
341  {
342  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapResponse& v)
343  {
344  ::avro::encode(e, v.width);
345  ::avro::encode(e, v.height);
346  ::avro::encode(e, v.bgColor);
347  ::avro::encode(e, v.numFrames);
348  ::avro::encode(e, v.sessionKey);
349  ::avro::encode(e, v.data);
350  }
351 
352  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapResponse& v)
353  {
354  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
355  {
356  const std::vector<size_t> fo = rd->fieldOrder();
357 
358  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
359  {
360  switch (*it)
361  {
362  case 0:
363  ::avro::decode(d, v.width);
364  break;
365 
366  case 1:
367  ::avro::decode(d, v.height);
368  break;
369 
370  case 2:
371  ::avro::decode(d, v.bgColor);
372  break;
373 
374  case 3:
375  ::avro::decode(d, v.numFrames);
376  break;
377 
378  case 4:
379  ::avro::decode(d, v.sessionKey);
380  break;
381 
382  case 5:
383  ::avro::decode(d, v.data);
384  break;
385 
386  default:
387  break;
388  }
389  }
390  }
391  else
392  {
393  ::avro::decode(d, v.width);
394  ::avro::decode(d, v.height);
395  ::avro::decode(d, v.bgColor);
396  ::avro::decode(d, v.numFrames);
397  ::avro::decode(d, v.sessionKey);
398  ::avro::decode(d, v.data);
399  }
400  }
401  };
402 }
403 
404 #endif