| 5 | {} |
| 6 | |
| 7 | void DeliveryTruck::deliverBox(SharedBox box) |
| 8 | { |
| 9 | m_truckload.removeBox(box); |
| 10 | |
| 11 | // Notify all interested parties (aka "observers") that the Box was delivered |
| 12 | for (auto& callback : m_callbacks) |
| 13 | callback(box); |
| 14 | } |
| 15 | |
| 16 | void DeliveryTruck::registerOnDelivered(Callback callback) |
| 17 | { |