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