Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
art::Timestamp Class Reference

#include <Timestamp.h>

Public Member Functions

constexpr Timestamp (TimeValue_t const iValue)
 
constexpr Timestamp ()
 
constexpr TimeValue_t value () const
 
constexpr std::uint32_t timeLow () const
 
constexpr std::uint32_t timeHigh () const
 
constexpr bool operator== (Timestamp const &iRHS) const
 
constexpr bool operator!= (Timestamp const &iRHS) const
 
constexpr bool operator< (Timestamp const &iRHS) const
 
constexpr bool operator<= (Timestamp const &iRHS) const
 
constexpr bool operator> (Timestamp const &iRHS) const
 
constexpr bool operator>= (Timestamp const &iRHS) const
 

Static Public Member Functions

static constexpr Timestamp invalidTimestamp ()
 
static constexpr Timestamp endOfTime ()
 
static constexpr Timestamp beginOfTime ()
 

Static Private Member Functions

static constexpr TimeValue_t lowMask ()
 

Private Attributes

std::uint32_t timeLow_
 
std::uint32_t timeHigh_
 

Detailed Description

Definition at line 10 of file Timestamp.h.

Constructor & Destructor Documentation

constexpr art::Timestamp::Timestamp ( TimeValue_t const  iValue)
inline

Definition at line 12 of file Timestamp.h.

13  : timeLow_{static_cast<std::uint32_t>(lowMask() & iValue)}
14  , timeHigh_{static_cast<std::uint32_t>(iValue >> 32)}
15  {}
std::uint32_t timeHigh_
Definition: Timestamp.h:99
static constexpr TimeValue_t lowMask()
Definition: Timestamp.h:102
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr art::Timestamp::Timestamp ( )
inline

Definition at line 17 of file Timestamp.h.

20  {}
std::uint32_t timeHigh_
Definition: Timestamp.h:99
static constexpr Timestamp invalidTimestamp()
Definition: Timestamp.h:82
std::uint32_t timeLow_
Definition: Timestamp.h:98

Member Function Documentation

static constexpr Timestamp art::Timestamp::beginOfTime ( )
inlinestatic

Definition at line 92 of file Timestamp.h.

93  {
94  return Timestamp{1};
95  }
constexpr Timestamp()
Definition: Timestamp.h:17
static constexpr Timestamp art::Timestamp::endOfTime ( )
inlinestatic

Definition at line 87 of file Timestamp.h.

88  {
89  return Timestamp{-1ull};
90  }
constexpr Timestamp()
Definition: Timestamp.h:17
static constexpr Timestamp art::Timestamp::invalidTimestamp ( )
inlinestatic

Definition at line 82 of file Timestamp.h.

83  {
84  return Timestamp{0};
85  }
constexpr Timestamp()
Definition: Timestamp.h:17
static constexpr TimeValue_t art::Timestamp::lowMask ( )
inlinestaticprivate

Definition at line 102 of file Timestamp.h.

103  {
104  return 0xFFFFFFFF;
105  }
constexpr bool art::Timestamp::operator!= ( Timestamp const &  iRHS) const
inline

Definition at line 47 of file Timestamp.h.

48  {
49  return !(*this == iRHS);
50  }
constexpr bool art::Timestamp::operator< ( Timestamp const &  iRHS) const
inline

Definition at line 53 of file Timestamp.h.

54  {
55  return timeHigh_ == iRHS.timeHigh_ ? timeLow_ < iRHS.timeLow_ :
56  timeHigh_ < iRHS.timeHigh_;
57  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr bool art::Timestamp::operator<= ( Timestamp const &  iRHS) const
inline

Definition at line 60 of file Timestamp.h.

61  {
62  return timeHigh_ == iRHS.timeHigh_ ? timeLow_ <= iRHS.timeLow_ :
63  timeHigh_ <= iRHS.timeHigh_;
64  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr bool art::Timestamp::operator== ( Timestamp const &  iRHS) const
inline

Definition at line 41 of file Timestamp.h.

42  {
43  return timeHigh_ == iRHS.timeHigh_ && timeLow_ == iRHS.timeLow_;
44  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr bool art::Timestamp::operator> ( Timestamp const &  iRHS) const
inline

Definition at line 67 of file Timestamp.h.

68  {
69  return timeHigh_ == iRHS.timeHigh_ ? timeLow_ > iRHS.timeLow_ :
70  timeHigh_ > iRHS.timeHigh_;
71  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr bool art::Timestamp::operator>= ( Timestamp const &  iRHS) const
inline

Definition at line 74 of file Timestamp.h.

75  {
76  return timeHigh_ == iRHS.timeHigh_ ? timeLow_ >= iRHS.timeLow_ :
77  timeHigh_ >= iRHS.timeHigh_;
78  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr std::uint32_t art::Timestamp::timeHigh ( ) const
inline

Definition at line 34 of file Timestamp.h.

35  {
36  return timeHigh_;
37  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
constexpr std::uint32_t art::Timestamp::timeLow ( ) const
inline

Definition at line 29 of file Timestamp.h.

30  {
31  return timeLow_;
32  }
std::uint32_t timeLow_
Definition: Timestamp.h:98
constexpr TimeValue_t art::Timestamp::value ( ) const
inline

Definition at line 23 of file Timestamp.h.

24  {
25  return (static_cast<std::uint64_t>(timeHigh_) << 32) | timeLow_;
26  }
std::uint32_t timeHigh_
Definition: Timestamp.h:99
std::uint32_t timeLow_
Definition: Timestamp.h:98

Member Data Documentation

std::uint32_t art::Timestamp::timeHigh_
private

Definition at line 99 of file Timestamp.h.

std::uint32_t art::Timestamp::timeLow_
private

Definition at line 98 of file Timestamp.h.


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