![]() |
|
Value type that represents a time code. More...
#include <timeCode.h>
Public Member Functions | |
| constexpr double | operator/ (const GfTimeCode &rhs) const noexcept |
| Ratio of two time codes is a unitless double scale factor. | |
| constexpr GfDuration | operator- (const GfTimeCode &rhs) const noexcept |
| Compute a GfDuration offset between two time codes. | |
| constexpr GfTimeCode | operator- () const noexcept |
| Negate a time code. Equivalent to scaling by -1. | |
| constexpr | operator double () const noexcept |
| Explicit conversion to double. | |
| constexpr | operator GfDuration () const noexcept |
| Explicit conversion to GfDuration. | |
| size_t | GetHash () const |
| Hash function. | |
Constructors | |
| constexpr | GfTimeCode (double time=0.0) noexcept |
| Construct a time code with the given time. | |
| constexpr | GfTimeCode (GfDuration duration) noexcept |
| Explicitly construct a time code from a duration. | |
Accessors | |
| constexpr double | GetValue () const noexcept |
| Return the time value. | |
Friends | |
| constexpr GfTimeCode | operator+ (const GfTimeCode &lhs, const GfTimeCode &rhs) noexcept |
| Sum time codes. | |
| constexpr GfTimeCode | operator+ (const GfTimeCode &lhs, const GfDuration &rhs) noexcept |
| Offset a time code value. | |
| constexpr GfTimeCode | operator+ (const GfDuration &lhs, const GfTimeCode &rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr GfTimeCode | operator+ (const GfTimeCode &lhs, const double rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr GfTimeCode | operator+ (const double lhs, const GfTimeCode &rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr GfTimeCode | operator- (const GfTimeCode &lhs, const GfDuration &rhs) noexcept |
| Offset a time code value. | |
| constexpr GfTimeCode | operator- (const GfDuration &lhs, const GfTimeCode &rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr GfTimeCode | operator- (const GfTimeCode &lhs, const double rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| constexpr GfTimeCode | operator- (const double lhs, const GfTimeCode &rhs) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| size_t | hash_value (const GfTimeCode &ap) |
| template<class HashState > | |
| void | TfHashAppend (HashState &h, const GfTimeCode &t) |
| Enable TfHash for GfTimeCode. | |
| void | swap (GfTimeCode &lhs, GfTimeCode &rhs) |
Operators | |
| constexpr bool | operator== (const GfTimeCode &rhs) const noexcept |
| constexpr bool | operator!= (const GfTimeCode &rhs) const noexcept |
| constexpr bool | operator< (const GfTimeCode &rhs) const noexcept |
| constexpr bool | operator> (const GfTimeCode &rhs) const noexcept |
| constexpr bool | operator<= (const GfTimeCode &rhs) const noexcept |
| constexpr bool | operator>= (const GfTimeCode &rhs) const noexcept |
| constexpr GfTimeCode | operator* (const GfTimeCode &t, const double amount) noexcept |
| Scale time code values by doubles. | |
| constexpr GfTimeCode | operator* (const double amount, const GfTimeCode &t) noexcept |
| constexpr GfTimeCode | operator/ (const GfTimeCode &t, const double amount) noexcept |
Value type that represents a time code.
It's equivalent to a double type value but is used to indicate that this value should be resolved by any time based value resolution.
Definition at line 28 of file timeCode.h.
|
inlineconstexprnoexcept |
Construct a time code with the given time.
A default constructed GfTimeCode has a time of 0.0. A double value can implicitly cast to GfTimeCode.
Definition at line 39 of file timeCode.h.
|
inlineexplicitconstexprnoexcept |
Explicitly construct a time code from a duration.
This is equivalent to (GfTimeCode(0) + duration).
Definition at line 46 of file timeCode.h.
|
inline |
Hash function.
Definition at line 160 of file timeCode.h.
|
inlineconstexprnoexcept |
Return the time value.
Definition at line 188 of file timeCode.h.
|
inlineexplicitconstexprnoexcept |
Explicit conversion to double.
Definition at line 149 of file timeCode.h.
|
inlineexplicitconstexprnoexcept |
Explicit conversion to GfDuration.
This is equivalent to *this - GfTimeCode(0)
Definition at line 154 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 57 of file timeCode.h.
|
inlineconstexprnoexcept |
Negate a time code. Equivalent to scaling by -1.
Definition at line 145 of file timeCode.h.
|
inlineconstexprnoexcept |
Compute a GfDuration offset between two time codes.
Definition at line 99 of file timeCode.h.
|
inlineconstexprnoexcept |
Ratio of two time codes is a unitless double scale factor.
Definition at line 86 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 59 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 63 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 55 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 61 of file timeCode.h.
|
inlineconstexprnoexcept |
Definition at line 65 of file timeCode.h.
|
friend |
Definition at line 172 of file timeCode.h.
|
friend |
Definition at line 75 of file timeCode.h.
|
friend |
Scale time code values by doubles.
Definition at line 71 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 119 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 109 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 114 of file timeCode.h.
|
friend |
Offset a time code value.
Definition at line 104 of file timeCode.h.
|
friend |
Sum time codes.
This is questionable mathematically but it is needed to conveniently compute an average time code, like say a midpoint time.
Definition at line 94 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 140 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 130 of file timeCode.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 135 of file timeCode.h.
|
friend |
Offset a time code value.
Definition at line 125 of file timeCode.h.
|
friend |
Definition at line 79 of file timeCode.h.
|
friend |
Definition at line 195 of file timeCode.h.
|
friend |
Enable TfHash for GfTimeCode.
Definition at line 176 of file timeCode.h.