6 #ifndef __VISUALIZE_IMAGE_LABELS_H__ 7 #define __VISUALIZE_IMAGE_LABELS_H__ 12 struct VisualizeImageLabelsRequest
14 VisualizeImageLabelsRequest() :
15 tableName(std::string()),
16 xColumnName(std::string()),
17 yColumnName(std::string()),
18 xOffset(std::string()),
19 yOffset(std::string()),
20 textString(std::string()),
22 textColor(std::string()),
23 textAngle(std::string()),
24 textScale(std::string()),
25 drawBox(std::string()),
26 drawLeader(std::string()),
27 lineWidth(std::string()),
28 lineColor(std::string()),
29 fillColor(std::string()),
30 leaderXColumnName(std::string()),
31 leaderYColumnName(std::string()),
39 projection(std::string()),
40 options(std::map<std::string, std::string>())
44 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_):
45 tableName( tableName_ ),
46 xColumnName( xColumnName_ ),
47 yColumnName( yColumnName_ ),
50 textString( textString_ ),
52 textColor( textColor_ ),
53 textAngle( textAngle_ ),
54 textScale( textScale_ ),
56 drawLeader( drawLeader_ ),
57 lineWidth( lineWidth_ ),
58 lineColor( lineColor_ ),
59 fillColor( fillColor_ ),
60 leaderXColumnName( leaderXColumnName_ ),
61 leaderYColumnName( leaderYColumnName_ ),
69 projection( projection_ ),
74 std::string tableName;
75 std::string xColumnName;
76 std::string yColumnName;
79 std::string textString;
81 std::string textColor;
82 std::string textAngle;
83 std::string textScale;
85 std::string drawLeader;
86 std::string lineWidth;
87 std::string lineColor;
88 std::string fillColor;
89 std::string leaderXColumnName;
90 std::string leaderYColumnName;
98 std::string projection;
99 std::map<std::string, std::string> options;
105 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsRequest>
107 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsRequest& v)
109 ::avro::encode(e, v.tableName);
110 ::avro::encode(e, v.xColumnName);
111 ::avro::encode(e, v.yColumnName);
112 ::avro::encode(e, v.xOffset);
113 ::avro::encode(e, v.yOffset);
114 ::avro::encode(e, v.textString);
115 ::avro::encode(e, v.font);
116 ::avro::encode(e, v.textColor);
117 ::avro::encode(e, v.textAngle);
118 ::avro::encode(e, v.textScale);
119 ::avro::encode(e, v.drawBox);
120 ::avro::encode(e, v.drawLeader);
121 ::avro::encode(e, v.lineWidth);
122 ::avro::encode(e, v.lineColor);
123 ::avro::encode(e, v.fillColor);
124 ::avro::encode(e, v.leaderXColumnName);
125 ::avro::encode(e, v.leaderYColumnName);
126 ::avro::encode(e, v.filter);
127 ::avro::encode(e, v.minX);
128 ::avro::encode(e, v.maxX);
129 ::avro::encode(e, v.minY);
130 ::avro::encode(e, v.maxY);
131 ::avro::encode(e, v.width);
132 ::avro::encode(e, v.height);
133 ::avro::encode(e, v.projection);
134 ::avro::encode(e, v.options);
137 static void decode(Decoder& d, gpudb::VisualizeImageLabelsRequest& v)
139 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
141 const std::vector<size_t> fo = rd->fieldOrder();
143 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
148 ::avro::decode(d, v.tableName);
152 ::avro::decode(d, v.xColumnName);
156 ::avro::decode(d, v.yColumnName);
160 ::avro::decode(d, v.xOffset);
164 ::avro::decode(d, v.yOffset);
168 ::avro::decode(d, v.textString);
172 ::avro::decode(d, v.font);
176 ::avro::decode(d, v.textColor);
180 ::avro::decode(d, v.textAngle);
184 ::avro::decode(d, v.textScale);
188 ::avro::decode(d, v.drawBox);
192 ::avro::decode(d, v.drawLeader);
196 ::avro::decode(d, v.lineWidth);
200 ::avro::decode(d, v.lineColor);
204 ::avro::decode(d, v.fillColor);
208 ::avro::decode(d, v.leaderXColumnName);
212 ::avro::decode(d, v.leaderYColumnName);
216 ::avro::decode(d, v.filter);
220 ::avro::decode(d, v.minX);
224 ::avro::decode(d, v.maxX);
228 ::avro::decode(d, v.minY);
232 ::avro::decode(d, v.maxY);
236 ::avro::decode(d, v.width);
240 ::avro::decode(d, v.height);
244 ::avro::decode(d, v.projection);
248 ::avro::decode(d, v.options);
258 ::avro::decode(d, v.tableName);
259 ::avro::decode(d, v.xColumnName);
260 ::avro::decode(d, v.yColumnName);
261 ::avro::decode(d, v.xOffset);
262 ::avro::decode(d, v.yOffset);
263 ::avro::decode(d, v.textString);
264 ::avro::decode(d, v.font);
265 ::avro::decode(d, v.textColor);
266 ::avro::decode(d, v.textAngle);
267 ::avro::decode(d, v.textScale);
268 ::avro::decode(d, v.drawBox);
269 ::avro::decode(d, v.drawLeader);
270 ::avro::decode(d, v.lineWidth);
271 ::avro::decode(d, v.lineColor);
272 ::avro::decode(d, v.fillColor);
273 ::avro::decode(d, v.leaderXColumnName);
274 ::avro::decode(d, v.leaderYColumnName);
275 ::avro::decode(d, v.filter);
276 ::avro::decode(d, v.minX);
277 ::avro::decode(d, v.maxX);
278 ::avro::decode(d, v.minY);
279 ::avro::decode(d, v.maxY);
280 ::avro::decode(d, v.width);
281 ::avro::decode(d, v.height);
282 ::avro::decode(d, v.projection);
283 ::avro::decode(d, v.options);
292 struct VisualizeImageLabelsResponse
294 VisualizeImageLabelsResponse() :
298 imageData(std::vector<uint8_t>()),
299 info(std::map<std::string, std::string>())
306 std::vector<uint8_t> imageData;
307 std::map<std::string, std::string> info;
313 template<>
struct codec_traits<
gpudb::VisualizeImageLabelsResponse>
315 static void encode(Encoder& e,
const gpudb::VisualizeImageLabelsResponse& v)
317 ::avro::encode(e, v.width);
318 ::avro::encode(e, v.height);
319 ::avro::encode(e, v.bgColor);
320 ::avro::encode(e, v.imageData);
321 ::avro::encode(e, v.info);
324 static void decode(Decoder& d, gpudb::VisualizeImageLabelsResponse& v)
326 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
328 const std::vector<size_t> fo = rd->fieldOrder();
330 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
335 ::avro::decode(d, v.width);
339 ::avro::decode(d, v.height);
343 ::avro::decode(d, v.bgColor);
347 ::avro::decode(d, v.imageData);
351 ::avro::decode(d, v.info);
361 ::avro::decode(d, v.width);
362 ::avro::decode(d, v.height);
363 ::avro::decode(d, v.bgColor);
364 ::avro::decode(d, v.imageData);
365 ::avro::decode(d, v.info);
371 #endif // __VISUALIZE_IMAGE_LABELS_H__
FilterResponse filter(const FilterRequest &request_) const
Filters data based on the specified expression.