7

I was not able to reference a specific class method using the doxygen @see command.

Suppose I have a class Server with a method start like below

@interface Server : NSObject

- (void) start:(NSInteger) mask;

@end

And suppose I have another class that has an object of Server.

@interface RandomNumberGeneration

/// How can I reference the method start from 
/// class server using the command @see
/// @see ????
+ (NSInteger) generate;

@end

So, is there a way to reference the method start of class Server?

McLeary
  • 1,231
  • 2
  • 13
  • 21

2 Answers2

9

Copied from here

@see text | URL | classname | classname#methodname Use this to tag to refer the reader to some other source of related information.

So I guess it should be:

/// @see Server#start:
Andy Friese
  • 6,349
  • 3
  • 20
  • 17
  • +1 for the link to the blog post - a great introduction to using doxygen with Objective-C. – Chris Mar 31 '12 at 16:03
  • 1
    Doesn't seem to work for me. Has this changed recently? Using Xcode 5 – atreat Jul 23 '14 at 14:44
  • Pretty late to the party, but make sure the method you are targeting with your `@see` has doxygen docs attached to it. My `@see` links weren't working until I added documentation to the methods that were being pointed at. – Chris Sprague Aug 04 '16 at 20:51
  • @ChrisSprague or doxygen file should contain flag to generate entries for undocumennted entities – Swift - Friday Pie Jul 20 '23 at 14:07
5

See the doxygen manual page Automatic link generation for more information on referencing classes and functions. In particular see the section "Links to Functions".

Typically, I use the function refernce pattern

<className>::<functionName>

So in your case, I would use

/// \see Server::start

However, from the doxygen manual

For JavaDoc compatibility a # may be used instead of a :: in the patterns above

as stated in @PeterG.'s answer.

For completeness, note that if you a reference a member in the same class

In the documentation of a class containing a member foo, a reference to a global variable is made using ::foo, whereas #foo will link to the member.

albert
  • 8,285
  • 3
  • 19
  • 32
Chris
  • 44,602
  • 16
  • 137
  • 156