Added GetCostFromDuration()-functions: to be used for tariffs with only
steps and no special days. Example: Schoenu, Koenigsee.
This commit is contained in:
parent
cb78e27d37
commit
fd5b41364a
@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include "configuration.h"
|
||||
#include "payment_method.h"
|
||||
|
||||
#include <QDateTime>
|
||||
using namespace std;
|
||||
|
||||
@ -28,6 +30,11 @@ public:
|
||||
/// <returns>Returns cost (data type: double)</returns>
|
||||
double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, const QDateTime start_datetime, QDateTime & end_datetime, double durationMin, bool nextDay = false, bool prepaid = false);
|
||||
|
||||
// Introduced for Schoenau, Koenigsee.
|
||||
// For tariff of following structure: only steps, no special days, nonstop.
|
||||
uint32_t GetCostFromDuration(Configuration const* cfg, QDateTime const &start, quint64 durationMinutes, uint8_t paymentMethod = PaymentMethod::Steps);
|
||||
uint32_t GetCostFromDuration(Configuration const* cfg, QDateTime const &start, QDateTime const &end, uint8_t paymentMethod = PaymentMethod::Steps);
|
||||
|
||||
// Daily ticket
|
||||
QDateTime GetDailyTicketDuration(Configuration* cfg, const QDateTime start_datetime, uint8_t payment_option, bool carry_over);
|
||||
|
||||
@ -35,7 +42,7 @@ public:
|
||||
//
|
||||
// helper functions for Schoenau
|
||||
//
|
||||
QList<int> GetTimeSteps(Configuration const *cfg, int paymentOption);
|
||||
QList<int> GetTimeSteps(Configuration const *cfg, int paymentMethod);
|
||||
//
|
||||
double GetPriceForTimeStep(Configuration const *cfg, int paymentOption, int timeStep);
|
||||
uint32_t GetPriceForTimeStep(Configuration const *cfg, uint8_t paymentMethod, int timeStep);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user