9#include "MantidKernel/DllConfig.h"
10#include "MantidTypes/Core/DateAndTime.h"
30 TimeInterval(
const Types::Core::DateAndTime &from,
const Types::Core::DateAndTime &to);
32 Types::Core::DateAndTime
begin()
const {
return m_begin; }
34 Types::Core::DateAndTime
end()
const {
return m_end; }
36 bool isValid()
const {
return m_end > m_begin; }
39 Types::Core::time_duration
length()
const {
return m_end - m_begin; }
42 bool contains(
const Types::Core::DateAndTime &t)
const {
return t >= begin() && t < end(); }
48 std::string begin_str()
const;
50 std::string end_str()
const;
std::ostream & operator<<(std::ostream &out, const MantidQt::MantidWidgets::IndexType< i > &index)
Represents a time interval.
TimeInterval()
Default constructor.
Types::Core::DateAndTime m_end
end
Types::Core::DateAndTime begin() const
Beginning of the interval.
bool isValid() const
True if the interval is not empty.
Types::Core::DateAndTime end() const
End of the interval.
Types::Core::DateAndTime m_begin
begin
bool operator<(const TimeInterval &ti) const
Returns true if this interval ends before ti starts.
Types::Core::time_duration length() const
Interval length (in seconds?)
bool contains(const Types::Core::DateAndTime &t) const
True if the interval contains t.
bool MANTID_GEOMETRY_DLL intersection(const ConvexPolygon &P, const ConvexPolygon &Q, ConvexPolygon &out)
Compute the instersection of two convex polygons.
Helper class which provides the Collimation Length for SANS instruments.