MOBILISIS-Calculator/library/include/mobilisis/time_range.h

47 lines
1.1 KiB
C
Raw Normal View History

2024-09-27 13:41:30 +02:00
#ifndef TIME_RANGE_H_INCLUDED
#define TIME_RANGE_H_INCLUDED
#include "atb_time.h"
#include <QString>
struct TimeRange {
ATBTime m_start;
ATBTime m_end;
int m_duration;
explicit TimeRange() = default;
explicit TimeRange(QString const &start, QString const &end, int duration)
: m_start(start)
, m_end(end)
, m_duration(duration) {
}
explicit TimeRange(ATBTime const &start, ATBTime const &end, int duration)
: m_start(start)
, m_end(end)
, m_duration(duration) {
}
explicit TimeRange(TimeRange const &timeRange) {
m_start = timeRange.m_start;
m_end = timeRange.m_end;
m_duration = timeRange.m_duration;
}
TimeRange &operator=(TimeRange && timeRange) {
m_start = std::move(timeRange.m_start);
m_end = std::move(timeRange.m_end);
m_duration = timeRange.m_duration;
return *this;
}
TimeRange &operator=(TimeRange const &timeRange) {
m_start = timeRange.m_start;
m_end = timeRange.m_end;
m_duration = timeRange.m_duration;
return *this;
}
2024-09-27 13:41:30 +02:00
};
#endif // TIME_RANGE_H_INCLUDED