Skip to content

Commit e26ea22

Browse files
committed
Add Doxygen comments
Signed-off-by: Darby Johnston <[email protected]>
1 parent 47d7779 commit e26ea22

File tree

5 files changed

+190
-149
lines changed

5 files changed

+190
-149
lines changed

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)