Documenting Dispose() and Dispose(bool) in C++/CLI

Aug 21, 2008 at 6:11 PM
When generating documentation for C++/CLI classes, I get warnings about Dispose() and Dispose(bool) not being documented, and of course there are no documentation associated with these methods. Is there any way to document these in C++?
Aug 21, 2008 at 8:05 PM
Edited Aug 21, 2008 at 8:08 PM
Hmmm, the IDisposable stuff is what I hate about C++/CLI, it makes the whole C++/CLI
looks like VB where the compiler writer decides for you.

That said, just document the "normal" destructor to take care of  the Dispose(). For the Dispose(bool),
may be that is one of the fixes we might have to provide for the C++/CLI documentations in the tools, unless someone  has a solution - still searching!.

using namespace System;

namespace TestHello {

    ///<summary>
    /// Summary of Class1....
    ///</summary>
  public ref class Class1 : IDisposable
 {
        ///<summary>
        /// Initializes a constructor....
        ///</summary>
    public: Class1()
            {
            }

            ///<overloads>
            /// All Destructor....
            ///</overloads>
            ///<summary>
            /// Destructor == Dispose()....
            ///</summary>
    public: ~Class1()
            {
            }
 };
}

Best regards,
Paul.

Editor
Aug 21, 2008 at 8:55 PM
If you don't care to see a particular member or can't document something that the compiler generates, you can use the ApiFilter project property to get rid of those items so that they don't show up in the help file.  If you want them included but don't care to see the "missing documentation" warnings, you can set the corresponding project properties in the Show Missing Tags category to false.  The ShowMissingComponent could probably be expanded to auto-document IDisposable members since it already auto-documents constructors.  I'll look into it.

Eric