From ea5ca54c4cb27d3a3cb147adda92d9b4ee6ebb12 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 30 Jan 2024 10:15:39 +0100 Subject: [PATCH] Add cust_id. Changed print-format. --- library/include/mobilisis/tariff_customer.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/include/mobilisis/tariff_customer.h b/library/include/mobilisis/tariff_customer.h index 44ce444..f25ffaa 100644 --- a/library/include/mobilisis/tariff_customer.h +++ b/library/include/mobilisis/tariff_customer.h @@ -10,25 +10,31 @@ struct ATBCustomer { ATBCustomer() = default; + int cust_id; CustomerType cust_type; QString cust_label; friend QDebug operator<<(QDebug debug, ATBCustomer const &customer) { QDebugStateSaver saver(debug); + debug.nospace() << "CUSTOMER" << "\n"; + switch(customer.cust_type) { case ATBCustomer::CustomerType::ADULT: debug.nospace() + << " cust_id: " << customer.cust_id << "\n" << " cust_type: " << "CustomerType::ADULT" << "\n" << "cust_label: " << customer.cust_label << "\n"; break; case ATBCustomer::CustomerType::CHILD: debug.nospace() + << " cust_id: " << customer.cust_id << "\n" << " cust_type: " << "CustomerType::CHILD" << "\n" << "cust_label: " << customer.cust_label << "\n"; break; case ATBCustomer::CustomerType::TEEN: debug.nospace() + << " cust_id: " << customer.cust_id << "\n" << " cust_type: " << "CustomerType::TEEN" << "\n" << "cust_label: " << customer.cust_label << "\n"; break;