GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
match_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 __MATCH_GRAPH_H__
7 #define __MATCH_GRAPH_H__
8 
9 namespace gpudb
10 {
11 
33  {
34 
39  graphName(std::string()),
40  samplePoints(std::vector<std::string>()),
41  solveMethod(std::string()),
42  solutionTable(std::string()),
43  options(std::map<std::string, std::string>())
44  {
45  }
46 
288  MatchGraphRequest(const std::string& graphName_, const std::vector<std::string>& samplePoints_, const std::string& solveMethod_, const std::string& solutionTable_, const std::map<std::string, std::string>& options_):
289  graphName( graphName_ ),
290  samplePoints( samplePoints_ ),
291  solveMethod( solveMethod_ ),
292  solutionTable( solutionTable_ ),
293  options( options_ )
294  {
295  }
296 
297  std::string graphName;
298  std::vector<std::string> samplePoints;
299  std::string solveMethod;
300  std::string solutionTable;
301  std::map<std::string, std::string> options;
302  };
303 }
304 
305 namespace avro
306 {
307  template<> struct codec_traits<gpudb::MatchGraphRequest>
308  {
309  static void encode(Encoder& e, const gpudb::MatchGraphRequest& v)
310  {
311  ::avro::encode(e, v.graphName);
312  ::avro::encode(e, v.samplePoints);
313  ::avro::encode(e, v.solveMethod);
314  ::avro::encode(e, v.solutionTable);
315  ::avro::encode(e, v.options);
316  }
317 
318  static void decode(Decoder& d, gpudb::MatchGraphRequest& v)
319  {
320  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
321  {
322  const std::vector<size_t> fo = rd->fieldOrder();
323 
324  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
325  {
326  switch (*it)
327  {
328  case 0:
329  ::avro::decode(d, v.graphName);
330  break;
331 
332  case 1:
333  ::avro::decode(d, v.samplePoints);
334  break;
335 
336  case 2:
337  ::avro::decode(d, v.solveMethod);
338  break;
339 
340  case 3:
341  ::avro::decode(d, v.solutionTable);
342  break;
343 
344  case 4:
345  ::avro::decode(d, v.options);
346  break;
347 
348  default:
349  break;
350  }
351  }
352  }
353  else
354  {
355  ::avro::decode(d, v.graphName);
356  ::avro::decode(d, v.samplePoints);
357  ::avro::decode(d, v.solveMethod);
358  ::avro::decode(d, v.solutionTable);
359  ::avro::decode(d, v.options);
360  }
361  }
362  };
363 }
364 
365 namespace gpudb
366 {
367 
389  {
390 
396  result(bool()),
397  matchScore(float()),
398  info(std::map<std::string, std::string>())
399  {
400  }
401 
402  bool result;
403  float matchScore;
404  std::map<std::string, std::string> info;
405  };
406 }
407 
408 namespace avro
409 {
410  template<> struct codec_traits<gpudb::MatchGraphResponse>
411  {
412  static void encode(Encoder& e, const gpudb::MatchGraphResponse& v)
413  {
414  ::avro::encode(e, v.result);
415  ::avro::encode(e, v.matchScore);
416  ::avro::encode(e, v.info);
417  }
418 
419  static void decode(Decoder& d, gpudb::MatchGraphResponse& 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.matchScore);
435  break;
436 
437  case 2:
438  ::avro::decode(d, v.info);
439  break;
440 
441  default:
442  break;
443  }
444  }
445  }
446  else
447  {
448  ::avro::decode(d, v.result);
449  ::avro::decode(d, v.matchScore);
450  ::avro::decode(d, v.info);
451  }
452  }
453  };
454 }
455 
456 #endif
MatchGraphResponse()
Constructs a MatchGraphResponse object with default parameter values.
Definition: match_graph.h:395
A set of input parameters for const.
Definition: match_graph.h:32
std::map< std::string, std::string > options
Definition: match_graph.h:301
MatchGraphRequest(const std::string &graphName_, const std::vector< std::string > &samplePoints_, const std::string &solveMethod_, const std::string &solutionTable_, const std::map< std::string, std::string > &options_)
Constructs a MatchGraphRequest object with the specified parameters.
Definition: match_graph.h:288
std::map< std::string, std::string > info
Definition: match_graph.h:404
MatchGraphRequest()
Constructs a MatchGraphRequest object with default parameter values.
Definition: match_graph.h:38
std::vector< std::string > samplePoints
Definition: match_graph.h:298
A set of output parameters for const.
Definition: match_graph.h:388