OSDN Git Service

rusty-gd: add builder structs
authorZach Johnson <zachoverflow@google.com>
Sat, 12 Dec 2020 22:40:26 +0000 (14:40 -0800)
committerZach Johnson <zachoverflow@google.com>
Mon, 14 Dec 2020 20:08:27 +0000 (12:08 -0800)
commit0df31169d69d60d4dd7f9f36707c587595e71ad7
tree0dd5dcc39abe72332cd73f3e4d007e143572000b
parent502e2a0180298807ce082c5a6d0e7ba9133c6bd4
rusty-gd: add builder structs

by making them structs, you must name the parameters explicitly (which
is great for readability - also it doesn't matter which order you
specify them as long as you specify them all)

since builders can be constructed for middle structs in the lineage, add
None option for child enums

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ic2cfde113ccd6f8475c7514c513ac7b62b3689e3
gd/packet/parser/packet_def.cc
gd/packet/parser/packet_def.h
gd/packet/parser/parent_def.cc
gd/packet/parser/parent_def.h