Skip to content

Commit d876062

Browse files
Add Doxygen comments to opentime (#1866)
* Add Doxygen comments Signed-off-by: Darby Johnston <[email protected]>
1 parent 43de3e5 commit d876062

File tree

6 files changed

+195
-153
lines changed

6 files changed

+195
-153
lines changed

doxygen/config/dox_config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ EXTRACT_ALL = NO
494494
# be included in the documentation.
495495
# The default value is: NO.
496496

497-
EXTRACT_PRIVATE = YES
497+
EXTRACT_PRIVATE = NO
498498

499499
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
500500
# methods of a class will be included in the documentation.
@@ -520,7 +520,7 @@ EXTRACT_STATIC = NO
520520
# for Java sources.
521521
# The default value is: YES.
522522

523-
EXTRACT_LOCAL_CLASSES = YES
523+
EXTRACT_LOCAL_CLASSES = NO
524524

525525
# This flag is only useful for Objective-C code. If set to YES, local methods,
526526
# which are defined in the implementation section but not in the interface are
@@ -643,7 +643,7 @@ INLINE_INFO = YES
643643
# name. If set to NO, the members will appear in declaration order.
644644
# The default value is: YES.
645645

646-
SORT_MEMBER_DOCS = YES
646+
SORT_MEMBER_DOCS = NO # Keep the same order as the header files
647647

648648
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
649649
# descriptions of file, namespace and class members alphabetically by member
@@ -867,7 +867,7 @@ WARN_LOGFILE =
867867
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
868868
# Note: If this tag is empty the current directory is searched.
869869

870-
INPUT = ../src/opentimelineio/ ../README.md
870+
INPUT = ../src/opentime ../src/opentimelineio/ ../README.md
871871

872872
# This tag can be used to specify the character encoding of the source files
873873
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

src/opentime/errorStatus.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
namespace opentime { namespace OPENTIME_VERSION {
1010

11+
/// @brief This struct represents the return status of a function.
1112
struct ErrorStatus
1213
{
14+
/// @brief This enumeration represents the possible outcomes.
1315
enum Outcome
1416
{
1517
OK = 0,
@@ -21,34 +23,41 @@ struct ErrorStatus
2123
INVALID_RATE_FOR_DROP_FRAME_TIMECODE,
2224
};
2325

26+
/// @brief Construct a new status with no error.
2427
ErrorStatus()
2528
: outcome{ OK }
2629
{}
2730

31+
/// @brief Construct a new status with the given outcome.
2832
ErrorStatus(Outcome in_outcome)
2933
: outcome{ in_outcome }
3034
, details{ outcome_to_string(in_outcome) }
3135
{}
3236

37+
/// @brief Construct a new status with the given outcome and details.
3338
ErrorStatus(Outcome in_outcome, std::string const& in_details)
3439
: outcome{ in_outcome }
3540
, details{ in_details }
3641
{}
3742

38-
Outcome outcome;
43+
/// @brief The outcome of the function.
44+
Outcome outcome;
45+
46+
/// @brief A human readable string that provides details about the outcome.
3947
std::string details;
4048

49+
///! @brief Return a human readable string for the given outcome.
4150
static std::string outcome_to_string(Outcome);
4251
};
4352

44-
// Check whether the given ErrorStatus is an error.
53+
///! @brief Check whether the given ErrorStatus is an error.
4554
constexpr bool
4655
is_error(const ErrorStatus& es) noexcept
4756
{
4857
return ErrorStatus::Outcome::OK != es.outcome;
4958
}
5059

51-
// Check whether the given ErrorStatus is non-null and an error.
60+
///! @brief Check whether the given ErrorStatus is non-null and an error.
5261
constexpr bool
5362
is_error(const ErrorStatus* es) noexcept
5463
{

src/opentime/rationalTime.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class RationalTime
9393
return value_rescaled_to(rt._rate);
9494
}
9595

96-
/// @brief Returns whether time is almost equal to another time.
96+
/// @brief Returns whether this time is almost equal to another time.
9797
///
9898
/// @param other The other time for comparison.
9999
/// @param delta The tolerance used for the comparison.
@@ -103,10 +103,10 @@ class RationalTime
103103
return fabs(value_rescaled_to(other._rate) - other._value) <= delta;
104104
}
105105

106-
/// @brief Returns whether the value and rate are equal to another time.
106+
/// @brief Returns whether this value and rate are exactly equal to another time.
107107
///
108-
/// This is different from the operator "==" that rescales the time before
109-
/// comparison.
108+
/// Note that this is different from the equality operator that rescales the time
109+
/// before comparison.
110110
constexpr bool strictly_equal(RationalTime other) const noexcept
111111
{
112112
return _value == other._value && _rate == other._rate;

src/opentime/stringPrintf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
namespace opentime { namespace OPENTIME_VERSION {
1212

13+
/// @brief This provides printf style functionality for std::string.
1314
template <typename... Args>
1415
std::string
1516
string_printf(char const* format, Args... args)

0 commit comments

Comments
 (0)