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

30 lines
722 B
C
Raw Normal View History

2024-10-21 14:31:08 +02:00
#ifndef TARIFF_COMP_STEP_H_INCLUDED
#define TARIFF_COMP_STEP_H_INCLUDED
#include <QDateTime>
#include "tariff_comp_state.h"
class TariffCompStep {
int m_duration;
QDateTime const m_start;
QDateTime const m_end;
uint64_t const m_handle;
TariffCompState m_compState;
uint64_t hash();
public:
explicit TariffCompStep(int duration, QDateTime start, QDateTime end, TariffCompState &compState)
: m_duration(duration)
, m_start(std::move(start))
, m_end(std::move(end))
, m_handle(hash())
, m_compState(compState) {
}
uint64_t handle() { return m_handle; }
uint64_t handle() const { return m_handle; }
};
#endif // TARIFF_COMP_STEP_H_INCLUDED