GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filter_by_radius.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __FILTER_BY_RADIUS_H__
7 #define __FILTER_BY_RADIUS_H__
8 
9 namespace gpudb
10 {
11 
29  {
30 
36  tableName(std::string()),
37  viewName(std::string()),
38  xColumnName(std::string()),
39  xCenter(double()),
40  yColumnName(std::string()),
41  yCenter(double()),
42  radius(double()),
43  options(std::map<std::string, std::string>())
44  {
45  }
46 
88  FilterByRadiusRequest(const std::string& tableName_, const std::string& viewName_, const std::string& xColumnName_, const double xCenter_, const std::string& yColumnName_, const double yCenter_, const double radius_, const std::map<std::string, std::string>& options_):
89  tableName( tableName_ ),
90  viewName( viewName_ ),
91  xColumnName( xColumnName_ ),
92  xCenter( xCenter_ ),
93  yColumnName( yColumnName_ ),
94  yCenter( yCenter_ ),
95  radius( radius_ ),
96  options( options_ )
97  {
98  }
99 
100  std::string tableName;
101  std::string viewName;
102  std::string xColumnName;
103  double xCenter;
104  std::string yColumnName;
105  double yCenter;
106  double radius;
107  std::map<std::string, std::string> options;
108  };
109 }
110 
111 namespace avro
112 {
113  template<> struct codec_traits<gpudb::FilterByRadiusRequest>
114  {
115  static void encode(Encoder& e, const gpudb::FilterByRadiusRequest& v)
116  {
117  ::avro::encode(e, v.tableName);
118  ::avro::encode(e, v.viewName);
119  ::avro::encode(e, v.xColumnName);
120  ::avro::encode(e, v.xCenter);
121  ::avro::encode(e, v.yColumnName);
122  ::avro::encode(e, v.yCenter);
123  ::avro::encode(e, v.radius);
124  ::avro::encode(e, v.options);
125  }
126 
127  static void decode(Decoder& d, gpudb::FilterByRadiusRequest& v)
128  {
129  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
130  {
131  const std::vector<size_t> fo = rd->fieldOrder();
132 
133  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
134  {
135  switch (*it)
136  {
137  case 0:
138  ::avro::decode(d, v.tableName);
139  break;
140 
141  case 1:
142  ::avro::decode(d, v.viewName);
143  break;
144 
145  case 2:
146  ::avro::decode(d, v.xColumnName);
147  break;
148 
149  case 3:
150  ::avro::decode(d, v.xCenter);
151  break;
152 
153  case 4:
154  ::avro::decode(d, v.yColumnName);
155  break;
156 
157  case 5:
158  ::avro::decode(d, v.yCenter);
159  break;
160 
161  case 6:
162  ::avro::decode(d, v.radius);
163  break;
164 
165  case 7:
166  ::avro::decode(d, v.options);
167  break;
168 
169  default:
170  break;
171  }
172  }
173  }
174  else
175  {
176  ::avro::decode(d, v.tableName);
177  ::avro::decode(d, v.viewName);
178  ::avro::decode(d, v.xColumnName);
179  ::avro::decode(d, v.xCenter);
180  ::avro::decode(d, v.yColumnName);
181  ::avro::decode(d, v.yCenter);
182  ::avro::decode(d, v.radius);
183  ::avro::decode(d, v.options);
184  }
185  }
186  };
187 }
188 
189 namespace gpudb
190 {
191 
209  {
210 
216  count(int64_t()),
217  info(std::map<std::string, std::string>())
218  {
219  }
220 
221  int64_t count;
222  std::map<std::string, std::string> info;
223  };
224 }
225 
226 namespace avro
227 {
228  template<> struct codec_traits<gpudb::FilterByRadiusResponse>
229  {
230  static void encode(Encoder& e, const gpudb::FilterByRadiusResponse& v)
231  {
232  ::avro::encode(e, v.count);
233  ::avro::encode(e, v.info);
234  }
235 
236  static void decode(Decoder& d, gpudb::FilterByRadiusResponse& v)
237  {
238  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
239  {
240  const std::vector<size_t> fo = rd->fieldOrder();
241 
242  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
243  {
244  switch (*it)
245  {
246  case 0:
247  ::avro::decode(d, v.count);
248  break;
249 
250  case 1:
251  ::avro::decode(d, v.info);
252  break;
253 
254  default:
255  break;
256  }
257  }
258  }
259  else
260  {
261  ::avro::decode(d, v.count);
262  ::avro::decode(d, v.info);
263  }
264  }
265  };
266 }
267 
268 #endif
FilterByRadiusRequest()
Constructs a FilterByRadiusRequest object with default parameter values.
A set of output parameters for const.
FilterByRadiusResponse()
Constructs a FilterByRadiusResponse object with default parameter values.
std::map< std::string, std::string > info
FilterByRadiusRequest(const std::string &tableName_, const std::string &viewName_, const std::string &xColumnName_, const double xCenter_, const std::string &yColumnName_, const double yCenter_, const double radius_, const std::map< std::string, std::string > &options_)
Constructs a FilterByRadiusRequest object with the specified parameters.
std::map< std::string, std::string > options
A set of input parameters for const.