GPUdb C++ API  Version 7.2.2.4
show_graph_grammar.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __SHOW_GRAPH_GRAMMAR_H__
7 #define __SHOW_GRAPH_GRAMMAR_H__
8 
9 namespace gpudb
10 {
12  struct ShowGraphGrammarRequest
13  {
14  ShowGraphGrammarRequest() :
15  options(std::map<std::string, std::string>())
16  {
17  }
18 
19  ShowGraphGrammarRequest(const std::map<std::string, std::string>& options_):
20  options( options_ )
21  {
22  }
23 
24  std::map<std::string, std::string> options;
25  };
26 } // end namespace gpudb
27 
28 namespace avro
29 {
30  template<> struct codec_traits<gpudb::ShowGraphGrammarRequest>
31  {
32  static void encode(Encoder& e, const gpudb::ShowGraphGrammarRequest& v)
33  {
34  ::avro::encode(e, v.options);
35  }
36 
37  static void decode(Decoder& d, gpudb::ShowGraphGrammarRequest& v)
38  {
39  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
40  {
41  const std::vector<size_t> fo = rd->fieldOrder();
42 
43  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
44  {
45  switch (*it)
46  {
47  case 0:
48  ::avro::decode(d, v.options);
49  break;
50 
51  default:
52  break;
53  }
54  }
55  }
56  else
57  {
58  ::avro::decode(d, v.options);
59  }
60  }
61  };
62 } // end namespace avro
63 
64 namespace gpudb
65 {
67  struct ShowGraphGrammarResponse
68  {
69  ShowGraphGrammarResponse() :
70  result(bool()),
71  componentsJson(std::string()),
72  info(std::map<std::string, std::string>())
73  {
74  }
75 
76  bool result;
77  std::string componentsJson;
78  std::map<std::string, std::string> info;
79  };
80 } // end namespace gpudb
81 
82 namespace avro
83 {
84  template<> struct codec_traits<gpudb::ShowGraphGrammarResponse>
85  {
86  static void encode(Encoder& e, const gpudb::ShowGraphGrammarResponse& v)
87  {
88  ::avro::encode(e, v.result);
89  ::avro::encode(e, v.componentsJson);
90  ::avro::encode(e, v.info);
91  }
92 
93  static void decode(Decoder& d, gpudb::ShowGraphGrammarResponse& v)
94  {
95  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
96  {
97  const std::vector<size_t> fo = rd->fieldOrder();
98 
99  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
100  {
101  switch (*it)
102  {
103  case 0:
104  ::avro::decode(d, v.result);
105  break;
106 
107  case 1:
108  ::avro::decode(d, v.componentsJson);
109  break;
110 
111  case 2:
112  ::avro::decode(d, v.info);
113  break;
114 
115  default:
116  break;
117  }
118  }
119  }
120  else
121  {
122  ::avro::decode(d, v.result);
123  ::avro::decode(d, v.componentsJson);
124  ::avro::decode(d, v.info);
125  }
126  }
127  };
128 } // end namespace avro
129 
130 #endif // __SHOW_GRAPH_GRAMMAR_H__