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