子类的visual studio XML文档的最佳实践?

时间:2017-04-10 12:37:52

标签: c++ visual-studio-2013 xml-documentation

VS 2013 C ++中的编程和我们的doc标准调用XML文档,部分是因为注释出现在IntelliSense中。我的问题是IntelliSense没有从基类继承文档,所以如果我有这样的东西:

class Base {
public:
    Base() {}
    /// <summary> Really detailed and insightful comments </summary>
    virtual void method() = 0;
};

class Derived : public Base {
    Derived() {}
    void method() override {}
}

打字

Base b;
b.method();   <- Gives nice IntelliSense tips
Derived d;
d.method();      <- Just shows +1 Override

我可以复制并粘贴评论,但我们真的不想打破DRY原则。我的搜索和ReFactor以及其他工具可以帮助同步评论,但我们公司节俭,所以目前不是一个选项。任何开箱即用或免费的   建议?我的想法是添加行

/// <summary> see base class for documentation </summary>

以上覆盖的方法,但更喜欢在基类中显示IntelliSense技巧的东西。

0 个答案:

没有答案
相关问题