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

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::HashMap< KEY, VALUE, HASH, EQUAL > Class Template Reference

Utility template class to handle hash maps that can be safely copied and shared. More...

`#include <HashMap.h>`

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

## Public Types

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

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. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

static this_type | newInstance ()

## Protected Attributes

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::HashMap< KEY, VALUE, HASH, EQUAL >

Utility template class to handle hash maps that can be safely copied and shared.

## Member Typedef Documentation

## ◆ const_iterator

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

typedef map_type::const_iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::const_iterator

## ◆ iterator

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

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

## ◆ key_type

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

typedef KEY Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::key_type

## ◆ key_value

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

typedef std::pair<KEY, VALUE> Lucene::HashMap< 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::HashMap< 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 HashMap<KEY, VALUE, HASH, EQUAL> Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::this_type

## ◆ value_type

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

typedef VALUE Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::value_type

## Constructor & Destructor Documentation

## ◆ ~HashMap()

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

virtual Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::~HashMap | ( |  | ) |

inline virtual

## Member Function Documentation

## ◆ begin() [1/2]

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

iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::begin | ( |  | ) |

inline

## ◆ begin() [2/2]

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

const_iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::begin | ( |  | ) | const

inline

## ◆ clear()

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

void Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::clear | ( |  | ) |

inline

## ◆ contains()

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

bool Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::contains | ( | const KEY & | key | ) | const

inline

## ◆ empty()

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

bool Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::empty | ( |  | ) | const

inline

## ◆ end() [1/2]

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

iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::end | ( |  | ) |

inline

Referenced by Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::put(), and Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::putAll().

## ◆ end() [2/2]

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

const_iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::end | ( |  | ) | const

inline

## ◆ find()

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

iterator Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::find | ( | const KEY & | key | ) |

inline

Referenced by Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::put(), and Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::putAll().

## ◆ get()

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

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

inline

## ◆ newInstance()

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

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

inline static

## ◆ operator bool()

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

Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::operator bool | ( |  | ) | const

inline

## ◆ operator!()

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

bool Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::operator! | ( |  | ) | const

inline

## ◆ operator=()

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

map_type& Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::operator= | ( | const map_type & | other | ) |

inline

## ◆ operator[]()

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

VALUE& Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::operator[] | ( | const KEY & | key | ) |

inline

## ◆ put()

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

void Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::put | ( | const KEY & | key,
|  | const VALUE & | value
| ) |  |

inline

Referenced by Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::put(), and Lucene::MapOfSets< MAPKEY, MAPHASH, MAPEQUAL, SETVALUE, SETHASH, SETEQUAL >::putAll().

## ◆ putAll()

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

void Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::putAll | ( | ITER | first,
|  | ITER | last
| ) |  |

inline

## ◆ remove() [1/3]

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

void Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::remove | ( | ITER | pos | ) |

inline

## ◆ remove() [2/3]

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

ITER Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::remove | ( | ITER | first,
|  | ITER | last
| ) |  |

inline

## ◆ remove() [3/3]

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

bool Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::remove | ( | const KEY & | key | ) |

inline

## ◆ reset()

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

void Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::reset | ( |  | ) |

inline

## ◆ size()

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

int32_t Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::size | ( |  | ) | const

inline

## Field Documentation

## ◆ mapContainer

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

boost::shared_ptr<map_type> Lucene::HashMap< KEY, VALUE, HASH, EQUAL >::mapContainer

protected

Referenced by Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::get(), Lucene::HashMap< String, DateTools::Resolution >::newInstance(), Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::newInstance(), Lucene::HashMap< String, DateTools::Resolution >::operator!(), and Lucene::WeakHashMap< KEY, VALUE, HASH, EQUAL >::removeWeak().

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

- HashMap.h

clucene.sourceforge.net