struct MyConfig { @Section("foo") @Desc("My number of foo.") int number; }
Will serialize to:
[foo] ; My number of foo. ; Default value: 0 ;number=0
struct MyConfig { @Desc("My \"global\" option.") int gNumber = -1; @Section("bar") { @Desc("If true the toggle is activated.") bool toggleMe; @Desc("Another number.") int increment = 1; } }
Will serialize to:
; My "global" option. ; Default value: -1 ;gNumber=-1 [bar] ; If true the toggle is activated. ; Default value: false ;toggleMe=false ; Another number. ; Default value: 1 ;increment=1
Describes a section. When a struct member is annotated with it then the member will be written underneath [section].
During parsing the option will also only be valid if it is located underneath said [section]. It can also be used as a block annotation. See the examples.