41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#ifndef TARIFF_TIME_BASE_H_INCLUDED
|
|
#define TARIFF_TIME_BASE_H_INCLUDED
|
|
|
|
#include <QString>
|
|
#include <QDebug>
|
|
#include <QDebugStateSaver>
|
|
|
|
struct ATBTimeBase {
|
|
enum class TimeBaseType {ABSOLUTE=0, RELATIVE=1};
|
|
|
|
ATBTimeBase() = default;
|
|
TimeBaseType tbase_type;
|
|
QString tbase_label;
|
|
|
|
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;
|
|
}
|
|
|
|
};
|
|
|
|
#endif // TARIFF_TIME_BASE_H_INCLUDED
|