Open srivathsanmurali opened 3 years ago
This PR adds the functionality to optionally add comments while writing configs. This helps give the user an idea about what the setting is.
You can add comments to your settings by using the following API as demonstrated in the example3
For C: We have a new function to add settings
group = config_setting_add_with_comment( root, "address", CONFIG_TYPE_GROUP, "Address for parcel delivery");
For C++, we make use of polymorphism in C++
Setting &address = root.add("address", Setting::TypeGroup, "Address for parcel delivery");
example3 produces the following output
// Address for parcel delivery address : { street = "1 Woz Way"; city = "San Jose"; state = "CA"; zip = 95110; }; numbers = [ 0, 10, 20, 30, 40, 50, 60, 70, 80, 90 ];
This PR adds the functionality to optionally add comments while writing configs. This helps give the user an idea about what the setting is.
You can add comments to your settings by using the following API as demonstrated in the example3
For C: We have a new function to add settings
For C++, we make use of polymorphism in C++
example3 produces the following output