]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/dependency_types.cpp
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / dependency_types.cpp
CommitLineData
f67539c2
TL
1/**
2 * Autogenerated by Thrift Compiler (0.11.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7#include "dependency_types.h"
8
9#include <algorithm>
10#include <ostream>
11
12#include <thrift/TToString.h>
13
14namespace jaegertracing { namespace thrift {
15
16
17DependencyLink::~DependencyLink() throw() {
18}
19
20
21void DependencyLink::__set_parent(const std::string& val) {
22 this->parent = val;
23}
24
25void DependencyLink::__set_child(const std::string& val) {
26 this->child = val;
27}
28
29void DependencyLink::__set_callCount(const int64_t val) {
30 this->callCount = val;
31}
32std::ostream& operator<<(std::ostream& out, const DependencyLink& obj)
33{
34 obj.printTo(out);
35 return out;
36}
37
38
39uint32_t DependencyLink::read(::apache::thrift::protocol::TProtocol* iprot) {
40
41 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
42 uint32_t xfer = 0;
43 std::string fname;
44 ::apache::thrift::protocol::TType ftype;
45 int16_t fid;
46
47 xfer += iprot->readStructBegin(fname);
48
49 using ::apache::thrift::protocol::TProtocolException;
50
51 bool isset_parent = false;
52 bool isset_child = false;
53 bool isset_callCount = false;
54
55 while (true)
56 {
57 xfer += iprot->readFieldBegin(fname, ftype, fid);
58 if (ftype == ::apache::thrift::protocol::T_STOP) {
59 break;
60 }
61 switch (fid)
62 {
63 case 1:
64 if (ftype == ::apache::thrift::protocol::T_STRING) {
65 xfer += iprot->readString(this->parent);
66 isset_parent = true;
67 } else {
68 xfer += iprot->skip(ftype);
69 }
70 break;
71 case 2:
72 if (ftype == ::apache::thrift::protocol::T_STRING) {
73 xfer += iprot->readString(this->child);
74 isset_child = true;
75 } else {
76 xfer += iprot->skip(ftype);
77 }
78 break;
79 case 4:
80 if (ftype == ::apache::thrift::protocol::T_I64) {
81 xfer += iprot->readI64(this->callCount);
82 isset_callCount = true;
83 } else {
84 xfer += iprot->skip(ftype);
85 }
86 break;
87 default:
88 xfer += iprot->skip(ftype);
89 break;
90 }
91 xfer += iprot->readFieldEnd();
92 }
93
94 xfer += iprot->readStructEnd();
95
96 if (!isset_parent)
97 throw TProtocolException(TProtocolException::INVALID_DATA);
98 if (!isset_child)
99 throw TProtocolException(TProtocolException::INVALID_DATA);
100 if (!isset_callCount)
101 throw TProtocolException(TProtocolException::INVALID_DATA);
102 return xfer;
103}
104
105uint32_t DependencyLink::write(::apache::thrift::protocol::TProtocol* oprot) const {
106 uint32_t xfer = 0;
107 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
108 xfer += oprot->writeStructBegin("DependencyLink");
109
110 xfer += oprot->writeFieldBegin("parent", ::apache::thrift::protocol::T_STRING, 1);
111 xfer += oprot->writeString(this->parent);
112 xfer += oprot->writeFieldEnd();
113
114 xfer += oprot->writeFieldBegin("child", ::apache::thrift::protocol::T_STRING, 2);
115 xfer += oprot->writeString(this->child);
116 xfer += oprot->writeFieldEnd();
117
118 xfer += oprot->writeFieldBegin("callCount", ::apache::thrift::protocol::T_I64, 4);
119 xfer += oprot->writeI64(this->callCount);
120 xfer += oprot->writeFieldEnd();
121
122 xfer += oprot->writeFieldStop();
123 xfer += oprot->writeStructEnd();
124 return xfer;
125}
126
127void swap(DependencyLink &a, DependencyLink &b) {
128 using ::std::swap;
129 swap(a.parent, b.parent);
130 swap(a.child, b.child);
131 swap(a.callCount, b.callCount);
132}
133
134DependencyLink::DependencyLink(const DependencyLink& other0) {
135 parent = other0.parent;
136 child = other0.child;
137 callCount = other0.callCount;
138}
139DependencyLink& DependencyLink::operator=(const DependencyLink& other1) {
140 parent = other1.parent;
141 child = other1.child;
142 callCount = other1.callCount;
143 return *this;
144}
145void DependencyLink::printTo(std::ostream& out) const {
146 using ::apache::thrift::to_string;
147 out << "DependencyLink(";
148 out << "parent=" << to_string(parent);
149 out << ", " << "child=" << to_string(child);
150 out << ", " << "callCount=" << to_string(callCount);
151 out << ")";
152}
153
154
155Dependencies::~Dependencies() throw() {
156}
157
158
159void Dependencies::__set_links(const std::vector<DependencyLink> & val) {
160 this->links = val;
161}
162std::ostream& operator<<(std::ostream& out, const Dependencies& obj)
163{
164 obj.printTo(out);
165 return out;
166}
167
168
169uint32_t Dependencies::read(::apache::thrift::protocol::TProtocol* iprot) {
170
171 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
172 uint32_t xfer = 0;
173 std::string fname;
174 ::apache::thrift::protocol::TType ftype;
175 int16_t fid;
176
177 xfer += iprot->readStructBegin(fname);
178
179 using ::apache::thrift::protocol::TProtocolException;
180
181 bool isset_links = false;
182
183 while (true)
184 {
185 xfer += iprot->readFieldBegin(fname, ftype, fid);
186 if (ftype == ::apache::thrift::protocol::T_STOP) {
187 break;
188 }
189 switch (fid)
190 {
191 case 1:
192 if (ftype == ::apache::thrift::protocol::T_LIST) {
193 {
194 this->links.clear();
195 uint32_t _size2;
196 ::apache::thrift::protocol::TType _etype5;
197 xfer += iprot->readListBegin(_etype5, _size2);
198 this->links.resize(_size2);
199 uint32_t _i6;
200 for (_i6 = 0; _i6 < _size2; ++_i6)
201 {
202 xfer += this->links[_i6].read(iprot);
203 }
204 xfer += iprot->readListEnd();
205 }
206 isset_links = true;
207 } else {
208 xfer += iprot->skip(ftype);
209 }
210 break;
211 default:
212 xfer += iprot->skip(ftype);
213 break;
214 }
215 xfer += iprot->readFieldEnd();
216 }
217
218 xfer += iprot->readStructEnd();
219
220 if (!isset_links)
221 throw TProtocolException(TProtocolException::INVALID_DATA);
222 return xfer;
223}
224
225uint32_t Dependencies::write(::apache::thrift::protocol::TProtocol* oprot) const {
226 uint32_t xfer = 0;
227 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
228 xfer += oprot->writeStructBegin("Dependencies");
229
230 xfer += oprot->writeFieldBegin("links", ::apache::thrift::protocol::T_LIST, 1);
231 {
232 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->links.size()));
233 std::vector<DependencyLink> ::const_iterator _iter7;
234 for (_iter7 = this->links.begin(); _iter7 != this->links.end(); ++_iter7)
235 {
236 xfer += (*_iter7).write(oprot);
237 }
238 xfer += oprot->writeListEnd();
239 }
240 xfer += oprot->writeFieldEnd();
241
242 xfer += oprot->writeFieldStop();
243 xfer += oprot->writeStructEnd();
244 return xfer;
245}
246
247void swap(Dependencies &a, Dependencies &b) {
248 using ::std::swap;
249 swap(a.links, b.links);
250}
251
252Dependencies::Dependencies(const Dependencies& other8) {
253 links = other8.links;
254}
255Dependencies& Dependencies::operator=(const Dependencies& other9) {
256 links = other9.links;
257 return *this;
258}
259void Dependencies::printTo(std::ostream& out) const {
260 using ::apache::thrift::to_string;
261 out << "Dependencies(";
262 out << "links=" << to_string(links);
263 out << ")";
264}
265
266}} // namespace