Skip to content

How to document overloaded functions? #349

Open
@christophfroehlich

Description

@christophfroehlich

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @christophfroehlich

        Issue actions

          How to document overloaded functions? · Issue #349 · ros-controls/control_toolbox