How do I document a property in Doxygen if the language only supports accessors?

In C / C ++, I usually need to document a property, not just its accessors (getters and setters). Some documentation systems support this directly, such as GTK-Doc. But how can I do this with Doxygen?

I am describing properties in getters, but this is definitely not a solution. Copying the description in getter and setter is even worse.

Typical C example where Obj

opaque:

/**
 * Doc for getter
 */
int getSize(Obj* obj);

/**
 * Doc for setter
 */
void setSize(Obj* obj, int size);

// Where to put the documentation for size itself?

      

+3


source to share


1 answer


You could do this:

class SomeClass
{
private:
    m_size ///< Documentation for the property...  
}

      



See the section "Posting Documentation After Participants" here . Various other comment formats are indicated on this page. You can choose the one that best matches what you already have.

0


source







All Articles