| 155 | } |
| 156 | |
| 157 | template<class MapType> void PrintMap(const MapType &map, std::ostream &os) { |
| 158 | typedef typename MapType::const_iterator const_iterator; |
| 159 | |
| 160 | os << "Map["; |
| 161 | |
| 162 | os << "("; |
| 163 | for (const_iterator i = map.begin(), iend = map.end(); i != iend; ++i) { |
| 164 | if (i != map.begin()) |
| 165 | os << ", "; |
| 166 | |
| 167 | os << "(" << i->first << ", " << i->second << ")"; |
| 168 | } |
| 169 | os << ")"; |
| 170 | |
| 171 | os << "]"; |
| 172 | } |
| 173 | |
| 174 | std::string NamedObjectVector::ToString() const { |
| 175 | std::stringstream ss; |