Jon*_*age 5 documentation intellisense doxygen c++-cli
我有一些C++/CLI软件,这些软件都很好用C#记录的方式,这意味着DOxygen能够把它拉成一些漂亮的html.有没有什么方法可以让我在智能感知工具中出现相同的信息提示.net框架的方式?
例如,假设这是我的头文件(MyApp.h):
    /*************** MyApp.h ***************/
    /// My namespace containing all my funky classes
    namespace MyNamespace
    {
            using namespace System;
            ref class WorldHunger;
            /// A truly elegent class which solves all the worlds problems
            public ref class MyClass
            {
            public:
                    /// Constructs a MyClass
                    MyClass()
                    {
                    }
                    /// <summary>Attempts to fix world hunger</summary>
                    /// <param name="problem">The problem to try and fix</param>
                    /// <returns>Whether or not the problem was solved</param>
                    bool FixWorldHunger( WorldHunger^ problem );
            };
    }
......这是相应的实现:
    /*************** MyApp.cpp ***************/
    #include "MyApp.h"
    using namespace MyNamespace;
    MyClass::MyClass()
    {
    }
    bool MyClass::FixWorldHunger( WorldHunger^ problem )
    {
            bool result = false;
            /// TODO: implement something clever
            return result;
    }
以下是intellisense在输入内容时对内置函数的作用:http: //www.geekops.co.uk/photos/0000-00-02%20%28Forum%20images%29/BrokenIntellisense1.jpg
以下是当我输入时intellisense对我自己的功能的作用:http: //www.geekops.co.uk/photos/0000-00-02%20%28Forum%20images%29/BrokenIntellisense2.jpg
当然有办法做到这一点?
总而言之,要实现这一点,您需要以兼容的形式提出意见:
/// <summary>
/// Retrieves the widget at the specified index
/// </summary>
/// <param name="widgetIndex">Index of the widget to retrieve.</param>
/// <returns>The widget at the specified index</returns>
Widget* GetWidget(int widgetIndex);
然后,您只需右键单击Visual Studio中的项目,然后转到properties > configuration properties > C/C++ > Output Files并更改Generate XML Documentation Files为Yes.
当您重建项目时,广告会将其导入其他位置,您应该会看到完整记录的工具提示.