Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Doxygen to link to a method of an Objective-C class?

I'm using Doxygen to document my Objective-C code, and so far it's working fine.

However, I've been searching for hours and I have not been able to find any way to link to a method. For example:

@interface Example : NSObject {
}

/** This is an example method I want to link to. */
- (void)methodWithArgument:(NSString*)one andArgument:(NSString*)two;

/** I want a link to methodWithArgument:andArgument: but Doxygen
 *  doesn't seem to link the two.
 */
- (void)someOtherMethod;

@end

My expectation is for methodWithArgument:andArgument: to become a link to the appropriate method, but in the generated documentation, it is just plain text.

I have tried lots of other forms:

methodWithArgument:andArgument:
-methodWithArgument:andArgument:
::methodWithArgument:andArgument:
Example::methodWithArgument:andArgument:

But none of them seem to work. Is it possible to link Objective-C methods in Doxygen, and if so, how? Also, how do I link to a method of another class? I know how to do this for C, C++ and Java, but for Objective-C the answer eludes me. Could it be that Doxygen simply doesn't support linking methods in Objective-C? This seems like quite a shortcoming...

like image 953
NaxyMatt Avatar asked Feb 25 '11 04:02

NaxyMatt


People also ask

How to create a Doxygen file from the command line?

To do this call doxygen from the command line with the -g option: where <config-file> is the name of the configuration file. If you omit the file name, a file named Doxyfile will be created.

What is the HTML documentation generated by Doxygen?

Click here for the corresponding HTML documentation that is generated by doxygen. Indicates that a comment block contains documentation for a group of classes, files or namespaces. This can be used to categorize classes, files or namespaces, and document those categories.

Can I use Doxygen for an existing project?

If you start using doxygen for an existing project (thus without any documentation that doxygen is aware of), you can still get an idea of what the structure is and how the documented result would look like. To do so, you must set the EXTRACT_ALL tag in the configuration file to YES.

What happens if I omit the file name in Doxygen configuration template?

If you omit the file name, a file named Doxyfile will be created. If a file with the name <config-file> already exists, doxygen will rename it to <config-file>.bak before generating the configuration template.


1 Answers

You said you tried this one, but it works for me in Doxygen 1.7.2:

/** I want a link to Example::methodWithArgument:andArgument: but Doxygen
 *  doesn't seem to link the two.
 */

This might depend on your configuration file; I was using a default configuration file generated by doxygen -s -g Doxyfile.

like image 176
Steven Fisher Avatar answered Oct 09 '22 23:10

Steven Fisher