Added multimap for Customer.
Using std::optional. Added member functions: QVector<ATBPaymentOption> &getAllPaymentOptions() QVector<ATBPaymentOption> const &getAllPaymentOptions() const std::optional<QVector<ATBPaymentRate>> getPaymentRateForAllKeys() const std::optional<QVector<ATBPaymentRate>> getPaymentRateForKey(int key) const std::optional<QVector<ATBDailyTicket>> getDailyTicketsForAllKeys() const std::optional<QVector<ATBDailyTicket>> getDailyTicketsForKey(int key) const std::optional<ATBCustomer> getCustomerForType(ATBCustomer::CustomerType customerType) std::optional<ATBWeekDaysWorktime> getWeekDayWorkTime(QTime const &time, Qt::DayOfWeek dayOfWeek) Removed: QVector<ATBDailyTicket> const &getDailyTickets() const;
This commit is contained in:
parent
3311537fee
commit
0af858daea
@ -26,6 +26,7 @@
|
||||
#include "tariff_timestep_config.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <optional>
|
||||
|
||||
using namespace std;
|
||||
using namespace rapidjson;
|
||||
@ -51,6 +52,7 @@ public:
|
||||
multimap<int, ATBTimeRange> TimeRange;
|
||||
multimap<int, ATBTimeStepConfig> TimeStepConfig;
|
||||
multimap<int, ATBTimeBase> TimeBase;
|
||||
multimap<int, ATBCustomer> Customer;
|
||||
|
||||
/// <summary>
|
||||
/// Parse JSON string
|
||||
@ -61,7 +63,14 @@ public:
|
||||
|
||||
ATBPaymentOption &getPaymentOptions();
|
||||
ATBPaymentOption const &getPaymentOptions() const;
|
||||
QVector<ATBDailyTicket> const &getDailyTickets() const;
|
||||
QVector<ATBPaymentOption> &getAllPaymentOptions();
|
||||
QVector<ATBPaymentOption> const &getAllPaymentOptions() const;
|
||||
std::optional<QVector<ATBPaymentRate>> getPaymentRateForAllKeys() const;
|
||||
std::optional<QVector<ATBPaymentRate>> getPaymentRateForKey(int key) const;
|
||||
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForAllKeys() const;
|
||||
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForKey(int key) const;
|
||||
std::optional<ATBCustomer> getCustomerForType(ATBCustomer::CustomerType customerType);
|
||||
std::optional<ATBWeekDaysWorktime> getWeekDayWorkTime(QTime const &time, Qt::DayOfWeek dayOfWeek);
|
||||
|
||||
private:
|
||||
/// <summary>
|
||||
@ -71,5 +80,5 @@ private:
|
||||
/// <returns></returns>
|
||||
MemberType IdentifyJsonMember(const char* member_name);
|
||||
|
||||
ATBPaymentOption currentPaymentOptions;
|
||||
QVector<ATBPaymentOption> currentPaymentOptions;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user