Model Railroad System
2.2.1
|
The TimeRange class implements a range of times. More...
#include <Station.h>
Public Member Functions | |
TimeRange (double from_=0.0, double to_=0.0) | |
Construct a time range, from a start and end time. More... | |
double | From () const |
Return the low end of the range. More... | |
double | To () const |
Return the high end of the range. More... | |
bool | ContainsTime (double time) const |
Does this interval contain the specified time? More... | |
bool | operator< (const TimeRange &other) const |
Less than operator. More... | |
bool | operator> (const TimeRange &other) const |
Greater than operator. More... | |
bool | operator== (const TimeRange &other) const |
Equality to operator. More... | |
bool | operator<= (const TimeRange &other) const |
Less than or equal operator. More... | |
bool | operator>= (const TimeRange &other) const |
Greater than or equal operator. More... | |
TimeRange (const TimeRange &other) | |
Copy constructor: create a clone of a TimeRange. More... | |
TimeRange & | operator= (const TimeRange &other) |
Assign a TimeRange to another TimeRange. More... | |
ostream & | Write (ostream &stream) const |
Write ourselves to an output stream. More... | |
istream & | Read (istream &stream) |
Read ourselves from an input stream. More... | |
Private Attributes | |
double | from |
Start time. More... | |
double | to |
End time. More... | |
The TimeRange class implements a range of times.
|
inline |
Construct a time range, from a start and end time.
from_ | The start time. |
to_ | The end time. |
References TTSupport::Occupied::from.
|
inline |
Copy constructor: create a clone of a TimeRange.
other | The other TimeRange object. |
References TTSupport::Occupied::from, from, and to.
|
inline |
Does this interval contain the specified time?
time | The time to check for. |
References TTSupport::Occupied::from.
|
inline |
Return the low end of the range.
References TTSupport::Occupied::from.
|
inline |
|
inline |
Less than or equal operator.
other | The time range to compare to. |
Assign a TimeRange to another TimeRange.
other | The other TimeRange object. |
References TTSupport::Occupied::from, from, TTSupport::Occupied::Read(), lcc::stream, to, and TTSupport::Occupied::Write().
|
inline |
Equality to operator.
other | The time range to compare to. |
References TTSupport::Occupied::from, from, and to.
|
inline |
Greater than operator.
other | The time range to compare to. |
References TTSupport::Occupied::from, and to.
|
inline |
Greater than or equal operator.
other | The time range to compare to. |
istream& TTSupport::TimeRange::Read | ( | istream & | stream | ) |
Read ourselves from an input stream.
stream | The stream to read from. |
|
inline |
Return the high end of the range.
ostream& TTSupport::TimeRange::Write | ( | ostream & | stream | ) | const |
Write ourselves to an output stream.
stream | The stream to write to. |
|
private |
Start time.
Referenced by operator<(), operator=(), operator==(), and TimeRange().
|
private |
End time.
Referenced by operator=(), operator==(), operator>(), and TimeRange().