GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
create_proc.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 __CREATE_PROC_H__
7 #define __CREATE_PROC_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  procName(std::string()),
29  executionMode(std::string()),
30  files(std::map<std::string, std::vector<uint8_t> >()),
31  command(std::string()),
32  args(std::vector<std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
85  CreateProcRequest(const std::string& procName_, const std::string& executionMode_, const std::map<std::string, std::vector<uint8_t> >& files_, const std::string& command_, const std::vector<std::string>& args_, const std::map<std::string, std::string>& options_):
86  procName( procName_ ),
87  executionMode( executionMode_ ),
88  files( files_ ),
89  command( command_ ),
90  args( args_ ),
91  options( options_ )
92  {
93  }
94 
95  std::string procName;
96  std::string executionMode;
97  std::map<std::string, std::vector<uint8_t> > files;
98  std::string command;
99  std::vector<std::string> args;
100  std::map<std::string, std::string> options;
101  };
102 }
103 
104 namespace avro
105 {
106  template<> struct codec_traits<gpudb::CreateProcRequest>
107  {
108  static void encode(Encoder& e, const gpudb::CreateProcRequest& v)
109  {
110  ::avro::encode(e, v.procName);
111  ::avro::encode(e, v.executionMode);
112  ::avro::encode(e, v.files);
113  ::avro::encode(e, v.command);
114  ::avro::encode(e, v.args);
115  ::avro::encode(e, v.options);
116  }
117 
118  static void decode(Decoder& d, gpudb::CreateProcRequest& v)
119  {
120  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
121  {
122  const std::vector<size_t> fo = rd->fieldOrder();
123 
124  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
125  {
126  switch (*it)
127  {
128  case 0:
129  ::avro::decode(d, v.procName);
130  break;
131 
132  case 1:
133  ::avro::decode(d, v.executionMode);
134  break;
135 
136  case 2:
137  ::avro::decode(d, v.files);
138  break;
139 
140  case 3:
141  ::avro::decode(d, v.command);
142  break;
143 
144  case 4:
145  ::avro::decode(d, v.args);
146  break;
147 
148  case 5:
149  ::avro::decode(d, v.options);
150  break;
151 
152  default:
153  break;
154  }
155  }
156  }
157  else
158  {
159  ::avro::decode(d, v.procName);
160  ::avro::decode(d, v.executionMode);
161  ::avro::decode(d, v.files);
162  ::avro::decode(d, v.command);
163  ::avro::decode(d, v.args);
164  ::avro::decode(d, v.options);
165  }
166  }
167  };
168 }
169 
170 namespace gpudb
171 {
172 
183  {
184 
190  procName(std::string())
191  {
192  }
193 
194  std::string procName;
195  };
196 }
197 
198 namespace avro
199 {
200  template<> struct codec_traits<gpudb::CreateProcResponse>
201  {
202  static void encode(Encoder& e, const gpudb::CreateProcResponse& v)
203  {
204  ::avro::encode(e, v.procName);
205  }
206 
207  static void decode(Decoder& d, gpudb::CreateProcResponse& v)
208  {
209  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
210  {
211  const std::vector<size_t> fo = rd->fieldOrder();
212 
213  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
214  {
215  switch (*it)
216  {
217  case 0:
218  ::avro::decode(d, v.procName);
219  break;
220 
221  default:
222  break;
223  }
224  }
225  }
226  else
227  {
228  ::avro::decode(d, v.procName);
229  }
230  }
231  };
232 }
233 
234 #endif
std::map< std::string, std::vector< uint8_t > > files
Definition: create_proc.h:97
CreateProcResponse()
Constructs a CreateProcResponse object with default parameter values.
Definition: create_proc.h:189
std::vector< std::string > args
Definition: create_proc.h:99
CreateProcRequest()
Constructs a CreateProcRequest object with default parameter values.
Definition: create_proc.h:27
std::string executionMode
Definition: create_proc.h:96
A set of output parameters for const.
Definition: create_proc.h:182
CreateProcRequest(const std::string &procName_, const std::string &executionMode_, const std::map< std::string, std::vector< uint8_t > > &files_, const std::string &command_, const std::vector< std::string > &args_, const std::map< std::string, std::string > &options_)
Constructs a CreateProcRequest object with the specified parameters.
Definition: create_proc.h:85
std::map< std::string, std::string > options
Definition: create_proc.h:100
A set of input parameters for const.
Definition: create_proc.h:21