30 lines
722 B
C
30 lines
722 B
C
|
#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
|