doxygen syntax in python

后端 未结 2 1650
醉酒成梦
醉酒成梦 2021-02-02 17:44

Can somebody please help me to figure out how to comment python code correctly to get parsed by doxygen?

Somehow it ignores the tags. The output (HTML) shows the tags:<

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 18:03

    Doxygen has also undocumented feature (or bug): It parses Doxygen syntax in docstring if you start docstring with an exclamation mark:

    class Hello: 
        def __init__(self, name):
        """!@brief Creates a new Hello object.
    
        This Hello Object is being used to...
    
        @param name The name of the user.
        """
        self.name = name
            dosomething(12)
    
        def dosomething(x):         
            dosomethingelse
    

    Note that in Python docsting, you need to use @ instead of \ to start Doxygen commands (backslash works as an escape character in docstring).

提交回复
热议问题