10 #include <boost/unordered_map.hpp>
16 template <
class KEY,
class VALUE,
class HASH = boost::hash<KEY>,
class EQUAL = std::equal_to<KEY> >
22 typedef boost::unordered_map< KEY, VALUE, HASH, EQUAL, LuceneAllocator<key_value> >
map_type;
99 void put(
const KEY& key,
const VALUE& value)
101 (*mapContainer)[key] = value;
104 template <
class ITER>
107 for (
iterator current = first; current != last; ++current)
111 template <
class ITER>
112 void remove(ITER pos)
117 template <
class ITER>
118 ITER
remove(ITER first, ITER last)
123 bool remove(
const KEY& key)
133 VALUE
get(
const KEY& key)
const
136 return findValue ==
mapContainer->end() ? VALUE() : findValue->second;
151 template <
class KEY,
class VALUE,
class HASH = boost::hash<KEY>,
class EQUAL = std::equal_to<KEY> >
157 typedef typename boost::unordered_map< KEY, VALUE, HASH, EQUAL, LuceneAllocator<key_value> >
map_type;
163 instance.
mapContainer = Lucene::newInstance<map_type>();
174 if (!key->first.expired())
175 clearCopy.insert(*key);
180 VALUE
get(
const KEY& key)
184 return findValue->second;