Skip to content

How to document overloaded functions? #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
christophfroehlich opened this issue Apr 26, 2025 · 0 comments
Open

How to document overloaded functions? #349

christophfroehlich opened this issue Apr 26, 2025 · 0 comments

Comments

@christophfroehlich
Copy link
Contributor

Should we try using https://www.doxygen.nl/manual/commands.html#cmdoverload instead of copy pasting all the parameter descriptions of the overloaded methods? (see the PID class)

but how?

This works in doxygen

  /*!
   * \brief Get PID gains for the controller.
   * \param p The proportional gain.
   * \param i The integral gain.
   * \param d The derivative gain.
   * \param i_max Upper integral clamp.
   * \param i_min Lower integral clamp.
   * \param antiwindup Antiwindup functionality. When set to true, limits
        the integral error to prevent windup; otherwise, constrains the
        integral contribution to the control output. i_max and
        i_min are applied in both scenarios.
   */
  void get_gains(
    double & p, double & i, double & d, double & i_max, double & i_min, bool & antiwindup);

  /*!
    * \brief Get PID gains for the controller.
    * \overload
    */
  void get_gains(double & p, double & i, double & d, double & i_max, double & i_min);

Image
but is not parsed nicely from vscode.

https://devblogs.microsoft.com/cppblog/improved-doxygen-overload-resolution/ it seems that this feature also does not exist yet in the released version.

Any chance to satisfy both worlds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant