GPUdb C++ API  Version 7.1.10.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 
279  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_):
280  graphName( graphName_ ),
281  nodes( nodes_ ),
282  edges( edges_ ),
283  weights( weights_ ),
284  restrictions( restrictions_ ),
285  options( options_ )
286  {
287  }
288 
289  std::string graphName;
290  std::vector<std::string> nodes;
291  std::vector<std::string> edges;
292  std::vector<std::string> weights;
293  std::vector<std::string> restrictions;
294  std::map<std::string, std::string> options;
295  };
296 }
297 
298 namespace avro
299 {
300  template<> struct codec_traits<gpudb::ModifyGraphRequest>
301  {
302  static void encode(Encoder& e, const gpudb::ModifyGraphRequest& v)
303  {
304  ::avro::encode(e, v.graphName);
305  ::avro::encode(e, v.nodes);
306  ::avro::encode(e, v.edges);
307  ::avro::encode(e, v.weights);
308  ::avro::encode(e, v.restrictions);
309  ::avro::encode(e, v.options);
310  }
311 
312  static void decode(Decoder& d, gpudb::ModifyGraphRequest& v)
313  {
314  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
315  {
316  const std::vector<size_t> fo = rd->fieldOrder();
317 
318  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
319  {
320  switch (*it)
321  {
322  case 0:
323  ::avro::decode(d, v.graphName);
324  break;
325 
326  case 1:
327  ::avro::decode(d, v.nodes);
328  break;
329 
330  case 2:
331  ::avro::decode(d, v.edges);
332  break;
333 
334  case 3:
335  ::avro::decode(d, v.weights);
336  break;
337 
338  case 4:
339  ::avro::decode(d, v.restrictions);
340  break;
341 
342  case 5:
343  ::avro::decode(d, v.options);
344  break;
345 
346  default:
347  break;
348  }
349  }
350  }
351  else
352  {
353  ::avro::decode(d, v.graphName);
354  ::avro::decode(d, v.nodes);
355  ::avro::decode(d, v.edges);
356  ::avro::decode(d, v.weights);
357  ::avro::decode(d, v.restrictions);
358  ::avro::decode(d, v.options);
359  }
360  }
361  };
362 }
363 
364 namespace gpudb
365 {
366 
383  {
384 
390  result(bool()),
391  numNodes(int64_t()),
392  numEdges(int64_t()),
393  edgesIds(std::vector<int64_t>()),
394  info(std::map<std::string, std::string>())
395  {
396  }
397 
398  bool result;
399  int64_t numNodes;
400  int64_t numEdges;
401  std::vector<int64_t> edgesIds;
402  std::map<std::string, std::string> info;
403  };
404 }
405 
406 namespace avro
407 {
408  template<> struct codec_traits<gpudb::ModifyGraphResponse>
409  {
410  static void encode(Encoder& e, const gpudb::ModifyGraphResponse& v)
411  {
412  ::avro::encode(e, v.result);
413  ::avro::encode(e, v.numNodes);
414  ::avro::encode(e, v.numEdges);
415  ::avro::encode(e, v.edgesIds);
416  ::avro::encode(e, v.info);
417  }
418 
419  static void decode(Decoder& d, gpudb::ModifyGraphResponse& v)
420  {
421  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
422  {
423  const std::vector<size_t> fo = rd->fieldOrder();
424 
425  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
426  {
427  switch (*it)
428  {
429  case 0:
430  ::avro::decode(d, v.result);
431  break;
432 
433  case 1:
434  ::avro::decode(d, v.numNodes);
435  break;
436 
437  case 2:
438  ::avro::decode(d, v.numEdges);
439  break;
440 
441  case 3:
442  ::avro::decode(d, v.edgesIds);
443  break;
444 
445  case 4:
446  ::avro::decode(d, v.info);
447  break;
448 
449  default:
450  break;
451  }
452  }
453  }
454  else
455  {
456  ::avro::decode(d, v.result);
457  ::avro::decode(d, v.numNodes);
458  ::avro::decode(d, v.numEdges);
459  ::avro::decode(d, v.edgesIds);
460  ::avro::decode(d, v.info);
461  }
462  }
463  };
464 }
465 
466 #endif
std::vector< std::string > edges
Definition: modify_graph.h:291
std::vector< std::string > nodes
Definition: modify_graph.h:290
A set of input parameters for const.
Definition: modify_graph.h:27
A set of output parameters for const.
Definition: modify_graph.h:382
std::vector< std::string > restrictions
Definition: modify_graph.h:293
ModifyGraphResponse()
Constructs a ModifyGraphResponse object with default parameter values.
Definition: modify_graph.h:389
std::vector< std::string > weights
Definition: modify_graph.h:292
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:279
std::map< std::string, std::string > options
Definition: modify_graph.h:294
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:402
std::vector< int64_t > edgesIds
Definition: modify_graph.h:401