22 #ifndef USSHRINKABLEMAP_H
23 #define USSHRINKABLEMAP_H
37 template<
class Key,
class T>
41 static std::map<Key,T> emptyContainer;
46 typedef typename container_type::iterator
iterator;
48 typedef typename container_type::size_type
size_type;
49 typedef typename container_type::key_type
key_type;
52 typedef typename container_type::reference
reference;
56 : container(emptyContainer)
62 return container.begin();
67 return container.begin();
72 return container.end();
77 return container.end();
82 return container.erase(pos);
87 return container.erase(first, last);
92 return container.erase(key);
97 return container.empty();
107 return container.size();
112 return container.max_size();
117 return container[key];
122 return container.count(key);
127 return container.find(key);
132 return container.find(key);
137 return container.equal_range(key);
140 std::pair<const_iterator,const_iterator>
equal_range(
const Key& key)
const
142 return container.equal_range(key);
147 return container.lower_bound(key);
152 return container.lower_bound(key);
157 return container.upper_bound(key);
162 return container.upper_bound(key);
167 friend class ServiceHooks;
170 : container(container)
173 container_type& container;
176 template<
class Key,
class T>
177 std::map<Key,T> ShrinkableMap<Key,T>::emptyContainer;
181 #endif // USSHRINKABLEMAP_H