#pragma once #include #include #include #include #include #include #include #include #include "member_type.h" #include "currency.h" #include "duration.h" #include "payment_mtd.h" #include "payment_opt.h" #include "spec_days.h" #include "payment_opt.h" #include "weekdays.h" #include "weekdays_worktime.h" #include "spec_days_worktime.h" #include "member_type.h" #include "period_year.h" #include "payment_rate.h" #include "atb_project.h" #include "tariff_daily_ticket.h" #include "time_range_header.h" #include "tariff_timestep_config.h" #include using namespace std; using namespace rapidjson; class Configuration { public: ATBProject project; ATBCurrency Currency; ATBDuration duration; multimap Duration; multimap PaymentMethod; multimap PaymentRate; multimap SpecialDaysWorktime; multimap SpecialDays; multimap WeekDays; multimap YearPeriod; multimap WeekDaysWorktime; multimap PaymentOption; multimap DailyTicket; multimap TimeRange; multimap TimeStepConfig; multimap TimeBase; /// /// Parse JSON string /// /// /// Returns operation status bool (OK | FAIL) bool ParseJson(Configuration* cfg, const char* json); ATBPaymentOption &getPaymentOptions(); ATBPaymentOption const &getPaymentOptions() const; QVector const &getDailyTickets() const; private: /// /// Identify type of JSON member /// /// /// MemberType IdentifyJsonMember(const char* member_name); ATBPaymentOption currentPaymentOptions; };