Loading...
Searching...
No Matches
EfTime Class Reference

A class that represents a point in time for execution. More...

#include <time.h>

Public Types

using SplineEvaluationFlags = uint8_t
 Data type for storing app-specific spline evaluation flags.
 

Public Member Functions

 EfTime ()
 A default constructed EfTime is set to the default frame value.
 
 EfTime (const UsdTimeCode timeCode, SplineEvaluationFlags splineFlags=0)
 Constructs an EfTime object for a specific frame with an optional evaluation location and set of spline flags.
 
bool operator== (const EfTime &rhs) const
 Returns true if *this == rhs.
 
bool operator!= (const EfTime &rhs) const
 
bool operator< (const EfTime &rhs) const
 Returns true if *this < rhs.
 
bool operator<= (const EfTime &rhs) const
 
bool operator> (const EfTime &rhs) const
 
bool operator>= (const EfTime &rhs) const
 
EF_API std::string GetAsString () const
 Returns this object as string.
 
Time code
const UsdTimeCode GetTimeCode () const
 Returns the time code.
 
void SetTimeCode (const UsdTimeCode timeCode)
 Sets the time code to timeCode.
 
Spline evaluation flags
SplineEvaluationFlags GetSplineEvaluationFlags () const
 Returns the spline evaluation flags that will be used during evaluation.
 
void SetSplineEvaluationFlags (SplineEvaluationFlags flags)
 Sets the spline evaluation flags that will be used during evaluation.
 

Friends

template<class HashState >
void TfHashAppend (HashState &h, const EfTime &t)
 Provides a hash function for EfTime.
 

Detailed Description

A class that represents a point in time for execution.

Time has a frame value that can be double-valued or set to "default". The "default" frame can be thought to represent a point that is not on the timeline.

EfTime also contains spline evaluation flags that cause splines to be evaluated in application-specific, special ways. These flags should be consumed when spline evaluation is dispatched to the application-level evaluation logic.

Definition at line 36 of file time.h.

Member Typedef Documentation

◆ SplineEvaluationFlags

using SplineEvaluationFlags = uint8_t

Data type for storing app-specific spline evaluation flags.

Definition at line 41 of file time.h.

Constructor & Destructor Documentation

◆ EfTime() [1/2]

EfTime ( )
inline

A default constructed EfTime is set to the default frame value.

Definition at line 45 of file time.h.

◆ EfTime() [2/2]

EfTime ( const UsdTimeCode  timeCode,
SplineEvaluationFlags  splineFlags = 0 
)
inlineexplicit

Constructs an EfTime object for a specific frame with an optional evaluation location and set of spline flags.

Definition at line 53 of file time.h.

Member Function Documentation

◆ GetAsString()

EF_API std::string GetAsString ( ) const

Returns this object as string.

Note that evaluation location will only be denoted in the output string if the time code IsPreTime().

◆ GetSplineEvaluationFlags()

SplineEvaluationFlags GetSplineEvaluationFlags ( ) const
inline

Returns the spline evaluation flags that will be used during evaluation.

Definition at line 84 of file time.h.

◆ GetTimeCode()

const UsdTimeCode GetTimeCode ( ) const
inline

Returns the time code.

Definition at line 66 of file time.h.

◆ operator!=()

bool operator!= ( const EfTime rhs) const
inline

Definition at line 107 of file time.h.

◆ operator<()

bool operator< ( const EfTime rhs) const
inline

Returns true if *this < rhs.

Note that a time with frame set to "default" is lesser than all non-default times.

Also note that evaluation location and spline flags have no effect on ordering for the default frame. Spline flags are only used for stable ordering, but there is no logical ordering between two sets of spline flags.

Definition at line 121 of file time.h.

◆ operator<=()

bool operator<= ( const EfTime rhs) const
inline

Definition at line 130 of file time.h.

◆ operator==()

bool operator== ( const EfTime rhs) const
inline

Returns true if *this == rhs.

Definition at line 99 of file time.h.

◆ operator>()

bool operator> ( const EfTime rhs) const
inline

Definition at line 134 of file time.h.

◆ operator>=()

bool operator>= ( const EfTime rhs) const
inline

Definition at line 138 of file time.h.

◆ SetSplineEvaluationFlags()

void SetSplineEvaluationFlags ( SplineEvaluationFlags  flags)
inline

Sets the spline evaluation flags that will be used during evaluation.

Definition at line 90 of file time.h.

◆ SetTimeCode()

void SetTimeCode ( const UsdTimeCode  timeCode)
inline

Sets the time code to timeCode.

Definition at line 72 of file time.h.

Friends And Related Function Documentation

◆ TfHashAppend

void TfHashAppend ( HashState &  h,
const EfTime t 
)
friend

Provides a hash function for EfTime.

Definition at line 145 of file time.h.


The documentation for this class was generated from the following file: