Branch data Line data Source code
1 : : // Generated by Cap'n Proto compiler, DO NOT EDIT
2 : : // source: common.capnp
3 : :
4 : : #pragma once
5 : :
6 : : #include <capnp/generated-header-support.h>
7 : : #include <kj/windows-sanity.h>
8 : :
9 : : #ifndef CAPNP_VERSION
10 : : #error "CAPNP_VERSION is not defined, is capnp/generated-header-support.h missing?"
11 : : #elif CAPNP_VERSION != 1001000
12 : : #error "Version mismatch between generated code and library headers. You must use the same version of the Cap'n Proto compiler and library."
13 : : #endif
14 : :
15 : :
16 : : CAPNP_BEGIN_HEADER
17 : :
18 : : namespace capnp {
19 : : namespace schemas {
20 : :
21 : : CAPNP_DECLARE_SCHEMA(b3be4b8949350369);
22 : :
23 : : } // namespace schemas
24 : : } // namespace capnp
25 : :
26 : : namespace ipc {
27 : : namespace capnp {
28 : : namespace messages {
29 : :
30 : : struct BlockRef {
31 : : BlockRef() = delete;
32 : :
33 : : class Reader;
34 : : class Builder;
35 : : class Pipeline;
36 : :
37 : : struct _capnpPrivate {
38 : : CAPNP_DECLARE_STRUCT_HEADER(b3be4b8949350369, 1, 1)
39 : : #if !CAPNP_LITE
40 : : static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
41 : : #endif // !CAPNP_LITE
42 : : };
43 : : };
44 : :
45 : : // =======================================================================================
46 : :
47 : : class BlockRef::Reader {
48 : : public:
49 : : typedef BlockRef Reads;
50 : :
51 : : Reader() = default;
52 : 0 : inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}
53 : :
54 : : inline ::capnp::MessageSize totalSize() const {
55 : : return _reader.totalSize().asPublic();
56 : : }
57 : :
58 : : #if !CAPNP_LITE
59 : : inline ::kj::StringTree toString() const {
60 : : return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
61 : : }
62 : : #endif // !CAPNP_LITE
63 : :
64 : : inline bool hasHash() const;
65 : : inline ::capnp::Data::Reader getHash() const;
66 : :
67 : : inline ::int32_t getHeight() const;
68 : :
69 : : private:
70 : : ::capnp::_::StructReader _reader;
71 : : template <typename, ::capnp::Kind>
72 : : friend struct ::capnp::ToDynamic_;
73 : : template <typename, ::capnp::Kind>
74 : : friend struct ::capnp::_::PointerHelpers;
75 : : template <typename, ::capnp::Kind>
76 : : friend struct ::capnp::List;
77 : : friend class ::capnp::MessageBuilder;
78 : : friend class ::capnp::Orphanage;
79 : : };
80 : :
81 : : class BlockRef::Builder {
82 : : public:
83 : : typedef BlockRef Builds;
84 : :
85 : : Builder() = delete; // Deleted to discourage incorrect usage.
86 : : // You can explicitly initialize to nullptr instead.
87 : : inline Builder(decltype(nullptr)) {}
88 : 0 : inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
89 : : inline operator Reader() const { return Reader(_builder.asReader()); }
90 : : inline Reader asReader() const { return *this; }
91 : :
92 : : inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
93 : : #if !CAPNP_LITE
94 : : inline ::kj::StringTree toString() const { return asReader().toString(); }
95 : : #endif // !CAPNP_LITE
96 : :
97 : : inline bool hasHash();
98 : : inline ::capnp::Data::Builder getHash();
99 : : inline void setHash( ::capnp::Data::Reader value);
100 : : inline ::capnp::Data::Builder initHash(unsigned int size);
101 : : inline void adoptHash(::capnp::Orphan< ::capnp::Data>&& value);
102 : : inline ::capnp::Orphan< ::capnp::Data> disownHash();
103 : :
104 : : inline ::int32_t getHeight();
105 : : inline void setHeight( ::int32_t value);
106 : :
107 : : private:
108 : : ::capnp::_::StructBuilder _builder;
109 : : template <typename, ::capnp::Kind>
110 : : friend struct ::capnp::ToDynamic_;
111 : : friend class ::capnp::Orphanage;
112 : : template <typename, ::capnp::Kind>
113 : : friend struct ::capnp::_::PointerHelpers;
114 : : };
115 : :
116 : : #if !CAPNP_LITE
117 : : class BlockRef::Pipeline {
118 : : public:
119 : : typedef BlockRef Pipelines;
120 : :
121 : : inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
122 : : inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
123 : : : _typeless(kj::mv(typeless)) {}
124 : :
125 : : private:
126 : : ::capnp::AnyPointer::Pipeline _typeless;
127 : : friend class ::capnp::PipelineHook;
128 : : template <typename, ::capnp::Kind>
129 : : friend struct ::capnp::ToDynamic_;
130 : : };
131 : : #endif // !CAPNP_LITE
132 : :
133 : : // =======================================================================================
134 : :
135 : 0 : inline bool BlockRef::Reader::hasHash() const {
136 [ # # ]: 0 : return !_reader.getPointerField(
137 : 0 : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
138 : : }
139 : : inline bool BlockRef::Builder::hasHash() {
140 : : return !_builder.getPointerField(
141 : : ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
142 : : }
143 : 0 : inline ::capnp::Data::Reader BlockRef::Reader::getHash() const {
144 [ # # ]: 0 : return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_reader.getPointerField(
145 : 0 : ::capnp::bounded<0>() * ::capnp::POINTERS));
146 : : }
147 : : inline ::capnp::Data::Builder BlockRef::Builder::getHash() {
148 : : return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_builder.getPointerField(
149 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
150 : : }
151 : : inline void BlockRef::Builder::setHash( ::capnp::Data::Reader value) {
152 : : ::capnp::_::PointerHelpers< ::capnp::Data>::set(_builder.getPointerField(
153 : : ::capnp::bounded<0>() * ::capnp::POINTERS), value);
154 : : }
155 : 0 : inline ::capnp::Data::Builder BlockRef::Builder::initHash(unsigned int size) {
156 : 0 : return ::capnp::_::PointerHelpers< ::capnp::Data>::init(_builder.getPointerField(
157 : 0 : ::capnp::bounded<0>() * ::capnp::POINTERS), size);
158 : : }
159 : : inline void BlockRef::Builder::adoptHash(
160 : : ::capnp::Orphan< ::capnp::Data>&& value) {
161 : : ::capnp::_::PointerHelpers< ::capnp::Data>::adopt(_builder.getPointerField(
162 : : ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
163 : : }
164 : : inline ::capnp::Orphan< ::capnp::Data> BlockRef::Builder::disownHash() {
165 : : return ::capnp::_::PointerHelpers< ::capnp::Data>::disown(_builder.getPointerField(
166 : : ::capnp::bounded<0>() * ::capnp::POINTERS));
167 : : }
168 : :
169 : 0 : inline ::int32_t BlockRef::Reader::getHeight() const {
170 [ # # ]: 0 : return _reader.getDataField< ::int32_t>(
171 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS);
172 : : }
173 : :
174 : : inline ::int32_t BlockRef::Builder::getHeight() {
175 : : return _builder.getDataField< ::int32_t>(
176 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS);
177 : : }
178 : 0 : inline void BlockRef::Builder::setHeight( ::int32_t value) {
179 : 0 : _builder.setDataField< ::int32_t>(
180 : : ::capnp::bounded<0>() * ::capnp::ELEMENTS, value);
181 : : }
182 : :
183 : : } // namespace
184 : : } // namespace
185 : : } // namespace
186 : :
187 : : CAPNP_END_HEADER
188 : :
|