HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ArTimestamp Class Reference

#include <timestamp.h>

Public Member Functions

 ArTimestamp ()
 Create an invalid timestamp. More...
 
 ArTimestamp (double time)
 Create a timestamp at time, which must be a Unix time value. More...
 
bool IsValid () const
 Return true if this timestamp is valid, false otherwise. More...
 
double GetTime () const
 

Friends

template<class HashState >
void TfHashAppend (HashState &h, const ArTimestamp &t)
 
bool operator== (const ArTimestamp &lhs, const ArTimestamp &rhs)
 
bool operator!= (const ArTimestamp &lhs, const ArTimestamp &rhs)
 
bool operator< (const ArTimestamp &lhs, const ArTimestamp &rhs)
 
bool operator>= (const ArTimestamp &lhs, const ArTimestamp &rhs)
 
bool operator<= (const ArTimestamp &lhs, const ArTimestamp &rhs)
 
bool operator> (const ArTimestamp &lhs, const ArTimestamp &rhs)
 

Detailed Description

Represents a timestamp for an asset. Timestamps are represented by Unix time, the number of seconds elapsed since 00:00:00 UTC 1/1/1970.

Definition at line 42 of file timestamp.h.

Constructor & Destructor Documentation

ArTimestamp::ArTimestamp ( )
inline

Create an invalid timestamp.

Definition at line 46 of file timestamp.h.

ArTimestamp::ArTimestamp ( double  time)
inlineexplicit

Create a timestamp at time, which must be a Unix time value.

Definition at line 52 of file timestamp.h.

Member Function Documentation

double ArTimestamp::GetTime ( ) const
inline

Return the time represented by this timestamp as a double. If this timestamp is invalid, issue a coding error and return a quiet NaN value.

Definition at line 66 of file timestamp.h.

bool ArTimestamp::IsValid ( ) const
inline

Return true if this timestamp is valid, false otherwise.

Definition at line 58 of file timestamp.h.

Friends And Related Function Documentation

bool operator!= ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 85 of file timestamp.h.

bool operator< ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 90 of file timestamp.h.

bool operator<= ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 101 of file timestamp.h.

bool operator== ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 79 of file timestamp.h.

bool operator> ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 106 of file timestamp.h.

bool operator>= ( const ArTimestamp lhs,
const ArTimestamp rhs 
)
friend

Comparison operators Note that invalid timestamps are considered less than all other timestamps.

Definition at line 96 of file timestamp.h.

template<class HashState >
void TfHashAppend ( HashState &  h,
const ArTimestamp t 
)
friend

Definition at line 119 of file timestamp.h.


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