* Returns the total quantity of the items in the container. * @return Total item quantity. */
| 124 | * @return Total item quantity. |
| 125 | */ |
| 126 | int ItemContainer::getTotalQuantity() const |
| 127 | { |
| 128 | int total = 0; |
| 129 | for (std::map<std::string, int>::const_iterator i = _qty.begin(); i != _qty.end(); ++i) |
| 130 | { |
| 131 | total += i->second; |
| 132 | } |
| 133 | return total; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Returns the total size of the items in the container. |