GPUdb C++ API  Version 7.2.2.4
get_vectortile.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 __GET_VECTORTILE_H__
7 #define __GET_VECTORTILE_H__
8 
9 namespace gpudb
10 {
12  struct GetVectortileRequest
13  {
14  GetVectortileRequest() :
15  tableNames(std::vector<std::string>()),
16  columnNames(std::vector<std::string>()),
17  layers(std::map<std::string, std::vector<std::string> >()),
18  tileX(int32_t()),
19  tileY(int32_t()),
20  zoom(int32_t()),
21  options(std::map<std::string, std::string>())
22  {
23  }
24 
25  GetVectortileRequest(const std::vector<std::string>& tableNames_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::vector<std::string> >& layers_, const int32_t tileX_, const int32_t tileY_, const int32_t zoom_, const std::map<std::string, std::string>& options_):
26  tableNames( tableNames_ ),
27  columnNames( columnNames_ ),
28  layers( layers_ ),
29  tileX( tileX_ ),
30  tileY( tileY_ ),
31  zoom( zoom_ ),
32  options( options_ )
33  {
34  }
35 
36  std::vector<std::string> tableNames;
37  std::vector<std::string> columnNames;
38  std::map<std::string, std::vector<std::string> > layers;
39  int32_t tileX;
40  int32_t tileY;
41  int32_t zoom;
42  std::map<std::string, std::string> options;
43  };
44 } // end namespace gpudb
45 
46 namespace avro
47 {
48  template<> struct codec_traits<gpudb::GetVectortileRequest>
49  {
50  static void encode(Encoder& e, const gpudb::GetVectortileRequest& v)
51  {
52  ::avro::encode(e, v.tableNames);
53  ::avro::encode(e, v.columnNames);
54  ::avro::encode(e, v.layers);
55  ::avro::encode(e, v.tileX);
56  ::avro::encode(e, v.tileY);
57  ::avro::encode(e, v.zoom);
58  ::avro::encode(e, v.options);
59  }
60 
61  static void decode(Decoder& d, gpudb::GetVectortileRequest& v)
62  {
63  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
64  {
65  const std::vector<size_t> fo = rd->fieldOrder();
66 
67  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
68  {
69  switch (*it)
70  {
71  case 0:
72  ::avro::decode(d, v.tableNames);
73  break;
74 
75  case 1:
76  ::avro::decode(d, v.columnNames);
77  break;
78 
79  case 2:
80  ::avro::decode(d, v.layers);
81  break;
82 
83  case 3:
84  ::avro::decode(d, v.tileX);
85  break;
86 
87  case 4:
88  ::avro::decode(d, v.tileY);
89  break;
90 
91  case 5:
92  ::avro::decode(d, v.zoom);
93  break;
94 
95  case 6:
96  ::avro::decode(d, v.options);
97  break;
98 
99  default:
100  break;
101  }
102  }
103  }
104  else
105  {
106  ::avro::decode(d, v.tableNames);
107  ::avro::decode(d, v.columnNames);
108  ::avro::decode(d, v.layers);
109  ::avro::decode(d, v.tileX);
110  ::avro::decode(d, v.tileY);
111  ::avro::decode(d, v.zoom);
112  ::avro::decode(d, v.options);
113  }
114  }
115  };
116 } // end namespace avro
117 
118 namespace gpudb
119 {
121  struct GetVectortileResponse
122  {
123  GetVectortileResponse() :
124  encodedData(std::string()),
125  info(std::map<std::string, std::string>())
126  {
127  }
128 
129  std::string encodedData;
130  std::map<std::string, std::string> info;
131  };
132 } // end namespace gpudb
133 
134 namespace avro
135 {
136  template<> struct codec_traits<gpudb::GetVectortileResponse>
137  {
138  static void encode(Encoder& e, const gpudb::GetVectortileResponse& v)
139  {
140  ::avro::encode(e, v.encodedData);
141  ::avro::encode(e, v.info);
142  }
143 
144  static void decode(Decoder& d, gpudb::GetVectortileResponse& v)
145  {
146  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
147  {
148  const std::vector<size_t> fo = rd->fieldOrder();
149 
150  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
151  {
152  switch (*it)
153  {
154  case 0:
155  ::avro::decode(d, v.encodedData);
156  break;
157 
158  case 1:
159  ::avro::decode(d, v.info);
160  break;
161 
162  default:
163  break;
164  }
165  }
166  }
167  else
168  {
169  ::avro::decode(d, v.encodedData);
170  ::avro::decode(d, v.info);
171  }
172  }
173  };
174 } // end namespace avro
175 
176 #endif // __GET_VECTORTILE_H__