Doxygen 对私人成员和免费功能的评论?
我应该对私有成员和免费函数使用 Doxygen 注释吗?我来自Java世界,我从来没有为私有成员添加过Javadoc。这在 C++ 世界中是可以接受的做法吗?
Should I use Doxygen comments for private members and free functions? I come from the Java world, and I never added Javadoc for private members. Is this an acceptable practice in the C++ world?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想说这几乎是独立于语言的问题。您记录您想要记录的成员。
I'd say it's pretty much language independent issue. You document members you want to have documented.
您可以记录私有函数 - 我们这样做并使用
@internal
来提供公共和开发人员文档。我们还使用私有实现实践,其中实现对用户隐藏。
You can document private functions - we do and use
@internal
to provide public and developer documentation.We also use a private implementation practice where implementations are hidden from the user.
取决于文档的目标受众。如果是公开发布,那么不需要,他们不需要了解私有变量和内部变量。
如果是供内部使用,那么是的,他们肯定需要了解私有变量和自由函数的用法。
Depends on the documentation target audience. If it's for public release, then no, they don't need to know about private and internal variables.
If it's for internal usage, then yes, they surely need to know about the usage of private variables and free functions.