GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
modify_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 __MODIFY_GRAPH_H__
7 #define __MODIFY_GRAPH_H__
8 
9 namespace gpudb
10 {
11 
28  {
29 
35  graphName(std::string()),
36  nodes(std::vector<std::string>()),
37  edges(std::vector<std::string>()),
38  weights(std::vector<std::string>()),
39  restrictions(std::vector<std::string>()),
40  options(std::map<std::string, std::string>())
41  {
42  }
43 
246  ModifyGraphRequest(const std::string& graphName_, const std::vector<std::string>& nodes_, const std::vector<std::string>& edges_, const std::vector<std::string>& weights_, const std::vector<std::string>& restrictions_, const std::map<std::string, std::string>& options_):
247  graphName( graphName_ ),
248  nodes( nodes_ ),
249  edges( edges_ ),
250  weights( weights_ ),
251  restrictions( restrictions_ ),
252  options( options_ )
253  {
254  }
255 
256  std::string graphName;
257  std::vector<std::string> nodes;
258  std::vector<std::string> edges;
259  std::vector<std::string> weights;
260  std::vector<std::string> restrictions;
261  std::map<std::string, std::string> options;
262  };
263 }
264 
265 namespace avro
266 {
267  template<> struct codec_traits<gpudb::ModifyGraphRequest>
268  {
269  static void encode(Encoder& e, const gpudb::ModifyGraphRequest& v)
270  {
271  ::avro::encode(e, v.graphName);
272  ::avro::encode(e, v.nodes);
273  ::avro::encode(e, v.edges);
274  ::avro::encode(e, v.weights);
275  ::avro::encode(e, v.restrictions);
276  ::avro::encode(e, v.options);
277  }
278 
279  static void decode(Decoder& d, gpudb::ModifyGraphRequest& v)
280  {
281  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
282  {
283  const std::vector<size_t> fo = rd->fieldOrder();
284 
285  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
286  {
287  switch (*it)
288  {
289  case 0:
290  ::avro::decode(d, v.graphName);
291  break;
292 
293  case 1:
294  ::avro::decode(d, v.nodes);
295  break;
296 
297  case 2:
298  ::avro::decode(d, v.edges);
299  break;
300 
301  case 3:
302  ::avro::decode(d, v.weights);
303  break;
304 
305  case 4:
306  ::avro::decode(d, v.restrictions);
307  break;
308 
309  case 5:
310  ::avro::decode(d, v.options);
311  break;
312 
313  default:
314  break;
315  }
316  }
317  }
318  else
319  {
320  ::avro::decode(d, v.graphName);
321  ::avro::decode(d, v.nodes);
322  ::avro::decode(d, v.edges);
323  ::avro::decode(d, v.weights);
324  ::avro::decode(d, v.restrictions);
325  ::avro::decode(d, v.options);
326  }
327  }
328  };
329 }
330 
331 namespace gpudb
332 {
333 
350  {
351 
357  numNodes(int64_t()),
358  numEdges(int64_t()),
359  edgesIds(std::vector<int64_t>()),
360  info(std::map<std::string, std::string>())
361  {
362  }
363 
364  int64_t numNodes;
365  int64_t numEdges;
366  std::vector<int64_t> edgesIds;
367  std::map<std::string, std::string> info;
368  };
369 }
370 
371 namespace avro
372 {
373  template<> struct codec_traits<gpudb::ModifyGraphResponse>
374  {
375  static void encode(Encoder& e, const gpudb::ModifyGraphResponse& v)
376  {
377  ::avro::encode(e, v.numNodes);
378  ::avro::encode(e, v.numEdges);
379  ::avro::encode(e, v.edgesIds);
380  ::avro::encode(e, v.info);
381  }
382 
383  static void decode(Decoder& d, gpudb::ModifyGraphResponse& v)
384  {
385  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
386  {
387  const std::vector<size_t> fo = rd->fieldOrder();
388 
389  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
390  {
391  switch (*it)
392  {
393  case 0:
394  ::avro::decode(d, v.numNodes);
395  break;
396 
397  case 1:
398  ::avro::decode(d, v.numEdges);
399  break;
400 
401  case 2:
402  ::avro::decode(d, v.edgesIds);
403  break;
404 
405  case 3:
406  ::avro::decode(d, v.info);
407  break;
408 
409  default:
410  break;
411  }
412  }
413  }
414  else
415  {
416  ::avro::decode(d, v.numNodes);
417  ::avro::decode(d, v.numEdges);
418  ::avro::decode(d, v.edgesIds);
419  ::avro::decode(d, v.info);
420  }
421  }
422  };
423 }
424 
425 #endif
std::vector< std::string > edges
Definition: modify_graph.h:258
std::vector< std::string > nodes
Definition: modify_graph.h:257
A set of input parameters for const.
Definition: modify_graph.h:27
A set of output parameters for const.
Definition: modify_graph.h:349
std::vector< std::string > restrictions
Definition: modify_graph.h:260
ModifyGraphResponse()
Constructs a ModifyGraphResponse object with default parameter values.
Definition: modify_graph.h:356
std::vector< std::string > weights
Definition: modify_graph.h:259
ModifyGraphRequest(const std::string &graphName_, const std::vector< std::string > &nodes_, const std::vector< std::string > &edges_, const std::vector< std::string > &weights_, const std::vector< std::string > &restrictions_, const std::map< std::string, std::string > &options_)
Constructs a ModifyGraphRequest object with the specified parameters.
Definition: modify_graph.h:246
std::map< std::string, std::string > options
Definition: modify_graph.h:261
ModifyGraphRequest()
Constructs a ModifyGraphRequest object with default parameter values.
Definition: modify_graph.h:34
std::map< std::string, std::string > info
Definition: modify_graph.h:367
std::vector< int64_t > edgesIds
Definition: modify_graph.h:366