Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to associate non-member functions with a class in Doxygen?

Tags:

c++

doxygen

I'm sure there's some way to do this with the \defgroup, \addgroup and \@{ \@} tags, but after a couple of hours of trial and (obviously) error, I'm asking SO.....

I have:

class C {
public:
    void foo () const;
};

and I have some helper non-member functions that really are part of C's interface, but aren't in the class:

std::string
format (const C& c, const std::string &fmt);

I'd like the format function to appear on the same page as the class functions. Is that just not possible? Is the best I can do a "module" page, which lists C as a class (with a hyperlink to C's comments, and format as a function?

like image 729
Eric H. Avatar asked Nov 02 '09 14:11

Eric H.


1 Answers

\relates (or \memberof) seem to be what you are looking for.

like image 133
Éric Malenfant Avatar answered Nov 04 '22 16:11

Éric Malenfant