Lucene++ - a full-featured, c++ search engine
API Documentation

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL > Class Template Reference

Utility template class to handle weak keyed maps. More...

`#include <HashMap.h>`

Inheritance diagram for Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >:

## Public Types

typedef WeakHashMap< KEY, VALUE, HASH, EQUAL > | this_type
typedef std::pair< KEY, VALUE > | key_value
typedef boost::unordered_map< KEY, VALUE, HASH, EQUAL > | map_type
typedef map_type::iterator | iterator
Public Types inherited from Lucene::HashMap< KEY, VALUE, HASH, EQUAL >
typedef HashMap< KEY, VALUE, HASH, EQUAL > | this_type
typedef std::pair< KEY, VALUE > | key_value
typedef boost::unordered_map< KEY, VALUE, HASH, EQUAL > | map_type
typedef map_type::iterator | iterator
typedef map_type::const_iterator | const_iterator
typedef KEY | key_type
typedef VALUE | value_type

## Public Member Functions

void | removeWeak ()
VALUE | get (const KEY &key)
Public Member Functions inherited from Lucene::HashMap< KEY, VALUE, HASH, EQUAL >
virtual | ~HashMap ()
void | reset ()
int32_t | size () const
bool | empty () const
void | clear ()
iterator | begin ()
iterator | end ()
const_iterator | begin () const
const_iterator | end () const
| operator bool () const
bool | operator! () const
map_type & | operator= (const map_type &other)
void | put (const KEY &key, const VALUE &value)
template<class ITER>
void | putAll (ITER first, ITER last)
template<class ITER>
void | remove (ITER pos)
template<class ITER>
ITER | remove (ITER first, ITER last)
bool | remove (const KEY &key)
iterator | find (const KEY &key)
VALUE | get (const KEY &key) const
bool | contains (const KEY &key) const
VALUE & | operator[] (const KEY &key)
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock.
virtual LuceneSignalPtr | getSignal ()
| Return this object signal.
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout.
virtual void | unlock ()
| Unlock this object.
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread.
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout.
virtual void | notifyAll ()
| Notify all threads waiting for signal.

## Static Public Member Functions

static this_type | newInstance ()
Static Public Member Functions inherited from Lucene::HashMap< KEY, VALUE, HASH, EQUAL >
static this_type | newInstance ()

## Additional Inherited Members

Protected Attributes inherited from Lucene::HashMap< KEY, VALUE, HASH, EQUAL >
boost::shared_ptr< map_type > | mapContainer
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>
class Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >

Utility template class to handle weak keyed maps.

## Member Typedef Documentation

## ◆ iterator

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

typedef map_type::iterator Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::iterator

## ◆ key_value

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

typedef std::pair<KEY, VALUE> Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::key_value

## ◆ map_type

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

typedef boost::unordered_map<KEY, VALUE, HASH, EQUAL> Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::map_type

## ◆ this_type

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

typedef WeakHashMap<KEY, VALUE, HASH, EQUAL> Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::this_type

## Member Function Documentation

## ◆ get()

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

VALUE Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::get | ( | const KEY & | key | ) |

inline

## ◆ newInstance()

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

this_type Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::newInstance | ( |  | ) |

inline static

## ◆ removeWeak()

template<class KEY, class VALUE, class HASH = boost::hash<KEY>, class EQUAL = std::equal_to<KEY>>

void Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::removeWeak | ( |  | ) |

inline

Referenced by get().

The documentation for this class was generated from the following file:

- HashMap.h

clucene.sourceforge.net