开发者

Is it possible to include code examples when using HeaderDoc or Doxygen?

开发者 https://www.devze.com 2023-02-02 16:45 出处:网络
I am writing a Cocoa framework in Objective-C and would like to use a documentation writer to generate the API reference. For .NET, it is easy to include examples using:

I am writing a Cocoa framework in Objective-C and would like to use a documentation writer to generate the API reference. For .NET, it is easy to include examples using:

/// <example>
/// <code lang="c#">
/// Console.WriteLine("Hello, World!");
/// </code>
/// </example&开发者_运维问答gt;

Is this possible when using Apple's HeaderDoc tool, and if so, how would it be done?

If it is not possible, how would I do it when using Doxygen?


For those who go with Apples already installed tool "headerdoc", it can look like this:

/*!
   <pre>
   @textblock
   - (void)foo {
      // bar
   }
   @/textblock
   </pre>
*/


Okay - I've got the answers! I've chosen to go with Doxygen:

/**
 \code
 NSLog(@"Hello, World!");
 \endcode
*/
0

精彩评论

暂无评论...
验证码 换一张
取 消