GPUdb C++ API  Version 6.2.0.3
aggregate_convex_hull.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 __AGGREGATE_CONVEX_HULL_H__
7 #define __AGGREGATE_CONVEX_HULL_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  tableName(std::string()),
28  xColumnName(std::string()),
29  yColumnName(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
50  AggregateConvexHullRequest(const std::string& tableName_, const std::string& xColumnName_, const std::string& yColumnName_, const std::map<std::string, std::string>& options_):
51  tableName( tableName_ ),
52  xColumnName( xColumnName_ ),
53  yColumnName( yColumnName_ ),
54  options( options_ )
55  {
56  }
57 
58  std::string tableName;
59  std::string xColumnName;
60  std::string yColumnName;
61  std::map<std::string, std::string> options;
62  };
63 }
64 
65 namespace avro
66 {
67  template<> struct codec_traits<gpudb::AggregateConvexHullRequest>
68  {
69  static void encode(Encoder& e, const gpudb::AggregateConvexHullRequest& v)
70  {
71  ::avro::encode(e, v.tableName);
72  ::avro::encode(e, v.xColumnName);
73  ::avro::encode(e, v.yColumnName);
74  ::avro::encode(e, v.options);
75  }
76 
77  static void decode(Decoder& d, gpudb::AggregateConvexHullRequest& v)
78  {
79  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
80  {
81  const std::vector<size_t> fo = rd->fieldOrder();
82 
83  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
84  {
85  switch (*it)
86  {
87  case 0:
88  ::avro::decode(d, v.tableName);
89  break;
90 
91  case 1:
92  ::avro::decode(d, v.xColumnName);
93  break;
94 
95  case 2:
96  ::avro::decode(d, v.yColumnName);
97  break;
98 
99  case 3:
100  ::avro::decode(d, v.options);
101  break;
102 
103  default:
104  break;
105  }
106  }
107  }
108  else
109  {
110  ::avro::decode(d, v.tableName);
111  ::avro::decode(d, v.xColumnName);
112  ::avro::decode(d, v.yColumnName);
113  ::avro::decode(d, v.options);
114  }
115  }
116  };
117 }
118 
119 namespace gpudb
120 {
121 
130  {
131 
137  xVector(std::vector<double>()),
138  yVector(std::vector<double>()),
139  count(int32_t()),
140  isValid(bool())
141  {
142  }
143 
144  std::vector<double> xVector;
145  std::vector<double> yVector;
146  int32_t count;
147  bool isValid;
148  };
149 }
150 
151 namespace avro
152 {
153  template<> struct codec_traits<gpudb::AggregateConvexHullResponse>
154  {
155  static void encode(Encoder& e, const gpudb::AggregateConvexHullResponse& v)
156  {
157  ::avro::encode(e, v.xVector);
158  ::avro::encode(e, v.yVector);
159  ::avro::encode(e, v.count);
160  ::avro::encode(e, v.isValid);
161  }
162 
163  static void decode(Decoder& d, gpudb::AggregateConvexHullResponse& v)
164  {
165  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
166  {
167  const std::vector<size_t> fo = rd->fieldOrder();
168 
169  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
170  {
171  switch (*it)
172  {
173  case 0:
174  ::avro::decode(d, v.xVector);
175  break;
176 
177  case 1:
178  ::avro::decode(d, v.yVector);
179  break;
180 
181  case 2:
182  ::avro::decode(d, v.count);
183  break;
184 
185  case 3:
186  ::avro::decode(d, v.isValid);
187  break;
188 
189  default:
190  break;
191  }
192  }
193  }
194  else
195  {
196  ::avro::decode(d, v.xVector);
197  ::avro::decode(d, v.yVector);
198  ::avro::decode(d, v.count);
199  ::avro::decode(d, v.isValid);
200  }
201  }
202  };
203 }
204 
205 #endif
AggregateConvexHullResponse()
Constructs an AggregateConvexHullResponse object with default parameter values.
AggregateConvexHullRequest(const std::string &tableName_, const std::string &xColumnName_, const std::string &yColumnName_, const std::map< std::string, std::string > &options_)
Constructs an AggregateConvexHullRequest object with the specified parameters.
A set of input parameters for aggregateConvexHull(const AggregateConvexHullRequest&) const...
A set of output parameters for aggregateConvexHull(const AggregateConvexHullRequest&) const...
AggregateConvexHullRequest()
Constructs an AggregateConvexHullRequest object with default parameter values.
std::map< std::string, std::string > options