6 #ifndef __VISUALIZE_IMAGE_LABELS_H__ 7 #define __VISUALIZE_IMAGE_LABELS_H__ 22 struct VisualizeImageLabelsRequest
30 VisualizeImageLabelsRequest() :
31 tableName(std::string()),
32 xColumnName(std::string()),
33 yColumnName(std::string()),
34 xOffset(std::string()),
35 yOffset(std::string()),
36 textString(std::string()),
38 textColor(std::string()),
39 textAngle(std::string()),
40 textScale(std::string()),
41 drawBox(std::string()),
42 drawLeader(std::string()),
43 lineWidth(std::string()),
44 lineColor(std::string()),
45 fillColor(std::string()),
46 leaderXColumnName(std::string()),
47 leaderYColumnName(std::string()),
54 projection(std::string()),
55 options(std::map<std::string, std::string>())
94 VisualizeImageLabelsRequest(
const std::string& tableName,
const std::string& xColumnName,
const std::string& yColumnName,
const std::string& xOffset,
const std::string& yOffset,
const std::string& textString,
const std::string& font,
const std::string& textColor,
const std::string& textAngle,
const std::string& textScale,
const std::string& drawBox,
const std::string& drawLeader,
const std::string& lineWidth,
const std::string& lineColor,
const std::string& fillColor,
const std::string& leaderXColumnName,
const std::string& leaderYColumnName,
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>& options):
96 xColumnName(xColumnName),
97 yColumnName(yColumnName),
100 textString(textString),
102 textColor(textColor),
103 textAngle(textAngle),
104 textScale(textScale),
106 drawLeader(drawLeader),
107 lineWidth(lineWidth),
108 lineColor(lineColor),
109 fillColor(fillColor),
110 leaderXColumnName(leaderXColumnName),
111 leaderYColumnName(leaderYColumnName),
118 projection(projection),
127 std::string tableName;
128 std::string xColumnName;
129 std::string yColumnName;
132 std::string textString;
134 std::string textColor;
135 std::string textAngle;
136 std::string textScale;
138 std::string drawLeader;
139 std::string lineWidth;
140 std::string lineColor;
141 std::string fillColor;
142 std::string leaderXColumnName;
143 std::string leaderYColumnName;
150 std::string projection;
151 std::map<std::string, std::string> options;
161 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsRequest>
163 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsRequest& v)
165 ::avro::encode(e, v.tableName);
166 ::avro::encode(e, v.xColumnName);
167 ::avro::encode(e, v.yColumnName);
168 ::avro::encode(e, v.xOffset);
169 ::avro::encode(e, v.yOffset);
170 ::avro::encode(e, v.textString);
171 ::avro::encode(e, v.font);
172 ::avro::encode(e, v.textColor);
173 ::avro::encode(e, v.textAngle);
174 ::avro::encode(e, v.textScale);
175 ::avro::encode(e, v.drawBox);
176 ::avro::encode(e, v.drawLeader);
177 ::avro::encode(e, v.lineWidth);
178 ::avro::encode(e, v.lineColor);
179 ::avro::encode(e, v.fillColor);
180 ::avro::encode(e, v.leaderXColumnName);
181 ::avro::encode(e, v.leaderYColumnName);
182 ::avro::encode(e, v.minX);
183 ::avro::encode(e, v.maxX);
184 ::avro::encode(e, v.minY);
185 ::avro::encode(e, v.maxY);
186 ::avro::encode(e, v.width);
187 ::avro::encode(e, v.height);
188 ::avro::encode(e, v.projection);
189 ::avro::encode(e, v.options);
192 static void decode(Decoder& d, gpudb::VisualizeImageLabelsRequest& v)
194 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
196 const std::vector<size_t> fo = rd->fieldOrder();
198 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
203 ::avro::decode(d, v.tableName);
207 ::avro::decode(d, v.xColumnName);
211 ::avro::decode(d, v.yColumnName);
215 ::avro::decode(d, v.xOffset);
219 ::avro::decode(d, v.yOffset);
223 ::avro::decode(d, v.textString);
227 ::avro::decode(d, v.font);
231 ::avro::decode(d, v.textColor);
235 ::avro::decode(d, v.textAngle);
239 ::avro::decode(d, v.textScale);
243 ::avro::decode(d, v.drawBox);
247 ::avro::decode(d, v.drawLeader);
251 ::avro::decode(d, v.lineWidth);
255 ::avro::decode(d, v.lineColor);
259 ::avro::decode(d, v.fillColor);
263 ::avro::decode(d, v.leaderXColumnName);
267 ::avro::decode(d, v.leaderYColumnName);
271 ::avro::decode(d, v.minX);
275 ::avro::decode(d, v.maxX);
279 ::avro::decode(d, v.minY);
283 ::avro::decode(d, v.maxY);
287 ::avro::decode(d, v.width);
291 ::avro::decode(d, v.height);
295 ::avro::decode(d, v.projection);
299 ::avro::decode(d, v.options);
309 ::avro::decode(d, v.tableName);
310 ::avro::decode(d, v.xColumnName);
311 ::avro::decode(d, v.yColumnName);
312 ::avro::decode(d, v.xOffset);
313 ::avro::decode(d, v.yOffset);
314 ::avro::decode(d, v.textString);
315 ::avro::decode(d, v.font);
316 ::avro::decode(d, v.textColor);
317 ::avro::decode(d, v.textAngle);
318 ::avro::decode(d, v.textScale);
319 ::avro::decode(d, v.drawBox);
320 ::avro::decode(d, v.drawLeader);
321 ::avro::decode(d, v.lineWidth);
322 ::avro::decode(d, v.lineColor);
323 ::avro::decode(d, v.fillColor);
324 ::avro::decode(d, v.leaderXColumnName);
325 ::avro::decode(d, v.leaderYColumnName);
326 ::avro::decode(d, v.minX);
327 ::avro::decode(d, v.maxX);
328 ::avro::decode(d, v.minY);
329 ::avro::decode(d, v.maxY);
330 ::avro::decode(d, v.width);
331 ::avro::decode(d, v.height);
332 ::avro::decode(d, v.projection);
333 ::avro::decode(d, v.options);
352 struct VisualizeImageLabelsResponse
360 VisualizeImageLabelsResponse() :
364 imageData(std::vector<uint8_t>())
375 std::vector<uint8_t> imageData;
385 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsResponse>
387 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsResponse& v)
389 ::avro::encode(e, v.width);
390 ::avro::encode(e, v.height);
391 ::avro::encode(e, v.bgColor);
392 ::avro::encode(e, v.imageData);
395 static void decode(Decoder& d, gpudb::VisualizeImageLabelsResponse& v)
397 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
399 const std::vector<size_t> fo = rd->fieldOrder();
401 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
406 ::avro::decode(d, v.width);
410 ::avro::decode(d, v.height);
414 ::avro::decode(d, v.bgColor);
418 ::avro::decode(d, v.imageData);
428 ::avro::decode(d, v.width);
429 ::avro::decode(d, v.height);
430 ::avro::decode(d, v.bgColor);
431 ::avro::decode(d, v.imageData);