-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should supply a more clear API doc #44
Comments
could be better, but it is not a priority - if someone wants to contribute I'd be happe to set something up with http://www.mkdocs.org or similar. At the very least you need to specify which parts of the API you are concerend with. The untyped builder API in flatcc.h is documented only in the header file, and I believe this is an adequate level. For the generated code, there is room for improvement with lots of examples etc. but it is also a signficant amount of work. The primary monster_test.c file is intended to provide working examples. |
As it's too many macros in flatbuffer_common_builder.h and flatbuffer_common_reader.h, It's hard know which function I can use for what type defined in schema file. doc/builder.md can help but not more. |
Yes, it can be a bit confusing. How do you propose to improve on this? |
How about use gcc -E -P like feature to expand the macro, or, add comments to functions in generated builder.h/reader.h files, and propose the best practice functions set in these comments? |
gcc macro expansion would expose a huge number of internal macros that would not be helpful. builder.md does document some or most generated macros, such as Also note that it isn't really macros. The macros are used to generate type safe inline functions similar to how C++ templates work. I think the solution is the make README smaller and have documention like builder.md cover both read and write, and add more examples and list more supported functions as a reference section. But again, this is a fair amount of work. If you, or someone else, is willing to compile a reference.md file of functions, I'd be happy to fill in the gaps and advice on how to extract information. |
Apart from offloading work, it would be good if someone else wrote some documentation because things that are clear to me may not be clear to others. |
At least there is now a table of contents in the README and in doc/builder.md and benchmarks have been moved to a separate file. |
See #88 and https://github.com/dvidelabs/flatcc#use-of-macros-in-generated-code, https://github.com/dvidelabs/flatcc#extracting-documentation |
Closing this as the provided script works pretty well, although not perfect. Note that string operations like flatbuffers_string_ can also be extracted with the tool. You still have to manually specify what you need documentation on, but it also allows you to drill down to very specific operations like vector push etc. |
Should supply a more clear API doc
The text was updated successfully, but these errors were encountered: