【问题标题】:Providing Doxygen with documentation stubs for library classes为 Doxygen 提供库类的文档存根
【发布时间】:2013-02-28 21:59:36
【问题描述】:

我的项目中有许多实现 INotifyPropertyChanged 的​​类。我希望每个事件中的所有 PropertyChanged 事件都能够从接口继承文档,但由于接口不是我项目的一部分,它没有 Doxygen 页面。

我能够通过此文档获得接口的部分文档,出现类页面,继承图显示了实现它的所有类。但我无法宣布事件。是否有我缺少的关键字来添加事件?

namespace MyNamespace
{
    /**
     * @class INotifyPropertyChanged
     * @brief Interface to allow subscribers to know when the object has been updated.  See <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx">MSDN Doc</a>
     * @fn void INotifyPropertyChanged::PropertyChanged(sender, e)
     * @memberof INotifyPropertyChanged
     * @brief Notification that a property of the object has changed.
     * @details the name of the property is in the event arguments
     * Still having trouble documenting the parameters correctly, but this doesn't inherit anyway because it's a function, not an event
     */
}

或者我完全错过了这条船,并且有一些方法可以导入 Intellisense 文档?

【问题讨论】:

  • .net 库是否有现有的标签文件?

标签: c# doxygen inotifypropertychanged


【解决方案1】:

尝试创建 INotifyPropertyChanged.cs 文件,将文档化的接口声明放在那里,但不要包含在任何项目中进行编译,它只能由 doxygen 选择。

根据doxygen documentation,它支持标准的ECMA-334 XML标签,这些标签通常用于注释C#代码,所以不需要使用@class、@brief标签等。

【讨论】:

  • 谢谢!我会试试的!我知道 xml 样式,它是我的首选样式,但是您做客户付钱给您做的事情,而客户要求@样式文档。
  • 越来越近了。子类 Doxygen 输出在 Events 简要总结中列出了两次事件,一次作为子版本,一次作为接口版本。在事件文档部分仅列出子版本。如果我在子版本中添加/** @copydoc System::ComponentModel::INotifyPropertyChanged::PropertyChanged */,它们都会被记录在案。如果没有 copydoc,则不会记录子版本。使 INotifyPropertyChanged 成为类或接口具有相同的结果。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-09
  • 1970-01-01
  • 2015-01-14
  • 1970-01-01
  • 2012-07-28
  • 2021-02-04
相关资源
最近更新 更多