GPUdb C++ API  Version 5.2.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 
83  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):
84  tableNames(tableNames),
85  xColumnName(xColumnName),
86  yColumnName(yColumnName),
87  minX(minX),
88  maxX(maxX),
89  minY(minY),
90  maxY(maxY),
91  timeIntervals(timeIntervals),
92  width(width),
93  height(height),
94  projection(projection),
95  videoStyle(videoStyle),
96  sessionKey(sessionKey),
97  styleOptions(styleOptions),
98  options(options)
99  {
100  }
101 
106  std::vector<std::string> tableNames;
107  std::string xColumnName;
108  std::string yColumnName;
109  double minX;
110  double maxX;
111  double minY;
112  double maxY;
113  std::vector<std::vector<double> > timeIntervals;
114  int32_t width;
115  int32_t height;
116  std::string projection;
117  std::string videoStyle;
118  std::string sessionKey;
119  std::map<std::string, std::string> styleOptions;
120  std::map<std::string, std::string> options;
121  };
122 }
123 
128 namespace avro
129 {
130  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapRequest>
131  {
132  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapRequest& v)
133  {
134  ::avro::encode(e, v.tableNames);
135  ::avro::encode(e, v.xColumnName);
136  ::avro::encode(e, v.yColumnName);
137  ::avro::encode(e, v.minX);
138  ::avro::encode(e, v.maxX);
139  ::avro::encode(e, v.minY);
140  ::avro::encode(e, v.maxY);
141  ::avro::encode(e, v.timeIntervals);
142  ::avro::encode(e, v.width);
143  ::avro::encode(e, v.height);
144  ::avro::encode(e, v.projection);
145  ::avro::encode(e, v.videoStyle);
146  ::avro::encode(e, v.sessionKey);
147  ::avro::encode(e, v.styleOptions);
148  ::avro::encode(e, v.options);
149  }
150 
151  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapRequest& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.tableNames);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.xColumnName);
167  break;
168 
169  case 2:
170  ::avro::decode(d, v.yColumnName);
171  break;
172 
173  case 3:
174  ::avro::decode(d, v.minX);
175  break;
176 
177  case 4:
178  ::avro::decode(d, v.maxX);
179  break;
180 
181  case 5:
182  ::avro::decode(d, v.minY);
183  break;
184 
185  case 6:
186  ::avro::decode(d, v.maxY);
187  break;
188 
189  case 7:
190  ::avro::decode(d, v.timeIntervals);
191  break;
192 
193  case 8:
194  ::avro::decode(d, v.width);
195  break;
196 
197  case 9:
198  ::avro::decode(d, v.height);
199  break;
200 
201  case 10:
202  ::avro::decode(d, v.projection);
203  break;
204 
205  case 11:
206  ::avro::decode(d, v.videoStyle);
207  break;
208 
209  case 12:
210  ::avro::decode(d, v.sessionKey);
211  break;
212 
213  case 13:
214  ::avro::decode(d, v.styleOptions);
215  break;
216 
217  case 14:
218  ::avro::decode(d, v.options);
219  break;
220 
221  default:
222  break;
223  }
224  }
225  }
226  else
227  {
228  ::avro::decode(d, v.tableNames);
229  ::avro::decode(d, v.xColumnName);
230  ::avro::decode(d, v.yColumnName);
231  ::avro::decode(d, v.minX);
232  ::avro::decode(d, v.maxX);
233  ::avro::decode(d, v.minY);
234  ::avro::decode(d, v.maxY);
235  ::avro::decode(d, v.timeIntervals);
236  ::avro::decode(d, v.width);
237  ::avro::decode(d, v.height);
238  ::avro::decode(d, v.projection);
239  ::avro::decode(d, v.videoStyle);
240  ::avro::decode(d, v.sessionKey);
241  ::avro::decode(d, v.styleOptions);
242  ::avro::decode(d, v.options);
243  }
244  }
245  };
246 }
247 
252 namespace gpudb
253 {
254 
261  struct VisualizeVideoHeatmapResponse
262  {
263 
269  VisualizeVideoHeatmapResponse() :
270  width(double()),
271  height(double()),
272  bgColor(int64_t()),
273  numFrames(int32_t()),
274  sessionKey(std::string()),
275  data(std::vector<std::vector<uint8_t> >())
276  {
277  }
278 
283  double width;
284  double height;
285  int64_t bgColor;
286  int32_t numFrames;
287  std::string sessionKey;
288  std::vector<std::vector<uint8_t> > data;
289  };
290 }
291 
296 namespace avro
297 {
298  template<> struct codec_traits<gpudb::VisualizeVideoHeatmapResponse>
299  {
300  static void encode(Encoder& e, const gpudb::VisualizeVideoHeatmapResponse& v)
301  {
302  ::avro::encode(e, v.width);
303  ::avro::encode(e, v.height);
304  ::avro::encode(e, v.bgColor);
305  ::avro::encode(e, v.numFrames);
306  ::avro::encode(e, v.sessionKey);
307  ::avro::encode(e, v.data);
308  }
309 
310  static void decode(Decoder& d, gpudb::VisualizeVideoHeatmapResponse& v)
311  {
312  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
313  {
314  const std::vector<size_t> fo = rd->fieldOrder();
315 
316  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
317  {
318  switch (*it)
319  {
320  case 0:
321  ::avro::decode(d, v.width);
322  break;
323 
324  case 1:
325  ::avro::decode(d, v.height);
326  break;
327 
328  case 2:
329  ::avro::decode(d, v.bgColor);
330  break;
331 
332  case 3:
333  ::avro::decode(d, v.numFrames);
334  break;
335 
336  case 4:
337  ::avro::decode(d, v.sessionKey);
338  break;
339 
340  case 5:
341  ::avro::decode(d, v.data);
342  break;
343 
344  default:
345  break;
346  }
347  }
348  }
349  else
350  {
351  ::avro::decode(d, v.width);
352  ::avro::decode(d, v.height);
353  ::avro::decode(d, v.bgColor);
354  ::avro::decode(d, v.numFrames);
355  ::avro::decode(d, v.sessionKey);
356  ::avro::decode(d, v.data);
357  }
358  }
359  };
360 }
361 
362 #endif