Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
5de5e5cb
Commit
5de5e5cb
authored
Apr 25, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect when 'capnp' and 'capnpc-c++' are mismatching versions.
Fixes #405
parent
d68cffe5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
350 additions
and
17 deletions
+350
-17
capnp.c++
c++/src/capnp/compiler/capnp.c++
+5
-0
capnpc-c++.c++
c++/src/capnp/compiler/capnpc-c++.c++
+21
-0
schema.capnp
c++/src/capnp/schema.capnp
+14
-0
schema.capnp.c++
c++/src/capnp/schema.capnp.c++
+115
-16
schema.capnp.h
c++/src/capnp/schema.capnp.h
+195
-1
No files found.
c++/src/capnp/compiler/capnp.c++
View file @
5de5e5cb
...
...
@@ -422,6 +422,11 @@ public:
MallocMessageBuilder
message
;
auto
request
=
message
.
initRoot
<
schema
::
CodeGeneratorRequest
>
();
auto
version
=
request
.
getCapnpVersion
();
version
.
setMajor
(
CAPNP_VERSION_MAJOR
);
version
.
setMinor
(
CAPNP_VERSION_MINOR
);
version
.
setMicro
(
CAPNP_VERSION_MICRO
);
auto
schemas
=
compiler
->
getLoader
().
getAllLoaded
();
auto
nodes
=
request
.
initNodes
(
schemas
.
size
());
for
(
size_t
i
=
0
;
i
<
schemas
.
size
();
i
++
)
{
...
...
c++/src/capnp/compiler/capnpc-c++.c++
View file @
5de5e5cb
...
...
@@ -3033,6 +3033,27 @@ private:
StreamFdMessageReader
reader
(
STDIN_FILENO
,
options
);
auto
request
=
reader
.
getRoot
<
schema
::
CodeGeneratorRequest
>
();
auto
capnpVersion
=
request
.
getCapnpVersion
();
if
(
capnpVersion
.
getMajor
()
!=
CAPNP_VERSION_MAJOR
||
capnpVersion
.
getMinor
()
!=
CAPNP_VERSION_MINOR
||
capnpVersion
.
getMicro
()
!=
CAPNP_VERSION_MICRO
)
{
auto
compilerVersion
=
request
.
hasCapnpVersion
()
?
kj
::
str
(
capnpVersion
.
getMajor
(),
'.'
,
capnpVersion
.
getMinor
(),
'.'
,
capnpVersion
.
getMicro
())
:
kj
::
str
(
"pre-0.6"
);
// pre-0.6 didn't send the version.
auto
generatorVersion
=
kj
::
str
(
CAPNP_VERSION_MAJOR
,
'.'
,
CAPNP_VERSION_MINOR
,
'.'
,
CAPNP_VERSION_MICRO
);
KJ_LOG
(
WARNING
,
"You appear to be using different versions of 'capnp' (the compiler) and "
"'capnpc-c++' (the code generator). This can happen, for example, if you built "
"a custom version of 'capnp' but then ran it with '-oc++', which invokes "
"'capnpc-c++' from your PATH (i.e. the installed version). To specify an alternate "
"'capnpc-c++' executable, try something like '-o/path/to/capnpc-c++' instead."
,
compilerVersion
,
generatorVersion
);
}
for
(
auto
node
:
request
.
getNodes
())
{
schemaLoader
.
load
(
node
);
}
...
...
c++/src/capnp/schema.capnp
View file @
5de5e5cb
...
...
@@ -449,7 +449,21 @@ enum ElementSize {
inlineComposite @7;
}
struct CapnpVersion {
major @0 :UInt16;
minor @1 :UInt8;
micro @2 :UInt8;
}
struct CodeGeneratorRequest {
capnpVersion @2 :CapnpVersion;
# Version of the `capnp` executable. Generally, code generators should ignore this, but the code
# generators that ship with `capnp` itself will print a warning if this mismatches since that
# probably indicates something is misconfigured.
#
# The first version of 'capnp' to set this was 0.6.0. So, if it's missing, the compiler version
# is older than that.
nodes @0 :List(Node);
# All nodes parsed by the compiler, including for the files on the command line and their
# imports.
...
...
c++/src/capnp/schema.capnp.c++
View file @
5de5e5cb
...
...
@@ -3074,17 +3074,91 @@ const ::capnp::_::RawSchema s_d1958f7dba521926 = {
};
#endif // !CAPNP_LITE
CAPNP_DEFINE_ENUM
(
ElementSize_d1958f7dba521926
,
d1958f7dba521926
);
static
const
::
capnp
::
_
::
AlignedData
<
62
>
b_bfc546f6210ad7ce
=
{
static
const
::
capnp
::
_
::
AlignedData
<
63
>
b_d85d305b7d839963
=
{
{
0
,
0
,
0
,
0
,
5
,
0
,
6
,
0
,
99
,
153
,
131
,
125
,
91
,
48
,
93
,
216
,
19
,
0
,
0
,
0
,
1
,
0
,
1
,
0
,
217
,
114
,
76
,
98
,
9
,
197
,
63
,
169
,
0
,
0
,
7
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
21
,
0
,
0
,
0
,
2
,
1
,
0
,
0
,
33
,
0
,
0
,
0
,
7
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
29
,
0
,
0
,
0
,
175
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
99
,
97
,
112
,
110
,
112
,
47
,
115
,
99
,
104
,
101
,
109
,
97
,
46
,
99
,
97
,
112
,
110
,
112
,
58
,
67
,
97
,
112
,
110
,
112
,
86
,
101
,
114
,
115
,
105
,
111
,
110
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
1
,
0
,
12
,
0
,
0
,
0
,
3
,
0
,
4
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
69
,
0
,
0
,
0
,
50
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
64
,
0
,
0
,
0
,
3
,
0
,
1
,
0
,
76
,
0
,
0
,
0
,
2
,
0
,
1
,
0
,
1
,
0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
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
6
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
}
};
::
capnp
::
word
const
*
const
bp_d85d305b7d839963
=
b_d85d305b7d839963
.
words
;
#if !CAPNP_LITE
static
const
uint16_t
m_d85d305b7d839963
[]
=
{
0
,
2
,
1
};
static
const
uint16_t
i_d85d305b7d839963
[]
=
{
0
,
1
,
2
};
const
::
capnp
::
_
::
RawSchema
s_d85d305b7d839963
=
{
0xd85d305b7d839963
,
b_d85d305b7d839963
.
words
,
63
,
nullptr
,
m_d85d305b7d839963
,
0
,
3
,
i_d85d305b7d839963
,
nullptr
,
nullptr
,
{
&
s_d85d305b7d839963
,
nullptr
,
nullptr
,
0
,
0
,
nullptr
}
};
#endif // !CAPNP_LITE
static
const
::
capnp
::
_
::
AlignedData
<
78
>
b_bfc546f6210ad7ce
=
{
{
0
,
0
,
0
,
0
,
5
,
0
,
6
,
0
,
206
,
215
,
10
,
33
,
246
,
70
,
197
,
191
,
19
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
217
,
114
,
76
,
98
,
9
,
197
,
63
,
169
,
2
,
0
,
7
,
0
,
0
,
0
,
0
,
0
,
3
,
0
,
7
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
21
,
0
,
0
,
0
,
66
,
1
,
0
,
0
,
37
,
0
,
0
,
0
,
23
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
49
,
0
,
0
,
0
,
1
19
,
0
,
0
,
0
,
49
,
0
,
0
,
0
,
1
75
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,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,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
113
,
0
,
0
,
0
,
106
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
112
,
0
,
0
,
0
,
3
,
0
,
1
,
0
,
124
,
0
,
0
,
0
,
2
,
0
,
1
,
0
,
110
,
111
,
100
,
101
,
115
,
0
,
0
,
0
,
14
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
@@ -3135,6 +3216,15 @@ static const ::capnp::_::AlignedData<62> b_bfc546f6210ad7ce = {
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
14
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
99
,
97
,
112
,
110
,
112
,
86
,
101
,
114
,
115
,
105
,
111
,
110
,
0
,
0
,
0
,
0
,
16
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
99
,
153
,
131
,
125
,
91
,
48
,
93
,
216
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
16
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
}
};
...
...
@@ -3142,13 +3232,14 @@ static const ::capnp::_::AlignedData<62> b_bfc546f6210ad7ce = {
#if !CAPNP_LITE
static
const
::
capnp
::
_
::
RawSchema
*
const
d_bfc546f6210ad7ce
[]
=
{
&
s_cfea0eb02e810062
,
&
s_d85d305b7d839963
,
&
s_e682ab4cf923a417
,
};
static
const
uint16_t
m_bfc546f6210ad7ce
[]
=
{
0
,
1
};
static
const
uint16_t
i_bfc546f6210ad7ce
[]
=
{
0
,
1
};
static
const
uint16_t
m_bfc546f6210ad7ce
[]
=
{
2
,
0
,
1
};
static
const
uint16_t
i_bfc546f6210ad7ce
[]
=
{
0
,
1
,
2
};
const
::
capnp
::
_
::
RawSchema
s_bfc546f6210ad7ce
=
{
0xbfc546f6210ad7ce
,
b_bfc546f6210ad7ce
.
words
,
62
,
d_bfc546f6210ad7ce
,
m_bfc546f6210ad7ce
,
2
,
2
,
i_bfc546f6210ad7ce
,
nullptr
,
nullptr
,
{
&
s_bfc546f6210ad7ce
,
nullptr
,
nullptr
,
0
,
0
,
nullptr
}
0xbfc546f6210ad7ce
,
b_bfc546f6210ad7ce
.
words
,
78
,
d_bfc546f6210ad7ce
,
m_bfc546f6210ad7ce
,
3
,
3
,
i_bfc546f6210ad7ce
,
nullptr
,
nullptr
,
{
&
s_bfc546f6210ad7ce
,
nullptr
,
nullptr
,
0
,
0
,
nullptr
}
};
#endif // !CAPNP_LITE
static
const
::
capnp
::
_
::
AlignedData
<
74
>
b_cfea0eb02e810062
=
{
...
...
@@ -3545,6 +3636,14 @@ constexpr ::capnp::Kind Annotation::_capnpPrivate::kind;
constexpr
::
capnp
::
_
::
RawSchema
const
*
Annotation
::
_capnpPrivate
::
schema
;
#endif // !CAPNP_LITE
// CapnpVersion
constexpr
uint16_t
CapnpVersion
::
_capnpPrivate
::
dataWordSize
;
constexpr
uint16_t
CapnpVersion
::
_capnpPrivate
::
pointerCount
;
#if !CAPNP_LITE
constexpr
::
capnp
::
Kind
CapnpVersion
::
_capnpPrivate
::
kind
;
constexpr
::
capnp
::
_
::
RawSchema
const
*
CapnpVersion
::
_capnpPrivate
::
schema
;
#endif // !CAPNP_LITE
// CodeGeneratorRequest
constexpr
uint16_t
CodeGeneratorRequest
::
_capnpPrivate
::
dataWordSize
;
constexpr
uint16_t
CodeGeneratorRequest
::
_capnpPrivate
::
pointerCount
;
...
...
c++/src/capnp/schema.capnp.h
View file @
5de5e5cb
...
...
@@ -56,6 +56,7 @@ enum class ElementSize_d1958f7dba521926: uint16_t {
INLINE_COMPOSITE
,
};
CAPNP_DECLARE_ENUM
(
ElementSize
,
d1958f7dba521926
);
CAPNP_DECLARE_SCHEMA
(
d85d305b7d839963
);
CAPNP_DECLARE_SCHEMA
(
bfc546f6210ad7ce
);
CAPNP_DECLARE_SCHEMA
(
cfea0eb02e810062
);
CAPNP_DECLARE_SCHEMA
(
ae504193122357e5
);
...
...
@@ -601,6 +602,21 @@ struct Annotation {
typedef
::
capnp
::
schemas
::
ElementSize_d1958f7dba521926
ElementSize
;
struct
CapnpVersion
{
CapnpVersion
()
=
delete
;
class
Reader
;
class
Builder
;
class
Pipeline
;
struct
_capnpPrivate
{
CAPNP_DECLARE_STRUCT_HEADER
(
d85d305b7d839963
,
1
,
0
)
#if !CAPNP_LITE
static
constexpr
::
capnp
::
_
::
RawBrandedSchema
const
*
brand
()
{
return
&
schema
->
defaultBrand
;
}
#endif // !CAPNP_LITE
};
};
struct
CodeGeneratorRequest
{
CodeGeneratorRequest
()
=
delete
;
...
...
@@ -610,7 +626,7 @@ struct CodeGeneratorRequest {
struct
RequestedFile
;
struct
_capnpPrivate
{
CAPNP_DECLARE_STRUCT_HEADER
(
bfc546f6210ad7ce
,
0
,
2
)
CAPNP_DECLARE_STRUCT_HEADER
(
bfc546f6210ad7ce
,
0
,
3
)
#if !CAPNP_LITE
static
constexpr
::
capnp
::
_
::
RawBrandedSchema
const
*
brand
()
{
return
&
schema
->
defaultBrand
;
}
#endif // !CAPNP_LITE
...
...
@@ -3711,6 +3727,92 @@ private:
};
#endif // !CAPNP_LITE
class
CapnpVersion
::
Reader
{
public
:
typedef
CapnpVersion
Reads
;
Reader
()
=
default
;
inline
explicit
Reader
(
::
capnp
::
_
::
StructReader
base
)
:
_reader
(
base
)
{}
inline
::
capnp
::
MessageSize
totalSize
()
const
{
return
_reader
.
totalSize
().
asPublic
();
}
#if !CAPNP_LITE
inline
::
kj
::
StringTree
toString
()
const
{
return
::
capnp
::
_
::
structString
(
_reader
,
*
_capnpPrivate
::
brand
());
}
#endif // !CAPNP_LITE
inline
::
uint16_t
getMajor
()
const
;
inline
::
uint8_t
getMinor
()
const
;
inline
::
uint8_t
getMicro
()
const
;
private
:
::
capnp
::
_
::
StructReader
_reader
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
ToDynamic_
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
_
::
PointerHelpers
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
List
;
friend
class
::
capnp
::
MessageBuilder
;
friend
class
::
capnp
::
Orphanage
;
};
class
CapnpVersion
::
Builder
{
public
:
typedef
CapnpVersion
Builds
;
Builder
()
=
delete
;
// Deleted to discourage incorrect usage.
// You can explicitly initialize to nullptr instead.
inline
Builder
(
decltype
(
nullptr
))
{}
inline
explicit
Builder
(
::
capnp
::
_
::
StructBuilder
base
)
:
_builder
(
base
)
{}
inline
operator
Reader
()
const
{
return
Reader
(
_builder
.
asReader
());
}
inline
Reader
asReader
()
const
{
return
*
this
;
}
inline
::
capnp
::
MessageSize
totalSize
()
const
{
return
asReader
().
totalSize
();
}
#if !CAPNP_LITE
inline
::
kj
::
StringTree
toString
()
const
{
return
asReader
().
toString
();
}
#endif // !CAPNP_LITE
inline
::
uint16_t
getMajor
();
inline
void
setMajor
(
::
uint16_t
value
);
inline
::
uint8_t
getMinor
();
inline
void
setMinor
(
::
uint8_t
value
);
inline
::
uint8_t
getMicro
();
inline
void
setMicro
(
::
uint8_t
value
);
private
:
::
capnp
::
_
::
StructBuilder
_builder
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
ToDynamic_
;
friend
class
::
capnp
::
Orphanage
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
_
::
PointerHelpers
;
};
#if !CAPNP_LITE
class
CapnpVersion
::
Pipeline
{
public
:
typedef
CapnpVersion
Pipelines
;
inline
Pipeline
(
decltype
(
nullptr
))
:
_typeless
(
nullptr
)
{}
inline
explicit
Pipeline
(
::
capnp
::
AnyPointer
::
Pipeline
&&
typeless
)
:
_typeless
(
kj
::
mv
(
typeless
))
{}
private
:
::
capnp
::
AnyPointer
::
Pipeline
_typeless
;
friend
class
::
capnp
::
PipelineHook
;
template
<
typename
,
::
capnp
::
Kind
>
friend
struct
::
capnp
::
ToDynamic_
;
};
#endif // !CAPNP_LITE
class
CodeGeneratorRequest
::
Reader
{
public
:
typedef
CodeGeneratorRequest
Reads
;
...
...
@@ -3734,6 +3836,9 @@ public:
inline
bool
hasRequestedFiles
()
const
;
inline
::
capnp
::
List
<
::
capnp
::
schema
::
CodeGeneratorRequest
::
RequestedFile
>::
Reader
getRequestedFiles
()
const
;
inline
bool
hasCapnpVersion
()
const
;
inline
::
capnp
::
schema
::
CapnpVersion
::
Reader
getCapnpVersion
()
const
;
private
:
::
capnp
::
_
::
StructReader
_reader
;
template
<
typename
,
::
capnp
::
Kind
>
...
...
@@ -3776,6 +3881,13 @@ public:
inline
void
adoptRequestedFiles
(
::
capnp
::
Orphan
<
::
capnp
::
List
<
::
capnp
::
schema
::
CodeGeneratorRequest
::
RequestedFile
>>&&
value
);
inline
::
capnp
::
Orphan
<
::
capnp
::
List
<
::
capnp
::
schema
::
CodeGeneratorRequest
::
RequestedFile
>>
disownRequestedFiles
();
inline
bool
hasCapnpVersion
();
inline
::
capnp
::
schema
::
CapnpVersion
::
Builder
getCapnpVersion
();
inline
void
setCapnpVersion
(
::
capnp
::
schema
::
CapnpVersion
::
Reader
value
);
inline
::
capnp
::
schema
::
CapnpVersion
::
Builder
initCapnpVersion
();
inline
void
adoptCapnpVersion
(
::
capnp
::
Orphan
<
::
capnp
::
schema
::
CapnpVersion
>&&
value
);
inline
::
capnp
::
Orphan
<
::
capnp
::
schema
::
CapnpVersion
>
disownCapnpVersion
();
private
:
::
capnp
::
_
::
StructBuilder
_builder
;
template
<
typename
,
::
capnp
::
Kind
>
...
...
@@ -3794,6 +3906,7 @@ public:
inline
explicit
Pipeline
(
::
capnp
::
AnyPointer
::
Pipeline
&&
typeless
)
:
_typeless
(
kj
::
mv
(
typeless
))
{}
inline
::
capnp
::
schema
::
CapnpVersion
::
Pipeline
getCapnpVersion
();
private
:
::
capnp
::
AnyPointer
::
Pipeline
_typeless
;
friend
class
::
capnp
::
PipelineHook
;
...
...
@@ -7463,6 +7576,48 @@ inline ::capnp::Orphan< ::capnp::schema::Brand> Annotation::Builder::disownBrand
::
capnp
::
bounded
<
1
>
()
*
::
capnp
::
POINTERS
));
}
inline
::
uint16_t
CapnpVersion
::
Reader
::
getMajor
()
const
{
return
_reader
.
getDataField
<
::
uint16_t
>
(
::
capnp
::
bounded
<
0
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
::
uint16_t
CapnpVersion
::
Builder
::
getMajor
()
{
return
_builder
.
getDataField
<
::
uint16_t
>
(
::
capnp
::
bounded
<
0
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
void
CapnpVersion
::
Builder
::
setMajor
(
::
uint16_t
value
)
{
_builder
.
setDataField
<
::
uint16_t
>
(
::
capnp
::
bounded
<
0
>
()
*
::
capnp
::
ELEMENTS
,
value
);
}
inline
::
uint8_t
CapnpVersion
::
Reader
::
getMinor
()
const
{
return
_reader
.
getDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
::
uint8_t
CapnpVersion
::
Builder
::
getMinor
()
{
return
_builder
.
getDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
void
CapnpVersion
::
Builder
::
setMinor
(
::
uint8_t
value
)
{
_builder
.
setDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
ELEMENTS
,
value
);
}
inline
::
uint8_t
CapnpVersion
::
Reader
::
getMicro
()
const
{
return
_reader
.
getDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
3
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
::
uint8_t
CapnpVersion
::
Builder
::
getMicro
()
{
return
_builder
.
getDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
3
>
()
*
::
capnp
::
ELEMENTS
);
}
inline
void
CapnpVersion
::
Builder
::
setMicro
(
::
uint8_t
value
)
{
_builder
.
setDataField
<
::
uint8_t
>
(
::
capnp
::
bounded
<
3
>
()
*
::
capnp
::
ELEMENTS
,
value
);
}
inline
bool
CodeGeneratorRequest
::
Reader
::
hasNodes
()
const
{
return
!
_reader
.
getPointerField
(
::
capnp
::
bounded
<
0
>
()
*
::
capnp
::
POINTERS
).
isNull
();
...
...
@@ -7531,6 +7686,45 @@ inline ::capnp::Orphan< ::capnp::List< ::capnp::schema::CodeGeneratorRequest::Re
::
capnp
::
bounded
<
1
>
()
*
::
capnp
::
POINTERS
));
}
inline
bool
CodeGeneratorRequest
::
Reader
::
hasCapnpVersion
()
const
{
return
!
_reader
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
).
isNull
();
}
inline
bool
CodeGeneratorRequest
::
Builder
::
hasCapnpVersion
()
{
return
!
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
).
isNull
();
}
inline
::
capnp
::
schema
::
CapnpVersion
::
Reader
CodeGeneratorRequest
::
Reader
::
getCapnpVersion
()
const
{
return
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
get
(
_reader
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
));
}
inline
::
capnp
::
schema
::
CapnpVersion
::
Builder
CodeGeneratorRequest
::
Builder
::
getCapnpVersion
()
{
return
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
get
(
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
));
}
#if !CAPNP_LITE
inline
::
capnp
::
schema
::
CapnpVersion
::
Pipeline
CodeGeneratorRequest
::
Pipeline
::
getCapnpVersion
()
{
return
::
capnp
::
schema
::
CapnpVersion
::
Pipeline
(
_typeless
.
getPointerField
(
2
));
}
#endif // !CAPNP_LITE
inline
void
CodeGeneratorRequest
::
Builder
::
setCapnpVersion
(
::
capnp
::
schema
::
CapnpVersion
::
Reader
value
)
{
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
set
(
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
),
value
);
}
inline
::
capnp
::
schema
::
CapnpVersion
::
Builder
CodeGeneratorRequest
::
Builder
::
initCapnpVersion
()
{
return
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
init
(
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
));
}
inline
void
CodeGeneratorRequest
::
Builder
::
adoptCapnpVersion
(
::
capnp
::
Orphan
<
::
capnp
::
schema
::
CapnpVersion
>&&
value
)
{
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
adopt
(
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
),
kj
::
mv
(
value
));
}
inline
::
capnp
::
Orphan
<
::
capnp
::
schema
::
CapnpVersion
>
CodeGeneratorRequest
::
Builder
::
disownCapnpVersion
()
{
return
::
capnp
::
_
::
PointerHelpers
<
::
capnp
::
schema
::
CapnpVersion
>::
disown
(
_builder
.
getPointerField
(
::
capnp
::
bounded
<
2
>
()
*
::
capnp
::
POINTERS
));
}
inline
::
uint64_t
CodeGeneratorRequest
::
RequestedFile
::
Reader
::
getId
()
const
{
return
_reader
.
getDataField
<
::
uint64_t
>
(
::
capnp
::
bounded
<
0
>
()
*
::
capnp
::
ELEMENTS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment