GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
repartition_graph.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 __REPARTITION_GRAPH_H__
7 #define __REPARTITION_GRAPH_H__
8 
9 namespace gpudb
10 {
11 
29  {
30 
36  graphName(std::string()),
37  options(std::map<std::string, std::string>())
38  {
39  }
40 
78  RepartitionGraphRequest(const std::string& graphName_, const std::map<std::string, std::string>& options_):
79  graphName( graphName_ ),
80  options( options_ )
81  {
82  }
83 
84  std::string graphName;
85  std::map<std::string, std::string> options;
86  };
87 }
88 
89 namespace avro
90 {
91  template<> struct codec_traits<gpudb::RepartitionGraphRequest>
92  {
93  static void encode(Encoder& e, const gpudb::RepartitionGraphRequest& v)
94  {
95  ::avro::encode(e, v.graphName);
96  ::avro::encode(e, v.options);
97  }
98 
99  static void decode(Decoder& d, gpudb::RepartitionGraphRequest& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.graphName);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.options);
115  break;
116 
117  default:
118  break;
119  }
120  }
121  }
122  else
123  {
124  ::avro::decode(d, v.graphName);
125  ::avro::decode(d, v.options);
126  }
127  }
128  };
129 }
130 
131 namespace gpudb
132 {
133 
151  {
152 
158  result(bool()),
159  info(std::map<std::string, std::string>())
160  {
161  }
162 
163  bool result;
164  std::map<std::string, std::string> info;
165  };
166 }
167 
168 namespace avro
169 {
170  template<> struct codec_traits<gpudb::RepartitionGraphResponse>
171  {
172  static void encode(Encoder& e, const gpudb::RepartitionGraphResponse& v)
173  {
174  ::avro::encode(e, v.result);
175  ::avro::encode(e, v.info);
176  }
177 
178  static void decode(Decoder& d, gpudb::RepartitionGraphResponse& v)
179  {
180  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
181  {
182  const std::vector<size_t> fo = rd->fieldOrder();
183 
184  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
185  {
186  switch (*it)
187  {
188  case 0:
189  ::avro::decode(d, v.result);
190  break;
191 
192  case 1:
193  ::avro::decode(d, v.info);
194  break;
195 
196  default:
197  break;
198  }
199  }
200  }
201  else
202  {
203  ::avro::decode(d, v.result);
204  ::avro::decode(d, v.info);
205  }
206  }
207  };
208 }
209 
210 #endif
A set of input parameters for const.
std::map< std::string, std::string > options
RepartitionGraphResponse()
Constructs a RepartitionGraphResponse object with default parameter values.
RepartitionGraphRequest()
Constructs a RepartitionGraphRequest object with default parameter values.
std::map< std::string, std::string > info
A set of output parameters for const.
RepartitionGraphRequest(const std::string &graphName_, const std::map< std::string, std::string > &options_)
Constructs a RepartitionGraphRequest object with the specified parameters.