7#ifndef PXR_USD_SDF_TIME_CODE_H
8#define PXR_USD_SDF_TIME_CODE_H
13#include "pxr/usd/sdf/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
38 constexpr SdfTimeCode(
double time = 0.0) noexcept : _time(time) {};
45 constexpr bool operator==(
const SdfTimeCode &rhs)
const noexcept
46 {
return _time == rhs._time; }
47 constexpr bool operator!=(
const SdfTimeCode &rhs)
const noexcept
48 {
return _time != rhs._time; }
49 constexpr bool operator<(
const SdfTimeCode &rhs)
const noexcept
50 {
return _time < rhs._time; }
51 constexpr bool operator>(
const SdfTimeCode &rhs)
const noexcept
52 {
return _time > rhs._time; }
53 constexpr bool operator<=(
const SdfTimeCode &rhs)
const noexcept
54 {
return _time <= rhs._time; }
55 constexpr bool operator>=(
const SdfTimeCode &rhs)
const noexcept
56 {
return _time >= rhs._time; }
68 explicit constexpr operator double() const noexcept {
return _time;}
72 return std::hash<double>()(_time);
99 std::swap(lhs._time, rhs._time);
129bool operator==(
double time,
const SdfTimeCode &timeCode)
noexcept
133bool operator!=(
double time,
const SdfTimeCode &timeCode)
noexcept
137bool operator<(
double time,
const SdfTimeCode &timeCode)
noexcept
141bool operator>(
double time,
const SdfTimeCode &timeCode)
noexcept
145bool operator<=(
double time,
const SdfTimeCode &timeCode)
noexcept
149bool operator>=(
double time,
const SdfTimeCode &timeCode)
noexcept
157PXR_NAMESPACE_CLOSE_SCOPE
#define VT_VALUE_TYPE_CAN_TRANSFORM(T)
A helper for specializing the above trait.
Value type that represents a time code.
constexpr double GetValue() const noexcept
Return the time value.
constexpr SdfTimeCode(double time=0.0) noexcept
Construct a time code with the given time.
size_t GetHash() const
Hash function.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].