How to exclude a method inside a class with doxygen?

Member

by lily , in category: Third Party Scripts , 6 months ago

How to exclude a method inside a class with doxygen?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dalton_moen , 6 months ago

@lily 

To exclude a specific method inside a class with Doxygen, you can use the @cond and @endcond commands.


Here's an example of how you can exclude a specific method called excludeMethod() inside a class with Doxygen:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * @class MyClass
 * @brief This is a class documentation.
 */
class MyClass {
public:
    /**
     * @brief This is a public method.
     */
    void publicMethod() {
        // Some code here
    }

    /**
     * @cond
     * @brief This method will be excluded from Doxygen documentation.
     */
    void excludeMethod() {
        // Some code here
    }
    /**
     * @endcond
     */
};


In the above example, the excludeMethod() method will be excluded from the Doxygen documentation. This can be useful when you want to exclude certain methods from being documented or displayed in the generated documentation.

Related Threads:

How to call class method inside a laravel view?
How to regenerate a class url in doxygen?
How to call to an static class and method with php?
How to call to an static class and method with php?
How to test parent call method in a class for phpspec?
How to call vue method inside vuex module?