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 |
|
inline |
|
inline |
|
inline |
Return the low end of the range.
References from.
|
inline |
|
inline |
Less than or equal operator.
other | The time range to compare to. |
|
inline |
|
inline |
|
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.
References to.
ostream& TTSupport::TimeRange::Write | ( | ostream & | stream | ) | const |
Write ourselves to an output stream.
stream | The stream to write to. |
|
private |
Start time.
Referenced by ContainsTime(), From(), operator<(), operator=(), operator==(), operator>(), and TimeRange().
|
private |
End time.
Referenced by ContainsTime(), operator<(), operator=(), operator==(), operator>(), TimeRange(), and To().