8

I am using doxygen and have the following code:

def __init__(self):
    '''

    '''
    if not '_ready' in dir(self) or not self._ready:
        self._stream = sys.stderr   ##!< stream to which all output is written
        self._ready = True          ##!< @internal Flag to check initialization of singelton

For some reason doxygen tells me that self._stream (Member _stream) is undocumented. can I document it with a comment, like the doxygen docu describes in Putting documentation after members and if so, whats the right way?

**edit:**this seems to be related to me having no new line, for example here:

class escapeMode(object):
    '''
    Enum to represent the escape mode.
    '''
    ALWAYS      = 1     ##!< Escape all values
    NECESSARY   = 2     ##!< Escape only values containing seperators or starting with quotation

Doxygen only complains about ALWAYS being undocumented, I would like to avoid inserting newlines behind every new attribute I document this way since it destroys the value of newlines for separating logical blocks like loops or if statements from surrounding code

3
  • I would suggest to use Sphinx for documentation of Python projects in general Commented Jun 15, 2012 at 16:56
  • unfortunately that is currently not an option, i will give it a look for the next project Commented Jun 15, 2012 at 17:23
  • 1
    maybe it was a spell-check tool that complained about ALLWAYS ;) Commented Jan 31, 2013 at 9:29

1 Answer 1

10

This is currently not supported in doxygen, as previously answered here. If you put the comment on the preceeding line it will work fine:

class escapeMode(object):
    '''
    Enum to represent the escape mode.
    '''
    ## Escape all values
    ALLWAYS     = 1
    ## Escape only values containing seperators or starting with quotation
    NECESSARY   = 2

Hope that's not too late...

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, this is somewhat helpfull. I hacked a little bit on a filter for python. It does the same thing but it screws up line numbering since it internally converts it to your format but with docstrings, thus adding lines. I will change it and try to upload it somewhere if my employer allows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.