| 92 | } |
| 93 | |
| 94 | SharedBox Truckload::Iterator::getNextBox() |
| 95 | { |
| 96 | if (!m_current) // If there's no current... |
| 97 | return getFirstBox(); // ...return the 1st Box |
| 98 | |
| 99 | m_current = m_current->m_next; // Move to the next package |
| 100 | |
| 101 | return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 102 | } |
| 103 | |
| 104 | SharedBox Truckload::Iterator::getPreviousBox() |
| 105 | { |