GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
has_type.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 __HAS_TYPE_H__
7 #define __HAS_TYPE_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  typeId(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
38  HasTypeRequest(const std::string& typeId_, const std::map<std::string, std::string>& options_):
39  typeId( typeId_ ),
40  options( options_ )
41  {
42  }
43 
44  std::string typeId;
45  std::map<std::string, std::string> options;
46  };
47 }
48 
49 namespace avro
50 {
51  template<> struct codec_traits<gpudb::HasTypeRequest>
52  {
53  static void encode(Encoder& e, const gpudb::HasTypeRequest& v)
54  {
55  ::avro::encode(e, v.typeId);
56  ::avro::encode(e, v.options);
57  }
58 
59  static void decode(Decoder& d, gpudb::HasTypeRequest& v)
60  {
61  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
62  {
63  const std::vector<size_t> fo = rd->fieldOrder();
64 
65  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
66  {
67  switch (*it)
68  {
69  case 0:
70  ::avro::decode(d, v.typeId);
71  break;
72 
73  case 1:
74  ::avro::decode(d, v.options);
75  break;
76 
77  default:
78  break;
79  }
80  }
81  }
82  else
83  {
84  ::avro::decode(d, v.typeId);
85  ::avro::decode(d, v.options);
86  }
87  }
88  };
89 }
90 
91 namespace gpudb
92 {
93 
101  {
102 
107  typeId(std::string()),
108  typeExists(bool()),
109  info(std::map<std::string, std::string>())
110  {
111  }
112 
113  std::string typeId;
115  std::map<std::string, std::string> info;
116  };
117 }
118 
119 namespace avro
120 {
121  template<> struct codec_traits<gpudb::HasTypeResponse>
122  {
123  static void encode(Encoder& e, const gpudb::HasTypeResponse& v)
124  {
125  ::avro::encode(e, v.typeId);
126  ::avro::encode(e, v.typeExists);
127  ::avro::encode(e, v.info);
128  }
129 
130  static void decode(Decoder& d, gpudb::HasTypeResponse& v)
131  {
132  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
133  {
134  const std::vector<size_t> fo = rd->fieldOrder();
135 
136  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
137  {
138  switch (*it)
139  {
140  case 0:
141  ::avro::decode(d, v.typeId);
142  break;
143 
144  case 1:
145  ::avro::decode(d, v.typeExists);
146  break;
147 
148  case 2:
149  ::avro::decode(d, v.info);
150  break;
151 
152  default:
153  break;
154  }
155  }
156  }
157  else
158  {
159  ::avro::decode(d, v.typeId);
160  ::avro::decode(d, v.typeExists);
161  ::avro::decode(d, v.info);
162  }
163  }
164  };
165 }
166 
167 #endif
std::map< std::string, std::string > options
Definition: has_type.h:45
A set of input parameters for const.
Definition: has_type.h:18
std::map< std::string, std::string > info
Definition: has_type.h:115
std::string typeId
Definition: has_type.h:44
HasTypeRequest(const std::string &typeId_, const std::map< std::string, std::string > &options_)
Constructs a HasTypeRequest object with the specified parameters.
Definition: has_type.h:38
A set of output parameters for const.
Definition: has_type.h:100
HasTypeRequest()
Constructs a HasTypeRequest object with default parameter values.
Definition: has_type.h:24
std::string typeId
Definition: has_type.h:113
HasTypeResponse()
Constructs a HasTypeResponse object with default parameter values.
Definition: has_type.h:106