|
Mantid
|
Represents a time interval. More...
#include <DateAndTime.h>
Public Member Functions | |
| std::string | begin_str () const |
| String representation of the begin time. | |
| bool | contains (const Types::Core::DateAndTime &t) const |
| True if the interval contains t. | |
| double | duration () const |
| in seconds | |
| std::string | end_str () const |
| String representation of the end time. | |
| TimeInterval | intersection (const TimeInterval &ti) const |
| Returns an intersection of two intervals. | |
| bool | isValid () const |
| True if the interval is not empty. | |
| Types::Core::time_duration | length () const |
| Interval length (in seconds?) | |
| bool | operator< (const TimeInterval &ti) const |
| Returns true if this interval ends before ti starts. | |
| bool | operator== (const TimeInterval &ti) const |
| bool | operator> (const TimeInterval &ti) const |
| bool | overlaps (const TimeInterval &other) const |
| Return true if the SplittingInterval overlaps with this one. | |
| bool | overlaps (const TimeInterval *other) const |
| Return true if the SplittingInterval overlaps with this one. | |
| const Types::Core::DateAndTime & | start () const |
| Beginning of the interval. | |
| const Types::Core::DateAndTime & | stop () const |
| End of the interval. | |
| TimeInterval () | |
| Default constructor. | |
| TimeInterval (const std::string &from, const std::string &to) | |
| TimeInterval (const Types::Core::DateAndTime &from, const Types::Core::DateAndTime &to) | |
| Constructor. | |
Private Attributes | |
| Types::Core::DateAndTime | m_start |
| begin | |
| Types::Core::DateAndTime | m_stop |
| end | |
Friends | |
| MANTID_KERNEL_DLL std::ostream & | operator<< (std::ostream &s, const Mantid::Kernel::TimeInterval &t) |
| Stream output operator | |
|
inline |
| Mantid::Kernel::TimeInterval::TimeInterval | ( | const Types::Core::DateAndTime & | from, |
| const Types::Core::DateAndTime & | to | ||
| ) |
| Mantid::Kernel::TimeInterval::TimeInterval | ( | const std::string & | from, |
| const std::string & | to | ||
| ) |
Definition at line 31 of file DateAndTime.cpp.
| std::string Mantid::Kernel::TimeInterval::begin_str | ( | ) | const |
String representation of the begin time.
Definition at line 93 of file DateAndTime.cpp.
References m_start.
Referenced by Mantid::Kernel::SplittingInterval::debugStrPrint().
|
inline |
True if the interval contains t.
Definition at line 46 of file DateAndTime.h.
| double Mantid::Kernel::TimeInterval::duration | ( | ) | const |
| std::string Mantid::Kernel::TimeInterval::end_str | ( | ) | const |
String representation of the end time.
Definition at line 96 of file DateAndTime.cpp.
References m_stop.
Referenced by Mantid::Kernel::SplittingInterval::debugStrPrint().
| 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 59 of file DateAndTime.cpp.
References isValid(), start(), stop(), and TimeInterval().
Referenced by Mantid::Kernel::TimeROI::addMask().
|
inline |
True if the interval is not empty.
Definition at line 38 of file DateAndTime.h.
Referenced by intersection().
| Types::Core::time_duration Mantid::Kernel::TimeInterval::length | ( | ) | const |
Interval length (in seconds?)
Definition at line 86 of file DateAndTime.cpp.
References m_start, and m_stop.
Referenced by duration().
| bool Mantid::Kernel::TimeInterval::operator< | ( | const TimeInterval & | ti | ) | const |
Returns true if this interval ends before ti starts.
Definition at line 69 of file DateAndTime.cpp.
| bool Mantid::Kernel::TimeInterval::operator== | ( | const TimeInterval & | ti | ) | const |
Definition at line 90 of file DateAndTime.cpp.
| bool Mantid::Kernel::TimeInterval::operator> | ( | const TimeInterval & | ti | ) | const |
Definition at line 77 of file DateAndTime.cpp.
| bool Mantid::Kernel::TimeInterval::overlaps | ( | const TimeInterval & | other | ) | const |
Return true if the SplittingInterval overlaps with this one.
Definition at line 52 of file DateAndTime.cpp.
References overlaps().
| bool Mantid::Kernel::TimeInterval::overlaps | ( | const TimeInterval * | other | ) | const |
Return true if the SplittingInterval overlaps with this one.
Definition at line 42 of file DateAndTime.cpp.
References start(), and stop().
Referenced by Mantid::Kernel::SplittingInterval::operator|(), and overlaps().
|
inline |
Beginning of the interval.
Definition at line 34 of file DateAndTime.h.
Referenced by Mantid::Kernel::LogFilter::addFilter(), Mantid::DataObjects::SplittersWorkspace::addSplitter(), Mantid::Kernel::TimeSeriesProperty< TYPE >::expandFilterToRange(), intersection(), Mantid::Kernel::TimeSeriesProperty< TYPE >::makeFilterByValue(), operator<(), operator==(), operator>(), Mantid::Kernel::SplittingInterval::operator|(), overlaps(), and Mantid::DataObjects::TimeSplitter::TimeSplitter().
|
inline |
End of the interval.
Definition at line 36 of file DateAndTime.h.
Referenced by Mantid::DataObjects::SplittersWorkspace::addSplitter(), Mantid::Kernel::TimeSeriesProperty< TYPE >::expandFilterToRange(), intersection(), Mantid::Kernel::TimeSeriesProperty< TYPE >::makeFilterByValue(), operator<(), operator==(), operator>(), Mantid::Kernel::SplittingInterval::operator|(), overlaps(), and Mantid::DataObjects::TimeSplitter::TimeSplitter().
|
friend |
Stream output operator
Definition at line 98 of file DateAndTime.cpp.
|
private |
begin
Definition at line 68 of file DateAndTime.h.
Referenced by begin_str(), length(), and TimeInterval().
|
private |
end
Definition at line 70 of file DateAndTime.h.
Referenced by end_str(), length(), TimeInterval(), and TimeInterval().