compiler: add annotation to enable field get/set
Generating per-field getters/setters adds a lot of functions; this makes them switchable with an annotation in the source schema.
This commit is contained in:
parent
52ca907f14
commit
da663f83ef
2 changed files with 15 additions and 1 deletions
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
@0xc0183dd65ffef0f3;
|
||||
|
||||
annotation nameinfix @0x85a8d86d736ba637 (file): Text;
|
||||
# add an infix (middle insert) for output file names
|
||||
#
|
||||
# "make" generally has implicit rules for compiling "foo.c" => "foo". This
|
||||
|
|
@ -29,4 +30,8 @@
|
|||
# before the ".c", so the filename becomes "foo-gen.c"
|
||||
#
|
||||
# ("foo" is really "foo.capnp", so it's foo.capnp-gen.c)
|
||||
annotation nameinfix @0x85a8d86d736ba637 (file): Text;
|
||||
|
||||
annotation fieldgetset @0xf72bc690355d66de (file): Void;
|
||||
# generate getter & setter functions for accessing fields
|
||||
#
|
||||
# allows grabbing/putting values without de-/encoding the entire struct.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue