billvaglienti / ProtoGen

Communications protocol generation software
MIT License
30 stars 16 forks source link

Apply "hidden" tag to code generation too #100

Closed SchrodingersGat closed 4 years ago

SchrodingersGat commented 4 years ago

The "hidden" flag currently excludes elements from appearing in the generated documentation set. This is useful for generating a version of the ICD which does not include "secret" packets etc.

I would like to use the "hidden" flag to also generate a set of protocol files which do not include these "secret" or "hidden" elements. They could be enums / structs / packets

This would be extremely useful for generation of a public SDK which contains all the public functionality but excludes any hidden items.

@billvaglienti thoughts on the best way to approach this?

billvaglienti commented 4 years ago

See version 3.2. A new command line option is added: "-omit-hidden" which causes hidden items to not be output. Unless that item has the attribute neverOmit="true". Care must be taken to test that such "SDK" code will still compile correctly.