6 #ifndef __VISUALIZE_IMAGE_CLASSBREAK_H__ 7 #define __VISUALIZE_IMAGE_CLASSBREAK_H__ 12 struct VisualizeImageClassbreakRequest
14 VisualizeImageClassbreakRequest() :
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 cbAttr(std::string()),
23 cbVals(std::vector<std::string>()),
24 cbPointcolorAttr(std::string()),
25 cbPointcolorVals(std::vector<std::string>()),
26 cbPointalphaAttr(std::string()),
27 cbPointalphaVals(std::vector<std::string>()),
28 cbPointsizeAttr(std::string()),
29 cbPointsizeVals(std::vector<std::string>()),
30 cbPointshapeAttr(std::string()),
31 cbPointshapeVals(std::vector<std::string>()),
38 projection(std::string()),
40 styleOptions(std::map<std::string, std::vector<std::string> >()),
41 options(std::map<std::string, std::string>()),
42 cbTransparencyVec(std::vector<int32_t>())
46 VisualizeImageClassbreakRequest(
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 std::string& cbAttr_,
const std::vector<std::string>& cbVals_,
const std::string& cbPointcolorAttr_,
const std::vector<std::string>& cbPointcolorVals_,
const std::string& cbPointalphaAttr_,
const std::vector<std::string>& cbPointalphaVals_,
const std::string& cbPointsizeAttr_,
const std::vector<std::string>& cbPointsizeVals_,
const std::string& cbPointshapeAttr_,
const std::vector<std::string>& cbPointshapeVals_,
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_,
const std::vector<int32_t>& cbTransparencyVec_):
47 tableNames( tableNames_ ),
48 worldTableNames( worldTableNames_ ),
49 xColumnName( xColumnName_ ),
50 yColumnName( yColumnName_ ),
51 symbolColumnName( symbolColumnName_ ),
52 geometryColumnName( geometryColumnName_ ),
53 trackIds( trackIds_ ),
56 cbPointcolorAttr( cbPointcolorAttr_ ),
57 cbPointcolorVals( cbPointcolorVals_ ),
58 cbPointalphaAttr( cbPointalphaAttr_ ),
59 cbPointalphaVals( cbPointalphaVals_ ),
60 cbPointsizeAttr( cbPointsizeAttr_ ),
61 cbPointsizeVals( cbPointsizeVals_ ),
62 cbPointshapeAttr( cbPointshapeAttr_ ),
63 cbPointshapeVals( cbPointshapeVals_ ),
70 projection( projection_ ),
72 styleOptions( styleOptions_ ),
74 cbTransparencyVec( cbTransparencyVec_ )
78 std::vector<std::string> tableNames;
79 std::vector<std::string> worldTableNames;
80 std::string xColumnName;
81 std::string yColumnName;
82 std::string symbolColumnName;
83 std::string geometryColumnName;
84 std::vector<std::vector<std::string> > trackIds;
86 std::vector<std::string> cbVals;
87 std::string cbPointcolorAttr;
88 std::vector<std::string> cbPointcolorVals;
89 std::string cbPointalphaAttr;
90 std::vector<std::string> cbPointalphaVals;
91 std::string cbPointsizeAttr;
92 std::vector<std::string> cbPointsizeVals;
93 std::string cbPointshapeAttr;
94 std::vector<std::string> cbPointshapeVals;
101 std::string projection;
103 std::map<std::string, std::vector<std::string> > styleOptions;
104 std::map<std::string, std::string> options;
105 std::vector<int32_t> cbTransparencyVec;
111 template<>
struct codec_traits<
gpudb::VisualizeImageClassbreakRequest>
113 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakRequest& v)
115 ::avro::encode(e, v.tableNames);
116 ::avro::encode(e, v.worldTableNames);
117 ::avro::encode(e, v.xColumnName);
118 ::avro::encode(e, v.yColumnName);
119 ::avro::encode(e, v.symbolColumnName);
120 ::avro::encode(e, v.geometryColumnName);
121 ::avro::encode(e, v.trackIds);
122 ::avro::encode(e, v.cbAttr);
123 ::avro::encode(e, v.cbVals);
124 ::avro::encode(e, v.cbPointcolorAttr);
125 ::avro::encode(e, v.cbPointcolorVals);
126 ::avro::encode(e, v.cbPointalphaAttr);
127 ::avro::encode(e, v.cbPointalphaVals);
128 ::avro::encode(e, v.cbPointsizeAttr);
129 ::avro::encode(e, v.cbPointsizeVals);
130 ::avro::encode(e, v.cbPointshapeAttr);
131 ::avro::encode(e, v.cbPointshapeVals);
132 ::avro::encode(e, v.minX);
133 ::avro::encode(e, v.maxX);
134 ::avro::encode(e, v.minY);
135 ::avro::encode(e, v.maxY);
136 ::avro::encode(e, v.width);
137 ::avro::encode(e, v.height);
138 ::avro::encode(e, v.projection);
139 ::avro::encode(e, v.bgColor);
140 ::avro::encode(e, v.styleOptions);
141 ::avro::encode(e, v.options);
142 ::avro::encode(e, v.cbTransparencyVec);
145 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakRequest& v)
147 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
149 const std::vector<size_t> fo = rd->fieldOrder();
151 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
156 ::avro::decode(d, v.tableNames);
160 ::avro::decode(d, v.worldTableNames);
164 ::avro::decode(d, v.xColumnName);
168 ::avro::decode(d, v.yColumnName);
172 ::avro::decode(d, v.symbolColumnName);
176 ::avro::decode(d, v.geometryColumnName);
180 ::avro::decode(d, v.trackIds);
184 ::avro::decode(d, v.cbAttr);
188 ::avro::decode(d, v.cbVals);
192 ::avro::decode(d, v.cbPointcolorAttr);
196 ::avro::decode(d, v.cbPointcolorVals);
200 ::avro::decode(d, v.cbPointalphaAttr);
204 ::avro::decode(d, v.cbPointalphaVals);
208 ::avro::decode(d, v.cbPointsizeAttr);
212 ::avro::decode(d, v.cbPointsizeVals);
216 ::avro::decode(d, v.cbPointshapeAttr);
220 ::avro::decode(d, v.cbPointshapeVals);
224 ::avro::decode(d, v.minX);
228 ::avro::decode(d, v.maxX);
232 ::avro::decode(d, v.minY);
236 ::avro::decode(d, v.maxY);
240 ::avro::decode(d, v.width);
244 ::avro::decode(d, v.height);
248 ::avro::decode(d, v.projection);
252 ::avro::decode(d, v.bgColor);
256 ::avro::decode(d, v.styleOptions);
260 ::avro::decode(d, v.options);
264 ::avro::decode(d, v.cbTransparencyVec);
274 ::avro::decode(d, v.tableNames);
275 ::avro::decode(d, v.worldTableNames);
276 ::avro::decode(d, v.xColumnName);
277 ::avro::decode(d, v.yColumnName);
278 ::avro::decode(d, v.symbolColumnName);
279 ::avro::decode(d, v.geometryColumnName);
280 ::avro::decode(d, v.trackIds);
281 ::avro::decode(d, v.cbAttr);
282 ::avro::decode(d, v.cbVals);
283 ::avro::decode(d, v.cbPointcolorAttr);
284 ::avro::decode(d, v.cbPointcolorVals);
285 ::avro::decode(d, v.cbPointalphaAttr);
286 ::avro::decode(d, v.cbPointalphaVals);
287 ::avro::decode(d, v.cbPointsizeAttr);
288 ::avro::decode(d, v.cbPointsizeVals);
289 ::avro::decode(d, v.cbPointshapeAttr);
290 ::avro::decode(d, v.cbPointshapeVals);
291 ::avro::decode(d, v.minX);
292 ::avro::decode(d, v.maxX);
293 ::avro::decode(d, v.minY);
294 ::avro::decode(d, v.maxY);
295 ::avro::decode(d, v.width);
296 ::avro::decode(d, v.height);
297 ::avro::decode(d, v.projection);
298 ::avro::decode(d, v.bgColor);
299 ::avro::decode(d, v.styleOptions);
300 ::avro::decode(d, v.options);
301 ::avro::decode(d, v.cbTransparencyVec);
310 struct VisualizeImageClassbreakResponse
312 VisualizeImageClassbreakResponse() :
316 imageData(std::vector<uint8_t>()),
317 info(std::map<std::string, std::string>())
324 std::vector<uint8_t> imageData;
325 std::map<std::string, std::string> info;
331 template<>
struct codec_traits<
gpudb::VisualizeImageClassbreakResponse>
333 static void encode(Encoder& e,
const gpudb::VisualizeImageClassbreakResponse& v)
335 ::avro::encode(e, v.width);
336 ::avro::encode(e, v.height);
337 ::avro::encode(e, v.bgColor);
338 ::avro::encode(e, v.imageData);
339 ::avro::encode(e, v.info);
342 static void decode(Decoder& d, gpudb::VisualizeImageClassbreakResponse& v)
344 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
346 const std::vector<size_t> fo = rd->fieldOrder();
348 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
353 ::avro::decode(d, v.width);
357 ::avro::decode(d, v.height);
361 ::avro::decode(d, v.bgColor);
365 ::avro::decode(d, v.imageData);
369 ::avro::decode(d, v.info);
379 ::avro::decode(d, v.width);
380 ::avro::decode(d, v.height);
381 ::avro::decode(d, v.bgColor);
382 ::avro::decode(d, v.imageData);
383 ::avro::decode(d, v.info);
389 #endif // __VISUALIZE_IMAGE_CLASSBREAK_H__