Add cust_id. Changed print-format.
This commit is contained in:
parent
b347b6e50e
commit
ea5ca54c4c
@ -10,25 +10,31 @@ struct ATBCustomer {
|
|||||||
|
|
||||||
ATBCustomer() = default;
|
ATBCustomer() = default;
|
||||||
|
|
||||||
|
int cust_id;
|
||||||
CustomerType cust_type;
|
CustomerType cust_type;
|
||||||
QString cust_label;
|
QString cust_label;
|
||||||
|
|
||||||
friend QDebug operator<<(QDebug debug, ATBCustomer const &customer) {
|
friend QDebug operator<<(QDebug debug, ATBCustomer const &customer) {
|
||||||
QDebugStateSaver saver(debug);
|
QDebugStateSaver saver(debug);
|
||||||
|
|
||||||
|
debug.nospace() << "CUSTOMER" << "\n";
|
||||||
|
|
||||||
switch(customer.cust_type) {
|
switch(customer.cust_type) {
|
||||||
case ATBCustomer::CustomerType::ADULT:
|
case ATBCustomer::CustomerType::ADULT:
|
||||||
debug.nospace()
|
debug.nospace()
|
||||||
|
<< " cust_id: " << customer.cust_id << "\n"
|
||||||
<< " cust_type: " << "CustomerType::ADULT" << "\n"
|
<< " cust_type: " << "CustomerType::ADULT" << "\n"
|
||||||
<< "cust_label: " << customer.cust_label << "\n";
|
<< "cust_label: " << customer.cust_label << "\n";
|
||||||
break;
|
break;
|
||||||
case ATBCustomer::CustomerType::CHILD:
|
case ATBCustomer::CustomerType::CHILD:
|
||||||
debug.nospace()
|
debug.nospace()
|
||||||
|
<< " cust_id: " << customer.cust_id << "\n"
|
||||||
<< " cust_type: " << "CustomerType::CHILD" << "\n"
|
<< " cust_type: " << "CustomerType::CHILD" << "\n"
|
||||||
<< "cust_label: " << customer.cust_label << "\n";
|
<< "cust_label: " << customer.cust_label << "\n";
|
||||||
break;
|
break;
|
||||||
case ATBCustomer::CustomerType::TEEN:
|
case ATBCustomer::CustomerType::TEEN:
|
||||||
debug.nospace()
|
debug.nospace()
|
||||||
|
<< " cust_id: " << customer.cust_id << "\n"
|
||||||
<< " cust_type: " << "CustomerType::TEEN" << "\n"
|
<< " cust_type: " << "CustomerType::TEEN" << "\n"
|
||||||
<< "cust_label: " << customer.cust_label << "\n";
|
<< "cust_label: " << customer.cust_label << "\n";
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user