GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
visualize_get_feature_info.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_GET_FEATURE_INFO_H__
7 #define __VISUALIZE_GET_FEATURE_INFO_H__
8 
9 namespace gpudb
10 {
11 
18  struct VisualizeGetFeatureInfoRequest
19  {
20 
26  VisualizeGetFeatureInfoRequest() :
27  tableNames(std::vector<std::string>()),
28  xColumnNames(std::vector<std::string>()),
29  yColumnNames(std::vector<std::string>()),
30  geometryColumnNames(std::vector<std::string>()),
31  queryColumnNames(std::vector<std::vector<std::string> >()),
32  projection(std::string()),
33  minX(double()),
34  maxX(double()),
35  minY(double()),
36  maxY(double()),
37  width(int32_t()),
38  height(int32_t()),
39  x(int32_t()),
40  y(int32_t()),
41  radius(int32_t()),
42  limit(int64_t()),
43  encoding(std::string()),
44  options(std::map<std::string, std::string>())
45  {
46  }
47 
101  VisualizeGetFeatureInfoRequest(const std::vector<std::string>& tableNames_, const std::vector<std::string>& xColumnNames_, const std::vector<std::string>& yColumnNames_, const std::vector<std::string>& geometryColumnNames_, const std::vector<std::vector<std::string> >& queryColumnNames_, const std::string& projection_, const double minX_, const double maxX_, const double minY_, const double maxY_, const int32_t width_, const int32_t height_, const int32_t x_, const int32_t y_, const int32_t radius_, const int64_t limit_, const std::string& encoding_, const std::map<std::string, std::string>& options_):
102  tableNames( tableNames_ ),
103  xColumnNames( xColumnNames_ ),
104  yColumnNames( yColumnNames_ ),
105  geometryColumnNames( geometryColumnNames_ ),
106  queryColumnNames( queryColumnNames_ ),
107  projection( projection_ ),
108  minX( minX_ ),
109  maxX( maxX_ ),
110  minY( minY_ ),
111  maxY( maxY_ ),
112  width( width_ ),
113  height( height_ ),
114  x( x_ ),
115  y( y_ ),
116  radius( radius_ ),
117  limit( limit_ ),
118  encoding( encoding_ ),
119  options( options_ )
120  {
121  }
122 
123  std::vector<std::string> tableNames;
124  std::vector<std::string> xColumnNames;
125  std::vector<std::string> yColumnNames;
126  std::vector<std::string> geometryColumnNames;
127  std::vector<std::vector<std::string> > queryColumnNames;
128  std::string projection;
129  double minX;
130  double maxX;
131  double minY;
132  double maxY;
133  int32_t width;
134  int32_t height;
135  int32_t x;
136  int32_t y;
137  int32_t radius;
138  int64_t limit;
139  std::string encoding;
140  std::map<std::string, std::string> options;
141  };
142 }
143 
148 namespace avro
149 {
150  template<> struct codec_traits<gpudb::VisualizeGetFeatureInfoRequest>
151  {
152  static void encode(Encoder& e, const gpudb::VisualizeGetFeatureInfoRequest& v)
153  {
154  ::avro::encode(e, v.tableNames);
155  ::avro::encode(e, v.xColumnNames);
156  ::avro::encode(e, v.yColumnNames);
157  ::avro::encode(e, v.geometryColumnNames);
158  ::avro::encode(e, v.queryColumnNames);
159  ::avro::encode(e, v.projection);
160  ::avro::encode(e, v.minX);
161  ::avro::encode(e, v.maxX);
162  ::avro::encode(e, v.minY);
163  ::avro::encode(e, v.maxY);
164  ::avro::encode(e, v.width);
165  ::avro::encode(e, v.height);
166  ::avro::encode(e, v.x);
167  ::avro::encode(e, v.y);
168  ::avro::encode(e, v.radius);
169  ::avro::encode(e, v.limit);
170  ::avro::encode(e, v.encoding);
171  ::avro::encode(e, v.options);
172  }
173 
174  static void decode(Decoder& d, gpudb::VisualizeGetFeatureInfoRequest& v)
175  {
176  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
177  {
178  const std::vector<size_t> fo = rd->fieldOrder();
179 
180  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
181  {
182  switch (*it)
183  {
184  case 0:
185  ::avro::decode(d, v.tableNames);
186  break;
187 
188  case 1:
189  ::avro::decode(d, v.xColumnNames);
190  break;
191 
192  case 2:
193  ::avro::decode(d, v.yColumnNames);
194  break;
195 
196  case 3:
197  ::avro::decode(d, v.geometryColumnNames);
198  break;
199 
200  case 4:
201  ::avro::decode(d, v.queryColumnNames);
202  break;
203 
204  case 5:
205  ::avro::decode(d, v.projection);
206  break;
207 
208  case 6:
209  ::avro::decode(d, v.minX);
210  break;
211 
212  case 7:
213  ::avro::decode(d, v.maxX);
214  break;
215 
216  case 8:
217  ::avro::decode(d, v.minY);
218  break;
219 
220  case 9:
221  ::avro::decode(d, v.maxY);
222  break;
223 
224  case 10:
225  ::avro::decode(d, v.width);
226  break;
227 
228  case 11:
229  ::avro::decode(d, v.height);
230  break;
231 
232  case 12:
233  ::avro::decode(d, v.x);
234  break;
235 
236  case 13:
237  ::avro::decode(d, v.y);
238  break;
239 
240  case 14:
241  ::avro::decode(d, v.radius);
242  break;
243 
244  case 15:
245  ::avro::decode(d, v.limit);
246  break;
247 
248  case 16:
249  ::avro::decode(d, v.encoding);
250  break;
251 
252  case 17:
253  ::avro::decode(d, v.options);
254  break;
255 
256  default:
257  break;
258  }
259  }
260  }
261  else
262  {
263  ::avro::decode(d, v.tableNames);
264  ::avro::decode(d, v.xColumnNames);
265  ::avro::decode(d, v.yColumnNames);
266  ::avro::decode(d, v.geometryColumnNames);
267  ::avro::decode(d, v.queryColumnNames);
268  ::avro::decode(d, v.projection);
269  ::avro::decode(d, v.minX);
270  ::avro::decode(d, v.maxX);
271  ::avro::decode(d, v.minY);
272  ::avro::decode(d, v.maxY);
273  ::avro::decode(d, v.width);
274  ::avro::decode(d, v.height);
275  ::avro::decode(d, v.x);
276  ::avro::decode(d, v.y);
277  ::avro::decode(d, v.radius);
278  ::avro::decode(d, v.limit);
279  ::avro::decode(d, v.encoding);
280  ::avro::decode(d, v.options);
281  }
282  }
283  };
284 }
285 
286 namespace gpudb
287 {
288 
295  struct VisualizeGetFeatureInfoResponse
296  {
297 
303  VisualizeGetFeatureInfoResponse() :
304  tableNames(std::vector<std::string>()),
305  typeSchemas(std::vector<std::string>()),
306  recordsBinary(std::vector<std::vector<uint8_t> >()),
307  recordsJson(std::vector<std::string>()),
308  geojsonEncodedResponse(std::string()),
309  textEncodedResponse(std::string()),
310  info(std::map<std::string, std::string>())
311  {
312  }
313 
314  std::vector<std::string> tableNames;
315  std::vector<std::string> typeSchemas;
316  std::vector<std::vector<uint8_t> > recordsBinary;
317  std::vector<std::string> recordsJson;
318  std::string geojsonEncodedResponse;
319  std::string textEncodedResponse;
320  std::map<std::string, std::string> info;
321  };
322 }
323 
328 namespace avro
329 {
330  template<> struct codec_traits<gpudb::VisualizeGetFeatureInfoResponse>
331  {
332  static void encode(Encoder& e, const gpudb::VisualizeGetFeatureInfoResponse& v)
333  {
334  ::avro::encode(e, v.tableNames);
335  ::avro::encode(e, v.typeSchemas);
336  ::avro::encode(e, v.recordsBinary);
337  ::avro::encode(e, v.recordsJson);
338  ::avro::encode(e, v.geojsonEncodedResponse);
339  ::avro::encode(e, v.textEncodedResponse);
340  ::avro::encode(e, v.info);
341  }
342 
343  static void decode(Decoder& d, gpudb::VisualizeGetFeatureInfoResponse& v)
344  {
345  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
346  {
347  const std::vector<size_t> fo = rd->fieldOrder();
348 
349  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
350  {
351  switch (*it)
352  {
353  case 0:
354  ::avro::decode(d, v.tableNames);
355  break;
356 
357  case 1:
358  ::avro::decode(d, v.typeSchemas);
359  break;
360 
361  case 2:
362  ::avro::decode(d, v.recordsBinary);
363  break;
364 
365  case 3:
366  ::avro::decode(d, v.recordsJson);
367  break;
368 
369  case 4:
370  ::avro::decode(d, v.geojsonEncodedResponse);
371  break;
372 
373  case 5:
374  ::avro::decode(d, v.textEncodedResponse);
375  break;
376 
377  case 6:
378  ::avro::decode(d, v.info);
379  break;
380 
381  default:
382  break;
383  }
384  }
385  }
386  else
387  {
388  ::avro::decode(d, v.tableNames);
389  ::avro::decode(d, v.typeSchemas);
390  ::avro::decode(d, v.recordsBinary);
391  ::avro::decode(d, v.recordsJson);
392  ::avro::decode(d, v.geojsonEncodedResponse);
393  ::avro::decode(d, v.textEncodedResponse);
394  ::avro::decode(d, v.info);
395  }
396  }
397  };
398 }
399 
400 #endif