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()),
55 projection(std::string()),
56 options(std::map<std::string, std::string>())
115 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 std::string& filter_,
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_):
116 tableName( tableName_ ),
117 xColumnName( xColumnName_ ),
118 yColumnName( yColumnName_ ),
121 textString( textString_ ),
123 textColor( textColor_ ),
124 textAngle( textAngle_ ),
125 textScale( textScale_ ),
127 drawLeader( drawLeader_ ),
128 lineWidth( lineWidth_ ),
129 lineColor( lineColor_ ),
130 fillColor( fillColor_ ),
131 leaderXColumnName( leaderXColumnName_ ),
132 leaderYColumnName( leaderYColumnName_ ),
140 projection( projection_ ),
149 std::string tableName;
150 std::string xColumnName;
151 std::string yColumnName;
154 std::string textString;
156 std::string textColor;
157 std::string textAngle;
158 std::string textScale;
160 std::string drawLeader;
161 std::string lineWidth;
162 std::string lineColor;
163 std::string fillColor;
164 std::string leaderXColumnName;
165 std::string leaderYColumnName;
173 std::string projection;
174 std::map<std::string, std::string> options;
184 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsRequest>
186 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsRequest& v)
188 ::avro::encode(e, v.tableName);
189 ::avro::encode(e, v.xColumnName);
190 ::avro::encode(e, v.yColumnName);
191 ::avro::encode(e, v.xOffset);
192 ::avro::encode(e, v.yOffset);
193 ::avro::encode(e, v.textString);
194 ::avro::encode(e, v.font);
195 ::avro::encode(e, v.textColor);
196 ::avro::encode(e, v.textAngle);
197 ::avro::encode(e, v.textScale);
198 ::avro::encode(e, v.drawBox);
199 ::avro::encode(e, v.drawLeader);
200 ::avro::encode(e, v.lineWidth);
201 ::avro::encode(e, v.lineColor);
202 ::avro::encode(e, v.fillColor);
203 ::avro::encode(e, v.leaderXColumnName);
204 ::avro::encode(e, v.leaderYColumnName);
205 ::avro::encode(e, v.filter);
206 ::avro::encode(e, v.minX);
207 ::avro::encode(e, v.maxX);
208 ::avro::encode(e, v.minY);
209 ::avro::encode(e, v.maxY);
210 ::avro::encode(e, v.width);
211 ::avro::encode(e, v.height);
212 ::avro::encode(e, v.projection);
213 ::avro::encode(e, v.options);
216 static void decode(Decoder& d, gpudb::VisualizeImageLabelsRequest& v)
218 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
220 const std::vector<size_t> fo = rd->fieldOrder();
222 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
227 ::avro::decode(d, v.tableName);
231 ::avro::decode(d, v.xColumnName);
235 ::avro::decode(d, v.yColumnName);
239 ::avro::decode(d, v.xOffset);
243 ::avro::decode(d, v.yOffset);
247 ::avro::decode(d, v.textString);
251 ::avro::decode(d, v.font);
255 ::avro::decode(d, v.textColor);
259 ::avro::decode(d, v.textAngle);
263 ::avro::decode(d, v.textScale);
267 ::avro::decode(d, v.drawBox);
271 ::avro::decode(d, v.drawLeader);
275 ::avro::decode(d, v.lineWidth);
279 ::avro::decode(d, v.lineColor);
283 ::avro::decode(d, v.fillColor);
287 ::avro::decode(d, v.leaderXColumnName);
291 ::avro::decode(d, v.leaderYColumnName);
295 ::avro::decode(d, v.filter);
299 ::avro::decode(d, v.minX);
303 ::avro::decode(d, v.maxX);
307 ::avro::decode(d, v.minY);
311 ::avro::decode(d, v.maxY);
315 ::avro::decode(d, v.width);
319 ::avro::decode(d, v.height);
323 ::avro::decode(d, v.projection);
327 ::avro::decode(d, v.options);
337 ::avro::decode(d, v.tableName);
338 ::avro::decode(d, v.xColumnName);
339 ::avro::decode(d, v.yColumnName);
340 ::avro::decode(d, v.xOffset);
341 ::avro::decode(d, v.yOffset);
342 ::avro::decode(d, v.textString);
343 ::avro::decode(d, v.font);
344 ::avro::decode(d, v.textColor);
345 ::avro::decode(d, v.textAngle);
346 ::avro::decode(d, v.textScale);
347 ::avro::decode(d, v.drawBox);
348 ::avro::decode(d, v.drawLeader);
349 ::avro::decode(d, v.lineWidth);
350 ::avro::decode(d, v.lineColor);
351 ::avro::decode(d, v.fillColor);
352 ::avro::decode(d, v.leaderXColumnName);
353 ::avro::decode(d, v.leaderYColumnName);
354 ::avro::decode(d, v.filter);
355 ::avro::decode(d, v.minX);
356 ::avro::decode(d, v.maxX);
357 ::avro::decode(d, v.minY);
358 ::avro::decode(d, v.maxY);
359 ::avro::decode(d, v.width);
360 ::avro::decode(d, v.height);
361 ::avro::decode(d, v.projection);
362 ::avro::decode(d, v.options);
381 struct VisualizeImageLabelsResponse
389 VisualizeImageLabelsResponse() :
393 imageData(std::vector<uint8_t>())
404 std::vector<uint8_t> imageData;
414 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsResponse>
416 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsResponse& v)
418 ::avro::encode(e, v.width);
419 ::avro::encode(e, v.height);
420 ::avro::encode(e, v.bgColor);
421 ::avro::encode(e, v.imageData);
424 static void decode(Decoder& d, gpudb::VisualizeImageLabelsResponse& v)
426 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
428 const std::vector<size_t> fo = rd->fieldOrder();
430 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
435 ::avro::decode(d, v.width);
439 ::avro::decode(d, v.height);
443 ::avro::decode(d, v.bgColor);
447 ::avro::decode(d, v.imageData);
457 ::avro::decode(d, v.width);
458 ::avro::decode(d, v.height);
459 ::avro::decode(d, v.bgColor);
460 ::avro::decode(d, v.imageData);
FilterResponse filter(const FilterRequest &request_) const
Filters data based on the specified expression.