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

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::HashSet< TYPE, HASH, EQUAL > Class Template Reference

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

`#include <HashSet.h>`

Inheritance diagram for Lucene::HashSet< TYPE, HASH, EQUAL >:

## Public Types

typedef HashSet< TYPE, HASH, EQUAL > | this_type
typedef boost::unordered_set< TYPE, HASH, EQUAL > | set_type
typedef set_type::iterator | iterator
typedef set_type::const_iterator | const_iterator
typedef TYPE | value_type

## Public Member Functions

virtual | ~HashSet ()
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
set_type & | operator= (const set_type &other)
bool | add (const TYPE &type)
template<class ITER >
void | addAll (ITER first, ITER last)
bool | remove (const TYPE &type)
iterator | find (const TYPE &type)
bool | contains (const TYPE &type) const
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 ()
template<class ITER >
static this_type | newInstance (ITER first, ITER last)

## Protected Attributes

boost::shared_ptr< set_type > | setContainer
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

### template<class TYPE, class HASH = boost::hash<TYPE>, class EQUAL = std::equal_to<TYPE>>
class Lucene::HashSet< TYPE, HASH, EQUAL >

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

## Member Typedef Documentation

## ◆ const_iterator

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

typedef set_type::const_iterator Lucene::HashSet< TYPE, HASH, EQUAL >::const_iterator

## ◆ iterator

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

typedef set_type::iterator Lucene::HashSet< TYPE, HASH, EQUAL >::iterator

## ◆ set_type

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

typedef boost::unordered_set<TYPE, HASH, EQUAL> Lucene::HashSet< TYPE, HASH, EQUAL >::set_type

## ◆ this_type

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

typedef HashSet<TYPE, HASH, EQUAL> Lucene::HashSet< TYPE, HASH, EQUAL >::this_type

## ◆ value_type

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

typedef TYPE Lucene::HashSet< TYPE, HASH, EQUAL >::value_type

## Constructor & Destructor Documentation

## ◆ ~HashSet()

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

virtual Lucene::HashSet< TYPE, HASH, EQUAL >::~HashSet | ( |  | ) |

inline virtual

## Member Function Documentation

## ◆ add()

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

bool Lucene::HashSet< TYPE, HASH, EQUAL >::add | ( | const TYPE & | type | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

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

## ◆ addAll()

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

void Lucene::HashSet< TYPE, HASH, EQUAL >::addAll | ( | ITER | first,
|  | ITER | last
| ) |  |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ begin() [1/2]

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

iterator Lucene::HashSet< TYPE, HASH, EQUAL >::begin | ( |  | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

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

## ◆ begin() [2/2]

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

const_iterator Lucene::HashSet< TYPE, HASH, EQUAL >::begin | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ clear()

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

void Lucene::HashSet< TYPE, HASH, EQUAL >::clear | ( |  | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ contains()

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

bool Lucene::HashSet< TYPE, HASH, EQUAL >::contains | ( | const TYPE & | type | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ empty()

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

bool Lucene::HashSet< TYPE, HASH, EQUAL >::empty | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ end() [1/2]

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

iterator Lucene::HashSet< TYPE, HASH, EQUAL >::end | ( |  | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

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

## ◆ end() [2/2]

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

const_iterator Lucene::HashSet< TYPE, HASH, EQUAL >::end | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ find()

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

iterator Lucene::HashSet< TYPE, HASH, EQUAL >::find | ( | const TYPE & | type | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ newInstance() [1/2]

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

static this_type Lucene::HashSet< TYPE, HASH, EQUAL >::newInstance | ( |  | ) |

inline static

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

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

## ◆ newInstance() [2/2]

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

static this_type Lucene::HashSet< TYPE, HASH, EQUAL >::newInstance | ( | ITER | first,
|  | ITER | last
| ) |  |

inline static

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ operator bool()

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

Lucene::HashSet< TYPE, HASH, EQUAL >::operator bool | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ operator!()

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

bool Lucene::HashSet< TYPE, HASH, EQUAL >::operator! | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ operator=()

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

set_type& Lucene::HashSet< TYPE, HASH, EQUAL >::operator= | ( | const set_type & | other | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ remove()

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

bool Lucene::HashSet< TYPE, HASH, EQUAL >::remove | ( | const TYPE & | type | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ reset()

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

void Lucene::HashSet< TYPE, HASH, EQUAL >::reset | ( |  | ) |

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

## ◆ size()

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

int32_t Lucene::HashSet< TYPE, HASH, EQUAL >::size | ( |  | ) | const

inline

References Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer.

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

## Field Documentation

## ◆ setContainer

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

boost::shared_ptr<set_type> Lucene::HashSet< TYPE, HASH, EQUAL >::setContainer

protected

Referenced by Lucene::HashSet< TYPE, HASH, EQUAL >::add(), Lucene::HashSet< TYPE, HASH, EQUAL >::addAll(), Lucene::HashSet< TYPE, HASH, EQUAL >::begin(), Lucene::HashSet< TYPE, HASH, EQUAL >::clear(), Lucene::HashSet< TYPE, HASH, EQUAL >::contains(), Lucene::HashSet< TYPE, HASH, EQUAL >::empty(), Lucene::HashSet< TYPE, HASH, EQUAL >::end(), Lucene::HashSet< TYPE, HASH, EQUAL >::find(), Lucene::HashSet< TYPE, HASH, EQUAL >::newInstance(), Lucene::HashSet< TYPE, HASH, EQUAL >::operator bool(), Lucene::HashSet< TYPE, HASH, EQUAL >::operator!(), Lucene::HashSet< TYPE, HASH, EQUAL >::operator=(), Lucene::HashSet< TYPE, HASH, EQUAL >::remove(), Lucene::HashSet< TYPE, HASH, EQUAL >::reset(), and Lucene::HashSet< TYPE, HASH, EQUAL >::size().

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

- HashSet.h

clucene.sourceforge.net