24 #ifndef PXR_USD_SDF_TIME_CODE_H 25 #define PXR_USD_SDF_TIME_CODE_H 30 #include "pxr/usd/sdf/api.h" 36 PXR_NAMESPACE_OPEN_SCOPE
54 constexpr
SdfTimeCode(
double time = 0.0) noexcept : _time(time) {};
61 constexpr
bool operator==(
const SdfTimeCode &rhs)
const noexcept
62 {
return _time == rhs._time; }
63 constexpr
bool operator!=(
const SdfTimeCode &rhs)
const noexcept
64 {
return _time != rhs._time; }
65 constexpr
bool operator<(
const SdfTimeCode &rhs)
const noexcept
66 {
return _time < rhs._time; }
67 constexpr
bool operator>(
const SdfTimeCode &rhs)
const noexcept
68 {
return _time > rhs._time; }
69 constexpr
bool operator<=(
const SdfTimeCode &rhs)
const noexcept
70 {
return _time <= rhs._time; }
71 constexpr
bool operator>=(
const SdfTimeCode &rhs)
const noexcept
72 {
return _time >= rhs._time; }
84 explicit constexpr
operator double() const noexcept {
return _time;}
88 return std::hash<double>()(_time);
150 bool operator<(
double time,
const SdfTimeCode &timeCode) noexcept
154 bool operator>(
double time,
const SdfTimeCode &timeCode) noexcept
158 bool operator<=(
double time,
const SdfTimeCode &timeCode) noexcept
162 bool operator>=(
double time,
const SdfTimeCode &timeCode) noexcept
170 PXR_NAMESPACE_CLOSE_SCOPE
172 #endif // PXR_USD_SDF_TIME_CODE_H constexpr double GetValue() const noexcept
Return the time value.
size_t GetHash() const
Hash function.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
AR_API bool operator==(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
void swap(UsdStageLoadRules &l, UsdStageLoadRules &r)
Swap the contents of rules l and r.
Value type that represents a time code.
constexpr SdfTimeCode(double time=0.0) noexcept
Construct a time code with the given time.
SDF_API std::ostream & operator<<(std::ostream &out, const SdfTimeCode &ap)
Stream insertion operator for the string representation of this time code.