| 54 | } |
| 55 | |
| 56 | SharedBox Truckload::getNextBox() |
| 57 | { |
| 58 | if (!m_current) // If there's no current... |
| 59 | return getFirstBox(); // ...return the 1st Box |
| 60 | |
| 61 | m_current = m_current->getNext(); // Move to the next package |
| 62 | |
| 63 | return m_current? m_current->getBox() : nullptr; // Return its box (or nullptr...). |
| 64 | } |
| 65 | |
| 66 | void Truckload::addBox(SharedBox box) |
| 67 | { |