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