|
DUDS
|
Distributed Update of Data from Something
|
A container holding the number of leap seconds and the time bounds over which the leap seconds are applied. More...
#include <LeapBounds.hpp>
Public Types | |
| typedef duds::time::interstellar::TimePoint< Clock, Duration > | TimePoint |
| The time point type used in this class. More... | |
Public Member Functions | |
| constexpr | LeapBounds () |
| A default constructor that sets invalid bounds and no leap seconds. More... | |
| constexpr | LeapBounds (const TimePoint &minimum, const TimePoint &maximum, const Count &leaps) |
| Constructs with specific values. More... | |
| LeapBounds (const LeapBounds &)=default | |
| template<class OtherClock , class OtherDuration , class OtherCount > | |
| LeapBounds (const LeapBounds< OtherClock, OtherDuration, OtherCount > &lb) | |
| Constructs from a different LeapBounds template. More... | |
| const Count & | leaps () const |
| Returns the leap seconds in this period. More... | |
| const TimePoint & | maximum () const |
| Returns the maximum bound time; the maximum is inclusive. More... | |
| const TimePoint & | minimum () const |
| Returns the minimum bound time; the minimum is exclusive. More... | |
| LeapBounds & | operator= (const LeapBounds &)=default |
| template<class OtherClock , class OtherDuration , class OtherCount > | |
| LeapBounds & | operator= (const LeapBounds< OtherClock, OtherDuration, OtherCount > &lb) |
| Assigns from a different LeapBounds template. More... | |
| bool | valid () const |
| Checks for validity; false if the maximum bound is under the minimum bound. More... | |
| template<class OtherClock , class OtherDuration > | |
| bool | within (const duds::time::interstellar::TimePoint< OtherClock, OtherDuration > &time) const |
| Returns true if the given provided time is within bounds. More... | |
| bool | within (const TimePoint &time) const |
| Returns true if the given provided time is within bounds. More... | |
Private Attributes | |
| TimePoint | max |
| The maximum bound time. More... | |
| TimePoint | min |
| The minimum bound time; times within bounds do not include this time. More... | |
| Count | total |
| The total leap seconds to apply during this period. More... | |
A container holding the number of leap seconds and the time bounds over which the leap seconds are applied.
Useful in cases when leap seconds will be regularly queried, but the queries will normally be for similar times. The template parameters allow for either smaller storage, or storage of the specific types that will be used (compared, added) to avoid run-time conversions.
| Clock | The clock type used with duds::time::interstellar::TimePoint to define the time bounds. |
| Duration | The duration type used with duds::time::interstellar::TimePoint to define the time bounds. |
| Count | The duration type used to store the number of leap seconds. |
Definition at line 38 of file LeapBounds.hpp.
| typedef duds::time::interstellar::TimePoint<Clock, Duration> duds::time::planetary::LeapBounds< Clock, Duration, Count >::TimePoint |
The time point type used in this class.
Definition at line 43 of file LeapBounds.hpp.
|
inline |
A default constructor that sets invalid bounds and no leap seconds.
Definition at line 61 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::LeapBounds().
|
inline |
Constructs with specific values.
| minimum | The minimum bound for the period. |
| maximum | The maximum bound for the period. |
| leaps | The number of leap seconds to apply during the period. |
Definition at line 71 of file LeapBounds.hpp.
|
default |
|
inline |
Constructs from a different LeapBounds template.
| lb | A LeapBounds object. Its values will be converted to the types used by this object and the stored. |
Definition at line 98 of file LeapBounds.hpp.
|
inline |
Returns the leap seconds in this period.
Definition at line 118 of file LeapBounds.hpp.
Referenced by duds::time::planetary::Earth::addLeapSeconds(), and duds::time::planetary::LeapBounds< Clock, Duration, Count >::operator=().
|
inline |
Returns the maximum bound time; the maximum is inclusive.
Definition at line 112 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::operator=().
|
inline |
Returns the minimum bound time; the minimum is exclusive.
Definition at line 106 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::operator=().
|
default |
|
inline |
Assigns from a different LeapBounds template.
| lb | A LeapBounds object. Its values will be converted to the types used by this object and the stored. |
Definition at line 84 of file LeapBounds.hpp.
|
inline |
Checks for validity; false if the maximum bound is under the minimum bound.
Definition at line 145 of file LeapBounds.hpp.
|
inline |
Returns true if the given provided time is within bounds.
| time | The time to check. |
Definition at line 127 of file LeapBounds.hpp.
Referenced by duds::time::planetary::Earth::addLeapSeconds().
|
inline |
Returns true if the given provided time is within bounds.
| time | The time to check. |
Definition at line 138 of file LeapBounds.hpp.
|
private |
The maximum bound time.
Definition at line 52 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::maximum(), duds::time::planetary::LeapBounds< Clock, Duration, Count >::valid(), and duds::time::planetary::LeapBounds< Clock, Duration, Count >::within().
|
private |
The minimum bound time; times within bounds do not include this time.
Definition at line 48 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::minimum().
|
private |
The total leap seconds to apply during this period.
Definition at line 56 of file LeapBounds.hpp.
Referenced by duds::time::planetary::LeapBounds< Clock, Duration, Count >::leaps().