Mantid
|
Represents a time interval. More...
#include <DateAndTime.h>
Public Member Functions | |
Types::Core::DateAndTime | begin () const |
Beginning of the interval. More... | |
std::string | begin_str () const |
String representation of the begin time. More... | |
bool | contains (const Types::Core::DateAndTime &t) const |
True if the interval contains t. More... | |
Types::Core::DateAndTime | end () const |
End of the interval. More... | |
std::string | end_str () const |
String representation of the end time. More... | |
TimeInterval | intersection (const TimeInterval &ti) const |
Returns an intersection of two intervals. More... | |
bool | isValid () const |
True if the interval is not empty. More... | |
Types::Core::time_duration | length () const |
Interval length (in seconds?) More... | |
bool | operator< (const TimeInterval &ti) const |
Returns true if this interval ends before ti starts. More... | |
TimeInterval () | |
Default constructor. More... | |
TimeInterval (const Types::Core::DateAndTime &from, const Types::Core::DateAndTime &to) | |
Constructor. More... | |
Private Attributes | |
Types::Core::DateAndTime | m_begin |
begin More... | |
Types::Core::DateAndTime | m_end |
end More... | |
Friends | |
MANTID_KERNEL_DLL std::ostream & | operator<< (std::ostream &s, const Mantid::Kernel::TimeInterval &t) |
Stream output operator More... | |
|
inline |
Mantid::Kernel::TimeInterval::TimeInterval | ( | const Types::Core::DateAndTime & | from, |
const Types::Core::DateAndTime & | to | ||
) |
|
inline |
Beginning of the interval.
Definition at line 32 of file DateAndTime.h.
Referenced by Mantid::Kernel::LogFilter::addFilter(), Mantid::Kernel::TimeSeriesProperty< TYPE >::expandFilterToRange(), intersection(), and operator<().
std::string Mantid::Kernel::TimeInterval::begin_str | ( | ) | const |
String representation of the begin time.
Definition at line 52 of file DateAndTime.cpp.
References m_begin.
|
inline |
True if the interval contains t.
Definition at line 42 of file DateAndTime.h.
|
inline |
End of the interval.
Definition at line 34 of file DateAndTime.h.
Referenced by Mantid::Kernel::LogFilter::addFilter(), Mantid::Kernel::TimeSeriesProperty< TYPE >::expandFilterToRange(), and intersection().
std::string Mantid::Kernel::TimeInterval::end_str | ( | ) | const |
String representation of the end time.
Definition at line 55 of file DateAndTime.cpp.
References m_end.
TimeInterval Mantid::Kernel::TimeInterval::intersection | ( | const TimeInterval & | ti | ) | const |
Returns an intersection of two intervals.
Returns an intersection of this interval with ti.
ti | :: Time interval |
Definition at line 36 of file DateAndTime.cpp.
References begin(), end(), isValid(), and TimeInterval().
Referenced by Mantid::Kernel::LogFilter::addFilter().
|
inline |
True if the interval is not empty.
Definition at line 36 of file DateAndTime.h.
Referenced by Mantid::Kernel::LogFilter::addFilter(), and intersection().
|
inline |
Interval length (in seconds?)
Definition at line 39 of file DateAndTime.h.
Referenced by Mantid::Kernel::timeMean().
|
inline |
Returns true if this interval ends before ti starts.
Definition at line 46 of file DateAndTime.h.
References begin().
|
friend |
Stream output operator
Definition at line 57 of file DateAndTime.cpp.
|
private |
|
private |