Branch data Line data Source code
1 : : // Generated by Cap'n Proto compiler, DO NOT EDIT
2 : : // source: proxy.capnp
3 : :
4 : : #pragma once
5 : :
6 : : #include <capnp/generated-header-support.h>
7 : : #include <kj/windows-sanity.h>
8 : : #if !CAPNP_LITE
9 : : #include <capnp/capability.h>
10 : : #endif // !CAPNP_LITE
11 : :
12 : : #ifndef CAPNP_VERSION
13 : : #error "CAPNP_VERSION is not defined, is capnp/generated-header-support.h missing?"
14 : : #elif CAPNP_VERSION != 1004000
15 : : #error "Version mismatch between generated code and library headers. You must use the same version of the Cap'n Proto compiler and library."
16 : : #endif
17 : :
18 : :
19 : : CAPNP_BEGIN_HEADER
20 : :
21 : : namespace capnp {
22 : : namespace schemas {
23 : :
24 : : CAPNP_DECLARE_SCHEMA(b899f3c154fdb458);
25 : : CAPNP_DECLARE_SCHEMA(bcec15648e8a0cf1);
26 : : CAPNP_DECLARE_SCHEMA(e6f46079b7b1405e);
27 : : CAPNP_DECLARE_SCHEMA(d02682b319f69b38);
28 : : CAPNP_DECLARE_SCHEMA(996a183200992f88);
29 : : CAPNP_DECLARE_SCHEMA(b594888f63f4dbb9);
30 : : CAPNP_DECLARE_SCHEMA(824c08b82695d8dd);
31 : : CAPNP_DECLARE_SCHEMA(ee5e37179ad9dc9d);
32 : : CAPNP_DECLARE_SCHEMA(c7dce7fe036b26d4);
33 : : CAPNP_DECLARE_SCHEMA(bbafb2ed83f6268d);
34 : : CAPNP_DECLARE_SCHEMA(d989bdba64550ac4);
35 : : CAPNP_DECLARE_SCHEMA(e62a47a377a4856e);
36 : : CAPNP_DECLARE_SCHEMA(81c1e2600d0b56c5);
37 : : CAPNP_DECLARE_SCHEMA(91b503837a7fb9c6);
38 : : CAPNP_DECLARE_SCHEMA(f75eedb886b95bdc);
39 : : CAPNP_DECLARE_SCHEMA(9c44e6645d0b22c6);
40 : :
41 : : } // namespace schemas
42 : : } // namespace capnp
43 : :
44 : : namespace mp {
45 : :
46 : : struct ThreadMap {
47 : : ThreadMap() = delete;
48 : :
49 : : #if !CAPNP_LITE
50 : : class Client;
51 : : class Server;
52 : : #endif // !CAPNP_LITE
53 : :
54 : : struct MakeThreadParams;
55 : : struct MakeThreadResults;
56 : : struct MakePoolParams;
57 : : struct MakePoolResults;
58 : :
59 : : #if !CAPNP_LITE
60 : : struct _capnpPrivate {
61 : : CAPNP_DECLARE_INTERFACE_HEADER(ee5e37179ad9dc9d)
62 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
63 : : };
64 : : #endif // !CAPNP_LITE
65 : : };
66 : :
67 : : struct ThreadMap::MakeThreadParams {
68 : : MakeThreadParams() = delete;
69 : :
70 : : class Reader;
71 : : class Builder;
72 : : class Pipeline;
73 : :
74 : : struct _capnpPrivate {
75 : : CAPNP_DECLARE_STRUCT_HEADER(c7dce7fe036b26d4, 0, 1)
76 : : #if !CAPNP_LITE
77 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
78 : : #endif // !CAPNP_LITE
79 : : };
80 : : };
81 : :
82 : : struct ThreadMap::MakeThreadResults {
83 : : MakeThreadResults() = delete;
84 : :
85 : : class Reader;
86 : : class Builder;
87 : : class Pipeline;
88 : :
89 : : struct _capnpPrivate {
90 : : CAPNP_DECLARE_STRUCT_HEADER(bbafb2ed83f6268d, 0, 1)
91 : : #if !CAPNP_LITE
92 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
93 : : #endif // !CAPNP_LITE
94 : : };
95 : : };
96 : :
97 : : struct ThreadMap::MakePoolParams {
98 : : MakePoolParams() = delete;
99 : :
100 : : class Reader;
101 : : class Builder;
102 : : class Pipeline;
103 : :
104 : : struct _capnpPrivate {
105 : : CAPNP_DECLARE_STRUCT_HEADER(d989bdba64550ac4, 1, 0)
106 : : #if !CAPNP_LITE
107 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
108 : : #endif // !CAPNP_LITE
109 : : };
110 : : };
111 : :
112 : : struct ThreadMap::MakePoolResults {
113 : : MakePoolResults() = delete;
114 : :
115 : : class Reader;
116 : : class Builder;
117 : : class Pipeline;
118 : :
119 : : struct _capnpPrivate {
120 : : CAPNP_DECLARE_STRUCT_HEADER(e62a47a377a4856e, 0, 0)
121 : : #if !CAPNP_LITE
122 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
123 : : #endif // !CAPNP_LITE
124 : : };
125 : : };
126 : :
127 : : struct Thread {
128 : : Thread() = delete;
129 : :
130 : : #if !CAPNP_LITE
131 : : class Client;
132 : : class Server;
133 : : #endif // !CAPNP_LITE
134 : :
135 : : struct GetNameParams;
136 : : struct GetNameResults;
137 : :
138 : : #if !CAPNP_LITE
139 : : struct _capnpPrivate {
140 : : CAPNP_DECLARE_INTERFACE_HEADER(81c1e2600d0b56c5)
141 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
142 : : };
143 : : #endif // !CAPNP_LITE
144 : : };
145 : :
146 : : struct Thread::GetNameParams {
147 : : GetNameParams() = delete;
148 : :
149 : : class Reader;
150 : : class Builder;
151 : : class Pipeline;
152 : :
153 : : struct _capnpPrivate {
154 : : CAPNP_DECLARE_STRUCT_HEADER(91b503837a7fb9c6, 0, 0)
155 : : #if !CAPNP_LITE
156 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
157 : : #endif // !CAPNP_LITE
158 : : };
159 : : };
160 : :
161 : : struct Thread::GetNameResults {
162 : : GetNameResults() = delete;
163 : :
164 : : class Reader;
165 : : class Builder;
166 : : class Pipeline;
167 : :
168 : : struct _capnpPrivate {
169 : : CAPNP_DECLARE_STRUCT_HEADER(f75eedb886b95bdc, 0, 1)
170 : : #if !CAPNP_LITE
171 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
172 : : #endif // !CAPNP_LITE
173 : : };
174 : : };
175 : :
176 : : struct Context {
177 : : Context() = delete;
178 : :
179 : : class Reader;
180 : : class Builder;
181 : : class Pipeline;
182 : :
183 : : struct _capnpPrivate {
184 : : CAPNP_DECLARE_STRUCT_HEADER(9c44e6645d0b22c6, 0, 2)
185 : : #if !CAPNP_LITE
186 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
187 : : #endif // !CAPNP_LITE
188 : : };
189 : : };
190 : :
191 : : // =======================================================================================
192 : :
193 : : #if !CAPNP_LITE
194 [ + - ]: 2 : class ThreadMap::Client
195 : : : public virtual ::capnp::Capability::Client {
196 : : public:
197 : : typedef ThreadMap Calls;
198 : : typedef ThreadMap Reads;
199 : :
200 : : Client(decltype(nullptr));
201 : : explicit Client(::kj::Own< ::capnp::ClientHook>&& hook);
202 : : template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Server*>()>>
203 : : Client(::kj::Own<_t>&& server);
204 : : template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Client*>()>>
205 : : Client(::kj::Promise<_t>&& promise);
206 : : Client(::kj::Exception&& exception);
207 : : Client(Client&) = default;
208 : : Client(Client&&) = default;
209 : : Client& operator=(Client& other);
210 : : Client& operator=(Client&& other);
211 : :
212 : : ::capnp::Request< ::mp::ThreadMap::MakeThreadParams, ::mp::ThreadMap::MakeThreadResults> makeThreadRequest(
213 : : ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr);
214 : : ::capnp::Request< ::mp::ThreadMap::MakePoolParams, ::mp::ThreadMap::MakePoolResults> makePoolRequest(
215 : : ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr);
216 : :
217 : : protected:
218 : : Client() = default;
219 : : };
220 : :
221 : 0 : class ThreadMap::Server
222 : : : public virtual ::capnp::Capability::Server {
223 : : public:
224 : : typedef ThreadMap Serves;
225 : :
226 : : ::capnp::Capability::Server::DispatchCallResult dispatchCall(
227 : : uint64_t interfaceId, uint16_t methodId,
228 : : ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context)
229 : : override;
230 : :
231 : : protected:
232 : : typedef ::mp::ThreadMap::MakeThreadParams MakeThreadParams;
233 : : typedef ::mp::ThreadMap::MakeThreadResults MakeThreadResults;
234 : : typedef ::capnp::CallContext<MakeThreadParams, MakeThreadResults> MakeThreadContext;
235 : : virtual ::kj::Promise<void> makeThread(MakeThreadContext context);
236 : : typedef ::mp::ThreadMap::MakePoolParams MakePoolParams;
237 : : typedef ::mp::ThreadMap::MakePoolResults MakePoolResults;
238 : : typedef ::capnp::CallContext<MakePoolParams, MakePoolResults> MakePoolContext;
239 : : virtual ::kj::Promise<void> makePool(MakePoolContext context);
240 : :
241 : : inline ::mp::ThreadMap::Client thisCap() {
242 : : return ::capnp::Capability::Server::thisCap()
243 : : .template castAs< ::mp::ThreadMap>();
244 : : }
245 : :
246 : : ::capnp::Capability::Server::DispatchCallResult dispatchCallInternal(
247 : : uint16_t methodId,
248 : : ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context);
249 : : };
250 : : #endif // !CAPNP_LITE
251 : :
252 : : class ThreadMap::MakeThreadParams::Reader {
253 : : public:
254 : : typedef MakeThreadParams Reads;
255 : :
256 : : Reader() = default;
257 : 0 : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
258 : :
259 : : inline ::capnp::MessageSize totalSize() const {
260 : : return _reader.totalSize().asPublic();
261 : : }
262 : :
263 : : #if !CAPNP_LITE
264 : : inline ::kj::StringTree toString() const {
265 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
266 : : }
267 : : #endif // !CAPNP_LITE
268 : :
269 : : inline bool hasName() const;
270 : : inline ::capnp::Text::Reader getName() const;
271 : :
272 : : private:
273 : : ::capnp::_::StructReader _reader;
274 : : template <typename, ::capnp::Kind>
275 : : friend struct ::capnp::ToDynamic_;
276 : : template <typename, ::capnp::Kind>
277 : : friend struct ::capnp::_::PointerHelpers;
278 : : template <typename, ::capnp::Kind>
279 : : friend struct ::capnp::List;
280 : : friend class ::capnp::MessageBuilder;
281 : : friend class ::capnp::Orphanage;
282 : : };
283 : :
284 : : class ThreadMap::MakeThreadParams::Builder {
285 : : public:
286 : : typedef MakeThreadParams Builds;
287 : :
288 : : Builder() = delete; // Deleted to discourage incorrect usage.
289 : : // You can explicitly initialize to nullptr instead.
290 : : inline Builder(decltype(nullptr)) {}
291 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
292 : : inline operator Reader() const { return Reader(_builder.asReader()); }
293 : : inline Reader asReader() const { return *this; }
294 : :
295 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
296 : : #if !CAPNP_LITE
297 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
298 : : #endif // !CAPNP_LITE
299 : :
300 : : inline bool hasName();
301 : : inline ::capnp::Text::Builder getName();
302 : : inline void setName( ::capnp::Text::Reader value);
303 : : inline ::capnp::Text::Builder initName(unsigned int size);
304 : : inline void adoptName(::capnp::Orphan< ::capnp::Text>&& value);
305 : : inline ::capnp::Orphan< ::capnp::Text> disownName();
306 : :
307 : : private:
308 : : ::capnp::_::StructBuilder _builder;
309 : : template <typename, ::capnp::Kind>
310 : : friend struct ::capnp::ToDynamic_;
311 : : friend class ::capnp::Orphanage;
312 : : template <typename, ::capnp::Kind>
313 : : friend struct ::capnp::_::PointerHelpers;
314 : : };
315 : :
316 : : #if !CAPNP_LITE
317 : : class ThreadMap::MakeThreadParams::Pipeline {
318 : : public:
319 : : typedef MakeThreadParams Pipelines;
320 : :
321 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
322 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
323 : : : _typeless(kj::mv(typeless)) {}
324 : :
325 : : private:
326 : : ::capnp::AnyPointer::Pipeline _typeless;
327 : : friend class ::capnp::PipelineHook;
328 : : template <typename, ::capnp::Kind>
329 : : friend struct ::capnp::ToDynamic_;
330 : : };
331 : : #endif // !CAPNP_LITE
332 : :
333 : : class ThreadMap::MakeThreadResults::Reader {
334 : : public:
335 : : typedef MakeThreadResults Reads;
336 : :
337 : : Reader() = default;
338 : : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
339 : :
340 : : inline ::capnp::MessageSize totalSize() const {
341 : : return _reader.totalSize().asPublic();
342 : : }
343 : :
344 : : #if !CAPNP_LITE
345 : : inline ::kj::StringTree toString() const {
346 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
347 : : }
348 : : #endif // !CAPNP_LITE
349 : :
350 : : inline bool hasResult() const;
351 : : #if !CAPNP_LITE
352 : : inline ::mp::Thread::Client getResult() const;
353 : : #endif // !CAPNP_LITE
354 : :
355 : : private:
356 : : ::capnp::_::StructReader _reader;
357 : : template <typename, ::capnp::Kind>
358 : : friend struct ::capnp::ToDynamic_;
359 : : template <typename, ::capnp::Kind>
360 : : friend struct ::capnp::_::PointerHelpers;
361 : : template <typename, ::capnp::Kind>
362 : : friend struct ::capnp::List;
363 : : friend class ::capnp::MessageBuilder;
364 : : friend class ::capnp::Orphanage;
365 : : };
366 : :
367 : : class ThreadMap::MakeThreadResults::Builder {
368 : : public:
369 : : typedef MakeThreadResults Builds;
370 : :
371 : : Builder() = delete; // Deleted to discourage incorrect usage.
372 : : // You can explicitly initialize to nullptr instead.
373 : : inline Builder(decltype(nullptr)) {}
374 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
375 : : inline operator Reader() const { return Reader(_builder.asReader()); }
376 : : inline Reader asReader() const { return *this; }
377 : :
378 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
379 : : #if !CAPNP_LITE
380 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
381 : : #endif // !CAPNP_LITE
382 : :
383 : : inline bool hasResult();
384 : : #if !CAPNP_LITE
385 : : inline ::mp::Thread::Client getResult();
386 : : inline void setResult( ::mp::Thread::Client&& value);
387 : : inline void setResult( ::mp::Thread::Client& value);
388 : : inline void adoptResult(::capnp::Orphan< ::mp::Thread>&& value);
389 : : inline ::capnp::Orphan< ::mp::Thread> disownResult();
390 : : #endif // !CAPNP_LITE
391 : :
392 : : private:
393 : : ::capnp::_::StructBuilder _builder;
394 : : template <typename, ::capnp::Kind>
395 : : friend struct ::capnp::ToDynamic_;
396 : : friend class ::capnp::Orphanage;
397 : : template <typename, ::capnp::Kind>
398 : : friend struct ::capnp::_::PointerHelpers;
399 : : };
400 : :
401 : : #if !CAPNP_LITE
402 : : class ThreadMap::MakeThreadResults::Pipeline {
403 : : public:
404 : : typedef MakeThreadResults Pipelines;
405 : :
406 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
407 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
408 : : : _typeless(kj::mv(typeless)) {}
409 : :
410 : : inline ::mp::Thread::Client getResult();
411 : : private:
412 : : ::capnp::AnyPointer::Pipeline _typeless;
413 : : friend class ::capnp::PipelineHook;
414 : : template <typename, ::capnp::Kind>
415 : : friend struct ::capnp::ToDynamic_;
416 : : };
417 : : #endif // !CAPNP_LITE
418 : :
419 : : class ThreadMap::MakePoolParams::Reader {
420 : : public:
421 : : typedef MakePoolParams Reads;
422 : :
423 : : Reader() = default;
424 : 0 : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
425 : :
426 : : inline ::capnp::MessageSize totalSize() const {
427 : : return _reader.totalSize().asPublic();
428 : : }
429 : :
430 : : #if !CAPNP_LITE
431 : : inline ::kj::StringTree toString() const {
432 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
433 : : }
434 : : #endif // !CAPNP_LITE
435 : :
436 : : inline ::uint32_t getCount() const;
437 : :
438 : : private:
439 : : ::capnp::_::StructReader _reader;
440 : : template <typename, ::capnp::Kind>
441 : : friend struct ::capnp::ToDynamic_;
442 : : template <typename, ::capnp::Kind>
443 : : friend struct ::capnp::_::PointerHelpers;
444 : : template <typename, ::capnp::Kind>
445 : : friend struct ::capnp::List;
446 : : friend class ::capnp::MessageBuilder;
447 : : friend class ::capnp::Orphanage;
448 : : };
449 : :
450 : : class ThreadMap::MakePoolParams::Builder {
451 : : public:
452 : : typedef MakePoolParams Builds;
453 : :
454 : : Builder() = delete; // Deleted to discourage incorrect usage.
455 : : // You can explicitly initialize to nullptr instead.
456 : : inline Builder(decltype(nullptr)) {}
457 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
458 : : inline operator Reader() const { return Reader(_builder.asReader()); }
459 : : inline Reader asReader() const { return *this; }
460 : :
461 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
462 : : #if !CAPNP_LITE
463 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
464 : : #endif // !CAPNP_LITE
465 : :
466 : : inline ::uint32_t getCount();
467 : : inline void setCount( ::uint32_t value);
468 : :
469 : : private:
470 : : ::capnp::_::StructBuilder _builder;
471 : : template <typename, ::capnp::Kind>
472 : : friend struct ::capnp::ToDynamic_;
473 : : friend class ::capnp::Orphanage;
474 : : template <typename, ::capnp::Kind>
475 : : friend struct ::capnp::_::PointerHelpers;
476 : : };
477 : :
478 : : #if !CAPNP_LITE
479 : : class ThreadMap::MakePoolParams::Pipeline {
480 : : public:
481 : : typedef MakePoolParams Pipelines;
482 : :
483 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
484 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
485 : : : _typeless(kj::mv(typeless)) {}
486 : :
487 : : private:
488 : : ::capnp::AnyPointer::Pipeline _typeless;
489 : : friend class ::capnp::PipelineHook;
490 : : template <typename, ::capnp::Kind>
491 : : friend struct ::capnp::ToDynamic_;
492 : : };
493 : : #endif // !CAPNP_LITE
494 : :
495 : : class ThreadMap::MakePoolResults::Reader {
496 : : public:
497 : : typedef MakePoolResults Reads;
498 : :
499 : : Reader() = default;
500 : : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
501 : :
502 : : inline ::capnp::MessageSize totalSize() const {
503 : : return _reader.totalSize().asPublic();
504 : : }
505 : :
506 : : #if !CAPNP_LITE
507 : : inline ::kj::StringTree toString() const {
508 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
509 : : }
510 : : #endif // !CAPNP_LITE
511 : :
512 : : private:
513 : : ::capnp::_::StructReader _reader;
514 : : template <typename, ::capnp::Kind>
515 : : friend struct ::capnp::ToDynamic_;
516 : : template <typename, ::capnp::Kind>
517 : : friend struct ::capnp::_::PointerHelpers;
518 : : template <typename, ::capnp::Kind>
519 : : friend struct ::capnp::List;
520 : : friend class ::capnp::MessageBuilder;
521 : : friend class ::capnp::Orphanage;
522 : : };
523 : :
524 : : class ThreadMap::MakePoolResults::Builder {
525 : : public:
526 : : typedef MakePoolResults Builds;
527 : :
528 : : Builder() = delete; // Deleted to discourage incorrect usage.
529 : : // You can explicitly initialize to nullptr instead.
530 : : inline Builder(decltype(nullptr)) {}
531 : : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
532 : : inline operator Reader() const { return Reader(_builder.asReader()); }
533 : : inline Reader asReader() const { return *this; }
534 : :
535 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
536 : : #if !CAPNP_LITE
537 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
538 : : #endif // !CAPNP_LITE
539 : :
540 : : private:
541 : : ::capnp::_::StructBuilder _builder;
542 : : template <typename, ::capnp::Kind>
543 : : friend struct ::capnp::ToDynamic_;
544 : : friend class ::capnp::Orphanage;
545 : : template <typename, ::capnp::Kind>
546 : : friend struct ::capnp::_::PointerHelpers;
547 : : };
548 : :
549 : : #if !CAPNP_LITE
550 : : class ThreadMap::MakePoolResults::Pipeline {
551 : : public:
552 : : typedef MakePoolResults Pipelines;
553 : :
554 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
555 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
556 : : : _typeless(kj::mv(typeless)) {}
557 : :
558 : : private:
559 : : ::capnp::AnyPointer::Pipeline _typeless;
560 : : friend class ::capnp::PipelineHook;
561 : : template <typename, ::capnp::Kind>
562 : : friend struct ::capnp::ToDynamic_;
563 : : };
564 : : #endif // !CAPNP_LITE
565 : :
566 : : #if !CAPNP_LITE
567 [ # # # # : 0 : class Thread::Client
# # # # #
# ]
568 : : : public virtual ::capnp::Capability::Client {
569 : : public:
570 : : typedef Thread Calls;
571 : : typedef Thread Reads;
572 : :
573 : : Client(decltype(nullptr));
574 : : explicit Client(::kj::Own< ::capnp::ClientHook>&& hook);
575 : : template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Server*>()>>
576 : : Client(::kj::Own<_t>&& server);
577 : : template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Client*>()>>
578 : : Client(::kj::Promise<_t>&& promise);
579 : : Client(::kj::Exception&& exception);
580 : : Client(Client&) = default;
581 [ # # # # ]: 0 : Client(Client&&) = default;
582 : : Client& operator=(Client& other);
583 : : Client& operator=(Client&& other);
584 : :
585 : : ::capnp::Request< ::mp::Thread::GetNameParams, ::mp::Thread::GetNameResults> getNameRequest(
586 : : ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr);
587 : :
588 : : protected:
589 : : Client() = default;
590 : : };
591 : :
592 : 0 : class Thread::Server
593 : : : public virtual ::capnp::Capability::Server {
594 : : public:
595 : : typedef Thread Serves;
596 : :
597 : : ::capnp::Capability::Server::DispatchCallResult dispatchCall(
598 : : uint64_t interfaceId, uint16_t methodId,
599 : : ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context)
600 : : override;
601 : :
602 : : protected:
603 : : typedef ::mp::Thread::GetNameParams GetNameParams;
604 : : typedef ::mp::Thread::GetNameResults GetNameResults;
605 : : typedef ::capnp::CallContext<GetNameParams, GetNameResults> GetNameContext;
606 : : virtual ::kj::Promise<void> getName(GetNameContext context);
607 : :
608 : : inline ::mp::Thread::Client thisCap() {
609 : : return ::capnp::Capability::Server::thisCap()
610 : : .template castAs< ::mp::Thread>();
611 : : }
612 : :
613 : : ::capnp::Capability::Server::DispatchCallResult dispatchCallInternal(
614 : : uint16_t methodId,
615 : : ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context);
616 : : };
617 : : #endif // !CAPNP_LITE
618 : :
619 : : class Thread::GetNameParams::Reader {
620 : : public:
621 : : typedef GetNameParams Reads;
622 : :
623 : : Reader() = default;
624 : : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
625 : :
626 : : inline ::capnp::MessageSize totalSize() const {
627 : : return _reader.totalSize().asPublic();
628 : : }
629 : :
630 : : #if !CAPNP_LITE
631 : : inline ::kj::StringTree toString() const {
632 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
633 : : }
634 : : #endif // !CAPNP_LITE
635 : :
636 : : private:
637 : : ::capnp::_::StructReader _reader;
638 : : template <typename, ::capnp::Kind>
639 : : friend struct ::capnp::ToDynamic_;
640 : : template <typename, ::capnp::Kind>
641 : : friend struct ::capnp::_::PointerHelpers;
642 : : template <typename, ::capnp::Kind>
643 : : friend struct ::capnp::List;
644 : : friend class ::capnp::MessageBuilder;
645 : : friend class ::capnp::Orphanage;
646 : : };
647 : :
648 : : class Thread::GetNameParams::Builder {
649 : : public:
650 : : typedef GetNameParams Builds;
651 : :
652 : : Builder() = delete; // Deleted to discourage incorrect usage.
653 : : // You can explicitly initialize to nullptr instead.
654 : : inline Builder(decltype(nullptr)) {}
655 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
656 : : inline operator Reader() const { return Reader(_builder.asReader()); }
657 : : inline Reader asReader() const { return *this; }
658 : :
659 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
660 : : #if !CAPNP_LITE
661 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
662 : : #endif // !CAPNP_LITE
663 : :
664 : : private:
665 : : ::capnp::_::StructBuilder _builder;
666 : : template <typename, ::capnp::Kind>
667 : : friend struct ::capnp::ToDynamic_;
668 : : friend class ::capnp::Orphanage;
669 : : template <typename, ::capnp::Kind>
670 : : friend struct ::capnp::_::PointerHelpers;
671 : : };
672 : :
673 : : #if !CAPNP_LITE
674 : : class Thread::GetNameParams::Pipeline {
675 : : public:
676 : : typedef GetNameParams Pipelines;
677 : :
678 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
679 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
680 : : : _typeless(kj::mv(typeless)) {}
681 : :
682 : : private:
683 : : ::capnp::AnyPointer::Pipeline _typeless;
684 : : friend class ::capnp::PipelineHook;
685 : : template <typename, ::capnp::Kind>
686 : : friend struct ::capnp::ToDynamic_;
687 : : };
688 : : #endif // !CAPNP_LITE
689 : :
690 : : class Thread::GetNameResults::Reader {
691 : : public:
692 : : typedef GetNameResults Reads;
693 : :
694 : : Reader() = default;
695 : : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
696 : :
697 : : inline ::capnp::MessageSize totalSize() const {
698 : : return _reader.totalSize().asPublic();
699 : : }
700 : :
701 : : #if !CAPNP_LITE
702 : : inline ::kj::StringTree toString() const {
703 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
704 : : }
705 : : #endif // !CAPNP_LITE
706 : :
707 : : inline bool hasResult() const;
708 : : inline ::capnp::Text::Reader getResult() const;
709 : :
710 : : private:
711 : : ::capnp::_::StructReader _reader;
712 : : template <typename, ::capnp::Kind>
713 : : friend struct ::capnp::ToDynamic_;
714 : : template <typename, ::capnp::Kind>
715 : : friend struct ::capnp::_::PointerHelpers;
716 : : template <typename, ::capnp::Kind>
717 : : friend struct ::capnp::List;
718 : : friend class ::capnp::MessageBuilder;
719 : : friend class ::capnp::Orphanage;
720 : : };
721 : :
722 : : class Thread::GetNameResults::Builder {
723 : : public:
724 : : typedef GetNameResults Builds;
725 : :
726 : : Builder() = delete; // Deleted to discourage incorrect usage.
727 : : // You can explicitly initialize to nullptr instead.
728 : : inline Builder(decltype(nullptr)) {}
729 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
730 : : inline operator Reader() const { return Reader(_builder.asReader()); }
731 : : inline Reader asReader() const { return *this; }
732 : :
733 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
734 : : #if !CAPNP_LITE
735 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
736 : : #endif // !CAPNP_LITE
737 : :
738 : : inline bool hasResult();
739 : : inline ::capnp::Text::Builder getResult();
740 : : inline void setResult( ::capnp::Text::Reader value);
741 : : inline ::capnp::Text::Builder initResult(unsigned int size);
742 : : inline void adoptResult(::capnp::Orphan< ::capnp::Text>&& value);
743 : : inline ::capnp::Orphan< ::capnp::Text> disownResult();
744 : :
745 : : private:
746 : : ::capnp::_::StructBuilder _builder;
747 : : template <typename, ::capnp::Kind>
748 : : friend struct ::capnp::ToDynamic_;
749 : : friend class ::capnp::Orphanage;
750 : : template <typename, ::capnp::Kind>
751 : : friend struct ::capnp::_::PointerHelpers;
752 : : };
753 : :
754 : : #if !CAPNP_LITE
755 : : class Thread::GetNameResults::Pipeline {
756 : : public:
757 : : typedef GetNameResults Pipelines;
758 : :
759 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
760 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
761 : : : _typeless(kj::mv(typeless)) {}
762 : :
763 : : private:
764 : : ::capnp::AnyPointer::Pipeline _typeless;
765 : : friend class ::capnp::PipelineHook;
766 : : template <typename, ::capnp::Kind>
767 : : friend struct ::capnp::ToDynamic_;
768 : : };
769 : : #endif // !CAPNP_LITE
770 : :
771 : : class Context::Reader {
772 : : public:
773 : : typedef Context Reads;
774 : :
775 : : Reader() = default;
776 : : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
777 : :
778 : : inline ::capnp::MessageSize totalSize() const {
779 : : return _reader.totalSize().asPublic();
780 : : }
781 : :
782 : : #if !CAPNP_LITE
783 : : inline ::kj::StringTree toString() const {
784 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
785 : : }
786 : : #endif // !CAPNP_LITE
787 : :
788 : : inline bool hasThread() const;
789 : : #if !CAPNP_LITE
790 : : inline ::mp::Thread::Client getThread() const;
791 : : #endif // !CAPNP_LITE
792 : :
793 : : inline bool hasCallbackThread() const;
794 : : #if !CAPNP_LITE
795 : : inline ::mp::Thread::Client getCallbackThread() const;
796 : : #endif // !CAPNP_LITE
797 : :
798 : : private:
799 : : ::capnp::_::StructReader _reader;
800 : : template <typename, ::capnp::Kind>
801 : : friend struct ::capnp::ToDynamic_;
802 : : template <typename, ::capnp::Kind>
803 : : friend struct ::capnp::_::PointerHelpers;
804 : : template <typename, ::capnp::Kind>
805 : : friend struct ::capnp::List;
806 : : friend class ::capnp::MessageBuilder;
807 : : friend class ::capnp::Orphanage;
808 : : };
809 : :
810 : : class Context::Builder {
811 : : public:
812 : : typedef Context Builds;
813 : :
814 : : Builder() = delete; // Deleted to discourage incorrect usage.
815 : : // You can explicitly initialize to nullptr instead.
816 : : inline Builder(decltype(nullptr)) {}
817 : : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
818 : : inline operator Reader() const { return Reader(_builder.asReader()); }
819 : : inline Reader asReader() const { return *this; }
820 : :
821 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
822 : : #if !CAPNP_LITE
823 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
824 : : #endif // !CAPNP_LITE
825 : :
826 : : inline bool hasThread();
827 : : #if !CAPNP_LITE
828 : : inline ::mp::Thread::Client getThread();
829 : : inline void setThread( ::mp::Thread::Client&& value);
830 : : inline void setThread( ::mp::Thread::Client& value);
831 : : inline void adoptThread(::capnp::Orphan< ::mp::Thread>&& value);
832 : : inline ::capnp::Orphan< ::mp::Thread> disownThread();
833 : : #endif // !CAPNP_LITE
834 : :
835 : : inline bool hasCallbackThread();
836 : : #if !CAPNP_LITE
837 : : inline ::mp::Thread::Client getCallbackThread();
838 : : inline void setCallbackThread( ::mp::Thread::Client&& value);
839 : : inline void setCallbackThread( ::mp::Thread::Client& value);
840 : : inline void adoptCallbackThread(::capnp::Orphan< ::mp::Thread>&& value);
841 : : inline ::capnp::Orphan< ::mp::Thread> disownCallbackThread();
842 : : #endif // !CAPNP_LITE
843 : :
844 : : private:
845 : : ::capnp::_::StructBuilder _builder;
846 : : template <typename, ::capnp::Kind>
847 : : friend struct ::capnp::ToDynamic_;
848 : : friend class ::capnp::Orphanage;
849 : : template <typename, ::capnp::Kind>
850 : : friend struct ::capnp::_::PointerHelpers;
851 : : };
852 : :
853 : : #if !CAPNP_LITE
854 : : class Context::Pipeline {
855 : : public:
856 : : typedef Context Pipelines;
857 : :
858 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
859 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
860 : : : _typeless(kj::mv(typeless)) {}
861 : :
862 : : inline ::mp::Thread::Client getThread();
863 : : inline ::mp::Thread::Client getCallbackThread();
864 : : private:
865 : : ::capnp::AnyPointer::Pipeline _typeless;
866 : : friend class ::capnp::PipelineHook;
867 : : template <typename, ::capnp::Kind>
868 : : friend struct ::capnp::ToDynamic_;
869 : : };
870 : : #endif // !CAPNP_LITE
871 : :
872 : : // =======================================================================================
873 : :
874 : : #if !CAPNP_LITE
875 : 2 : inline ThreadMap::Client::Client(decltype(nullptr))
876 [ + - + - ]: 2 : : ::capnp::Capability::Client(nullptr) {}
877 : : inline ThreadMap::Client::Client(
878 : : ::kj::Own< ::capnp::ClientHook>&& hook)
879 : : : ::capnp::Capability::Client(::kj::mv(hook)) {}
880 : : template <typename _t, typename>
881 : : inline ThreadMap::Client::Client(::kj::Own<_t>&& server)
882 : : : ::capnp::Capability::Client(::kj::mv(server)) {}
883 : : template <typename _t, typename>
884 : : inline ThreadMap::Client::Client(::kj::Promise<_t>&& promise)
885 : : : ::capnp::Capability::Client(::kj::mv(promise)) {}
886 : : inline ThreadMap::Client::Client(::kj::Exception&& exception)
887 : : : ::capnp::Capability::Client(::kj::mv(exception)) {}
888 : : inline ::mp::ThreadMap::Client& ThreadMap::Client::operator=(Client& other) {
889 : : ::capnp::Capability::Client::operator=(other);
890 : : return *this;
891 : : }
892 : : inline ::mp::ThreadMap::Client& ThreadMap::Client::operator=(Client&& other) {
893 : : ::capnp::Capability::Client::operator=(kj::mv(other));
894 : : return *this;
895 : : }
896 : :
897 : : #endif // !CAPNP_LITE
898 : : inline bool ThreadMap::MakeThreadParams::Reader::hasName() const {
899 : : return !_reader.getPointerField(
900 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
901 : : }
902 : : inline bool ThreadMap::MakeThreadParams::Builder::hasName() {
903 : : return !_builder.getPointerField(
904 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
905 : : }
906 : 0 : inline ::capnp::Text::Reader ThreadMap::MakeThreadParams::Reader::getName() const {
907 [ # # ]: 0 : return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
908 : 0 : ::capnp::bounded<0>() * ::capnp::POINTERS));
909 : : }
910 : : inline ::capnp::Text::Builder ThreadMap::MakeThreadParams::Builder::getName() {
911 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
912 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
913 : : }
914 : : inline void ThreadMap::MakeThreadParams::Builder::setName( ::capnp::Text::Reader value) {
915 : : ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
916 : : ::capnp::bounded<0>() * ::capnp::POINTERS), value);
917 : : }
918 : : inline ::capnp::Text::Builder ThreadMap::MakeThreadParams::Builder::initName(unsigned int size) {
919 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
920 : : ::capnp::bounded<0>() * ::capnp::POINTERS), size);
921 : : }
922 : : inline void ThreadMap::MakeThreadParams::Builder::adoptName(
923 : : ::capnp::Orphan< ::capnp::Text>&& value) {
924 : : ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
925 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
926 : : }
927 : : inline ::capnp::Orphan< ::capnp::Text> ThreadMap::MakeThreadParams::Builder::disownName() {
928 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
929 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
930 : : }
931 : :
932 : : inline bool ThreadMap::MakeThreadResults::Reader::hasResult() const {
933 : : return !_reader.getPointerField(
934 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
935 : : }
936 : : inline bool ThreadMap::MakeThreadResults::Builder::hasResult() {
937 : : return !_builder.getPointerField(
938 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
939 : : }
940 : : #if !CAPNP_LITE
941 : : inline ::mp::Thread::Client ThreadMap::MakeThreadResults::Reader::getResult() const {
942 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_reader.getPointerField(
943 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
944 : : }
945 : : inline ::mp::Thread::Client ThreadMap::MakeThreadResults::Builder::getResult() {
946 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_builder.getPointerField(
947 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
948 : : }
949 : : inline ::mp::Thread::Client ThreadMap::MakeThreadResults::Pipeline::getResult() {
950 : : return ::mp::Thread::Client(_typeless.getPointerField(0).asCap());
951 : : }
952 : 0 : inline void ThreadMap::MakeThreadResults::Builder::setResult( ::mp::Thread::Client&& cap) {
953 : 0 : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
954 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(cap));
955 : 0 : }
956 : : inline void ThreadMap::MakeThreadResults::Builder::setResult( ::mp::Thread::Client& cap) {
957 : : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
958 : : ::capnp::bounded<0>() * ::capnp::POINTERS), cap);
959 : : }
960 : : inline void ThreadMap::MakeThreadResults::Builder::adoptResult(
961 : : ::capnp::Orphan< ::mp::Thread>&& value) {
962 : : ::capnp::_::PointerHelpers< ::mp::Thread>::adopt(_builder.getPointerField(
963 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
964 : : }
965 : : inline ::capnp::Orphan< ::mp::Thread> ThreadMap::MakeThreadResults::Builder::disownResult() {
966 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::disown(_builder.getPointerField(
967 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
968 : : }
969 : : #endif // !CAPNP_LITE
970 : :
971 : 0 : inline ::uint32_t ThreadMap::MakePoolParams::Reader::getCount() const {
972 [ # # ]: 0 : return _reader.getDataField< ::uint32_t>(
973 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS);
974 : : }
975 : :
976 : : inline ::uint32_t ThreadMap::MakePoolParams::Builder::getCount() {
977 : : return _builder.getDataField< ::uint32_t>(
978 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS);
979 : : }
980 : : inline void ThreadMap::MakePoolParams::Builder::setCount( ::uint32_t value) {
981 : : _builder.setDataField< ::uint32_t>(
982 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS, value);
983 : : }
984 : :
985 : : #if !CAPNP_LITE
986 : : inline Thread::Client::Client(decltype(nullptr))
987 : : : ::capnp::Capability::Client(nullptr) {}
988 : 0 : inline Thread::Client::Client(
989 : : ::kj::Own< ::capnp::ClientHook>&& hook)
990 [ # # ]: 0 : : ::capnp::Capability::Client(::kj::mv(hook)) {}
991 : : template <typename _t, typename>
992 : : inline Thread::Client::Client(::kj::Own<_t>&& server)
993 : : : ::capnp::Capability::Client(::kj::mv(server)) {}
994 : : template <typename _t, typename>
995 : : inline Thread::Client::Client(::kj::Promise<_t>&& promise)
996 : : : ::capnp::Capability::Client(::kj::mv(promise)) {}
997 : : inline Thread::Client::Client(::kj::Exception&& exception)
998 : : : ::capnp::Capability::Client(::kj::mv(exception)) {}
999 : : inline ::mp::Thread::Client& Thread::Client::operator=(Client& other) {
1000 : : ::capnp::Capability::Client::operator=(other);
1001 : : return *this;
1002 : : }
1003 : : inline ::mp::Thread::Client& Thread::Client::operator=(Client&& other) {
1004 : : ::capnp::Capability::Client::operator=(kj::mv(other));
1005 : : return *this;
1006 : : }
1007 : :
1008 : : #endif // !CAPNP_LITE
1009 : : inline bool Thread::GetNameResults::Reader::hasResult() const {
1010 : : return !_reader.getPointerField(
1011 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1012 : : }
1013 : : inline bool Thread::GetNameResults::Builder::hasResult() {
1014 : : return !_builder.getPointerField(
1015 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1016 : : }
1017 : : inline ::capnp::Text::Reader Thread::GetNameResults::Reader::getResult() const {
1018 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
1019 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1020 : : }
1021 : : inline ::capnp::Text::Builder Thread::GetNameResults::Builder::getResult() {
1022 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
1023 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1024 : : }
1025 : 0 : inline void Thread::GetNameResults::Builder::setResult( ::capnp::Text::Reader value) {
1026 : 0 : ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
1027 : : ::capnp::bounded<0>() * ::capnp::POINTERS), value);
1028 : 0 : }
1029 : : inline ::capnp::Text::Builder Thread::GetNameResults::Builder::initResult(unsigned int size) {
1030 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
1031 : : ::capnp::bounded<0>() * ::capnp::POINTERS), size);
1032 : : }
1033 : : inline void Thread::GetNameResults::Builder::adoptResult(
1034 : : ::capnp::Orphan< ::capnp::Text>&& value) {
1035 : : ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
1036 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
1037 : : }
1038 : : inline ::capnp::Orphan< ::capnp::Text> Thread::GetNameResults::Builder::disownResult() {
1039 : : return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
1040 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1041 : : }
1042 : :
1043 : : inline bool Context::Reader::hasThread() const {
1044 : : return !_reader.getPointerField(
1045 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1046 : : }
1047 : : inline bool Context::Builder::hasThread() {
1048 : : return !_builder.getPointerField(
1049 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1050 : : }
1051 : : #if !CAPNP_LITE
1052 : : inline ::mp::Thread::Client Context::Reader::getThread() const {
1053 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_reader.getPointerField(
1054 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1055 : : }
1056 : : inline ::mp::Thread::Client Context::Builder::getThread() {
1057 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_builder.getPointerField(
1058 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1059 : : }
1060 : : inline ::mp::Thread::Client Context::Pipeline::getThread() {
1061 : : return ::mp::Thread::Client(_typeless.getPointerField(0).asCap());
1062 : : }
1063 : : inline void Context::Builder::setThread( ::mp::Thread::Client&& cap) {
1064 : : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
1065 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(cap));
1066 : : }
1067 : : inline void Context::Builder::setThread( ::mp::Thread::Client& cap) {
1068 : : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
1069 : : ::capnp::bounded<0>() * ::capnp::POINTERS), cap);
1070 : : }
1071 : : inline void Context::Builder::adoptThread(
1072 : : ::capnp::Orphan< ::mp::Thread>&& value) {
1073 : : ::capnp::_::PointerHelpers< ::mp::Thread>::adopt(_builder.getPointerField(
1074 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
1075 : : }
1076 : : inline ::capnp::Orphan< ::mp::Thread> Context::Builder::disownThread() {
1077 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::disown(_builder.getPointerField(
1078 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
1079 : : }
1080 : : #endif // !CAPNP_LITE
1081 : :
1082 : : inline bool Context::Reader::hasCallbackThread() const {
1083 : : return !_reader.getPointerField(
1084 : : ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1085 : : }
1086 : : inline bool Context::Builder::hasCallbackThread() {
1087 : : return !_builder.getPointerField(
1088 : : ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1089 : : }
1090 : : #if !CAPNP_LITE
1091 : : inline ::mp::Thread::Client Context::Reader::getCallbackThread() const {
1092 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_reader.getPointerField(
1093 : : ::capnp::bounded<1>() * ::capnp::POINTERS));
1094 : : }
1095 : : inline ::mp::Thread::Client Context::Builder::getCallbackThread() {
1096 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::get(_builder.getPointerField(
1097 : : ::capnp::bounded<1>() * ::capnp::POINTERS));
1098 : : }
1099 : : inline ::mp::Thread::Client Context::Pipeline::getCallbackThread() {
1100 : : return ::mp::Thread::Client(_typeless.getPointerField(1).asCap());
1101 : : }
1102 : : inline void Context::Builder::setCallbackThread( ::mp::Thread::Client&& cap) {
1103 : : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
1104 : : ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(cap));
1105 : : }
1106 : : inline void Context::Builder::setCallbackThread( ::mp::Thread::Client& cap) {
1107 : : ::capnp::_::PointerHelpers< ::mp::Thread>::set(_builder.getPointerField(
1108 : : ::capnp::bounded<1>() * ::capnp::POINTERS), cap);
1109 : : }
1110 : : inline void Context::Builder::adoptCallbackThread(
1111 : : ::capnp::Orphan< ::mp::Thread>&& value) {
1112 : : ::capnp::_::PointerHelpers< ::mp::Thread>::adopt(_builder.getPointerField(
1113 : : ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value));
1114 : : }
1115 : : inline ::capnp::Orphan< ::mp::Thread> Context::Builder::disownCallbackThread() {
1116 : : return ::capnp::_::PointerHelpers< ::mp::Thread>::disown(_builder.getPointerField(
1117 : : ::capnp::bounded<1>() * ::capnp::POINTERS));
1118 : : }
1119 : : #endif // !CAPNP_LITE
1120 : :
1121 : : } // namespace
1122 : :
1123 : : CAPNP_END_HEADER
1124 : :
|