GPUdb C++ API  Version 7.2.2.4
visualize_image.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __VISUALIZE_IMAGE_H__
7 #define __VISUALIZE_IMAGE_H__
8 
9 namespace gpudb
10 {
12  struct VisualizeImageRequest
13  {
14  VisualizeImageRequest() :
15  tableNames(std::vector<std::string>()),
16  worldTableNames(std::vector<std::string>()),
17  xColumnName(std::string()),
18  yColumnName(std::string()),
19  symbolColumnName(std::string()),
20  geometryColumnName(std::string()),
21  trackIds(std::vector<std::vector<std::string> >()),
22  minX(double()),
23  maxX(double()),
24  minY(double()),
25  maxY(double()),
26  width(int32_t()),
27  height(int32_t()),
28  projection(std::string()),
29  bgColor(int64_t()),
30  styleOptions(std::map<std::string, std::vector<std::string> >()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
35  VisualizeImageRequest(const std::vector<std::string>& tableNames_, const std::vector<std::string>& worldTableNames_, const std::string& xColumnName_, const std::string& yColumnName_, const std::string& symbolColumnName_, const std::string& geometryColumnName_, const std::vector<std::vector<std::string> >& trackIds_, 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 int64_t bgColor_, const std::map<std::string, std::vector<std::string> >& styleOptions_, const std::map<std::string, std::string>& options_):
36  tableNames( tableNames_ ),
37  worldTableNames( worldTableNames_ ),
38  xColumnName( xColumnName_ ),
39  yColumnName( yColumnName_ ),
40  symbolColumnName( symbolColumnName_ ),
41  geometryColumnName( geometryColumnName_ ),
42  trackIds( trackIds_ ),
43  minX( minX_ ),
44  maxX( maxX_ ),
45  minY( minY_ ),
46  maxY( maxY_ ),
47  width( width_ ),
48  height( height_ ),
49  projection( projection_ ),
50  bgColor( bgColor_ ),
51  styleOptions( styleOptions_ ),
52  options( options_ )
53  {
54  }
55 
56  std::vector<std::string> tableNames;
57  std::vector<std::string> worldTableNames;
58  std::string xColumnName;
59  std::string yColumnName;
60  std::string symbolColumnName;
61  std::string geometryColumnName;
62  std::vector<std::vector<std::string> > trackIds;
63  double minX;
64  double maxX;
65  double minY;
66  double maxY;
67  int32_t width;
68  int32_t height;
69  std::string projection;
70  int64_t bgColor;
71  std::map<std::string, std::vector<std::string> > styleOptions;
72  std::map<std::string, std::string> options;
73  };
74 } // end namespace gpudb
75 
76 namespace avro
77 {
78  template<> struct codec_traits<gpudb::VisualizeImageRequest>
79  {
80  static void encode(Encoder& e, const gpudb::VisualizeImageRequest& v)
81  {
82  ::avro::encode(e, v.tableNames);
83  ::avro::encode(e, v.worldTableNames);
84  ::avro::encode(e, v.xColumnName);
85  ::avro::encode(e, v.yColumnName);
86  ::avro::encode(e, v.symbolColumnName);
87  ::avro::encode(e, v.geometryColumnName);
88  ::avro::encode(e, v.trackIds);
89  ::avro::encode(e, v.minX);
90  ::avro::encode(e, v.maxX);
91  ::avro::encode(e, v.minY);
92  ::avro::encode(e, v.maxY);
93  ::avro::encode(e, v.width);
94  ::avro::encode(e, v.height);
95  ::avro::encode(e, v.projection);
96  ::avro::encode(e, v.bgColor);
97  ::avro::encode(e, v.styleOptions);
98  ::avro::encode(e, v.options);
99  }
100 
101  static void decode(Decoder& d, gpudb::VisualizeImageRequest& v)
102  {
103  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
104  {
105  const std::vector<size_t> fo = rd->fieldOrder();
106 
107  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
108  {
109  switch (*it)
110  {
111  case 0:
112  ::avro::decode(d, v.tableNames);
113  break;
114 
115  case 1:
116  ::avro::decode(d, v.worldTableNames);
117  break;
118 
119  case 2:
120  ::avro::decode(d, v.xColumnName);
121  break;
122 
123  case 3:
124  ::avro::decode(d, v.yColumnName);
125  break;
126 
127  case 4:
128  ::avro::decode(d, v.symbolColumnName);
129  break;
130 
131  case 5:
132  ::avro::decode(d, v.geometryColumnName);
133  break;
134 
135  case 6:
136  ::avro::decode(d, v.trackIds);
137  break;
138 
139  case 7:
140  ::avro::decode(d, v.minX);
141  break;
142 
143  case 8:
144  ::avro::decode(d, v.maxX);
145  break;
146 
147  case 9:
148  ::avro::decode(d, v.minY);
149  break;
150 
151  case 10:
152  ::avro::decode(d, v.maxY);
153  break;
154 
155  case 11:
156  ::avro::decode(d, v.width);
157  break;
158 
159  case 12:
160  ::avro::decode(d, v.height);
161  break;
162 
163  case 13:
164  ::avro::decode(d, v.projection);
165  break;
166 
167  case 14:
168  ::avro::decode(d, v.bgColor);
169  break;
170 
171  case 15:
172  ::avro::decode(d, v.styleOptions);
173  break;
174 
175  case 16:
176  ::avro::decode(d, v.options);
177  break;
178 
179  default:
180  break;
181  }
182  }
183  }
184  else
185  {
186  ::avro::decode(d, v.tableNames);
187  ::avro::decode(d, v.worldTableNames);
188  ::avro::decode(d, v.xColumnName);
189  ::avro::decode(d, v.yColumnName);
190  ::avro::decode(d, v.symbolColumnName);
191  ::avro::decode(d, v.geometryColumnName);
192  ::avro::decode(d, v.trackIds);
193  ::avro::decode(d, v.minX);
194  ::avro::decode(d, v.maxX);
195  ::avro::decode(d, v.minY);
196  ::avro::decode(d, v.maxY);
197  ::avro::decode(d, v.width);
198  ::avro::decode(d, v.height);
199  ::avro::decode(d, v.projection);
200  ::avro::decode(d, v.bgColor);
201  ::avro::decode(d, v.styleOptions);
202  ::avro::decode(d, v.options);
203  }
204  }
205  };
206 } // end namespace avro
207 
208 namespace gpudb
209 {
211  struct VisualizeImageResponse
212  {
213  VisualizeImageResponse() :
214  width(double()),
215  height(double()),
216  bgColor(int64_t()),
217  imageData(std::vector<uint8_t>()),
218  info(std::map<std::string, std::string>())
219  {
220  }
221 
222  double width;
223  double height;
224  int64_t bgColor;
225  std::vector<uint8_t> imageData;
226  std::map<std::string, std::string> info;
227  };
228 } // end namespace gpudb
229 
230 namespace avro
231 {
232  template<> struct codec_traits<gpudb::VisualizeImageResponse>
233  {
234  static void encode(Encoder& e, const gpudb::VisualizeImageResponse& v)
235  {
236  ::avro::encode(e, v.width);
237  ::avro::encode(e, v.height);
238  ::avro::encode(e, v.bgColor);
239  ::avro::encode(e, v.imageData);
240  ::avro::encode(e, v.info);
241  }
242 
243  static void decode(Decoder& d, gpudb::VisualizeImageResponse& v)
244  {
245  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
246  {
247  const std::vector<size_t> fo = rd->fieldOrder();
248 
249  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
250  {
251  switch (*it)
252  {
253  case 0:
254  ::avro::decode(d, v.width);
255  break;
256 
257  case 1:
258  ::avro::decode(d, v.height);
259  break;
260 
261  case 2:
262  ::avro::decode(d, v.bgColor);
263  break;
264 
265  case 3:
266  ::avro::decode(d, v.imageData);
267  break;
268 
269  case 4:
270  ::avro::decode(d, v.info);
271  break;
272 
273  default:
274  break;
275  }
276  }
277  }
278  else
279  {
280  ::avro::decode(d, v.width);
281  ::avro::decode(d, v.height);
282  ::avro::decode(d, v.bgColor);
283  ::avro::decode(d, v.imageData);
284  ::avro::decode(d, v.info);
285  }
286  }
287  };
288 } // end namespace avro
289 
290 #endif // __VISUALIZE_IMAGE_H__