2023-12-12 12:14:14 +01:00
|
|
|
#ifndef TARIFF_TIME_BASE_H_INCLUDED
|
|
|
|
#define TARIFF_TIME_BASE_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QString>
|
2023-12-15 13:28:34 +01:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QDebugStateSaver>
|
2023-12-12 12:14:14 +01:00
|
|
|
|
2023-12-12 17:55:06 +01:00
|
|
|
struct ATBTimeBase {
|
2023-12-12 12:14:14 +01:00
|
|
|
enum class TimeBaseType {ABSOLUTE=0, RELATIVE=1};
|
|
|
|
|
2023-12-12 17:55:06 +01:00
|
|
|
ATBTimeBase() = default;
|
2023-12-12 12:14:14 +01:00
|
|
|
TimeBaseType tbase_type;
|
|
|
|
QString tbase_label;
|
2023-12-15 13:28:34 +01:00
|
|
|
|
|
|
|
friend QDebug operator<<(QDebug debug, ATBTimeBase const &timeBase) {
|
|
|
|
QDebugStateSaver saver(debug);
|
|
|
|
|
|
|
|
switch(timeBase.tbase_type) {
|
|
|
|
case ATBTimeBase::TimeBaseType::ABSOLUTE:
|
|
|
|
debug.nospace()
|
|
|
|
<< " tbase_type: " << "TimeBaseType::ABSOLUTE" << "\n"
|
|
|
|
<< "tbase_label: " << timeBase.tbase_label << "\n";
|
|
|
|
break;
|
|
|
|
case ATBTimeBase::TimeBaseType::RELATIVE:
|
|
|
|
debug.nospace()
|
|
|
|
<< " tbase_type: " << "TimeBaseType::RELATIVE" << "\n"
|
|
|
|
<< "tbase_label: " << timeBase.tbase_label << "\n";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
debug.nospace()
|
|
|
|
<< " tbase_type: " << "TimeBaseType::???" << "\n";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return debug;
|
|
|
|
}
|
|
|
|
|
2023-12-12 12:14:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TARIFF_TIME_BASE_H_INCLUDED
|