MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / deliverBox

Method deliverBox

Exercises/Modules/Chapter 19/Soln19_05/DeliveryTruck.cpp:7–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5{}
6
7void 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
16void DeliveryTruck::registerOnDelivered(Callback callback)
17{

Callers 1

mainFunction · 0.45

Calls 1

removeBoxMethod · 0.45

Tested by

no test coverage detected