Skip to content
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

Add Doxygen comments to the C++ API #1753

Open
darbyjohnston opened this issue Jun 2, 2024 · 0 comments · May be fixed by #1746
Open

Add Doxygen comments to the C++ API #1753

darbyjohnston opened this issue Jun 2, 2024 · 0 comments · May be fixed by #1746

Comments

@darbyjohnston
Copy link
Contributor

Required:


[ ] I believe this isn't a duplicate topic
[x ] This report is not related to an adapter

Select One:

[ ] Build problem
[ ] Incorrect Functionality or bug
[x ] New feature or functionality

Description

As a follow up to #708, this issue covers adding Doxygen style comments to the C++ API. Specifically:

  • All public C++ API should be documented (e.g., classes, structs, enumerations, member functions, etc.)
  • C++ style comments are used:
/// @brief Returns the time value converted to a new rate.
constexpr double value_rescaled_to(double new_rate) const noexcept;
  • Comments should always have an explicit brief section; detailed descriptions, parameter strings, and return strings are optional for shorter functions:
/// @brief Returns the time value converted to a new rate.
constexpr double value_rescaled_to(double new_rate) const noexcept;
/// @brief Parse a string in the form "hours:minutes:seconds".
///
/// The string may have a leading negative sign. Seconds may have up to microsecond precision.
///
/// @param time_string The time string.
/// @param rate The time rate.
/// @param error_status Optional error status.
static RationalTime from_timecode(
        std::string const& timecode,
        double rate,
        ErrorStatus* error_status = nullptr);
  • Given the amount of work involved, it should probably be broken into multiple PRs.

Example of the Doxygen HTML documentation:

OTIO_HTML

Example Doxygen tooltip in Visual Studio:

OTIO_VS_Tooltip

Example Doxygen tooltip in Xcode:

OTIO_Xcode_Tooltip
@darbyjohnston darbyjohnston linked a pull request Jun 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant