Lucene++ - a full-featured, c++ search engine
API Documentation
Utility template class to handle collections that can be safely copied and shared. More...
#include <Collection.h>
Public Types | |
typedef Collection< TYPE > | this_type |
typedef boost::shared_ptr< this_type > | shared_ptr |
typedef std::vector< TYPE > | collection_type |
typedef collection_type::iterator | iterator |
typedef collection_type::const_iterator | const_iterator |
typedef TYPE | value_type |
Public Member Functions | |
virtual | ~Collection () |
void | reset () |
void | resize (int32_t size) |
int32_t | size () const |
bool | empty () const |
void | clear () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | add (const TYPE &type) |
void | add (int32_t pos, const TYPE &type) |
template<class ITER > | |
void | addAll (ITER first, ITER last) |
template<class ITER > | |
void | insert (ITER pos, const TYPE &type) |
template<class ITER > | |
ITER | remove (ITER pos) |
template<class ITER > | |
ITER | remove (ITER first, ITER last) |
void | remove (const TYPE &type) |
template<class PRED > | |
void | remove_if (PRED comp) |
TYPE | removeFirst () |
TYPE | removeLast () |
iterator | find (const TYPE &type) |
template<class PRED > | |
iterator | find_if (PRED comp) |
bool | contains (const TYPE &type) const |
template<class PRED > | |
bool | contains_if (PRED comp) const |
bool | equals (const this_type &other) const |
template<class PRED > | |
bool | equals (const this_type &other, PRED comp) const |
int32_t | hashCode () |
void | swap (this_type &other) |
TYPE & | operator[] (int32_t pos) |
const TYPE & | operator[] (int32_t pos) const |
operator bool () const | |
bool | operator! () const |
bool | operator== (const this_type &other) |
bool | operator!= (const this_type &other) |
![]() | |
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 (int32_t size=0) |
template<class ITER > | |
static this_type | newInstance (ITER first, ITER last) |
Protected Attributes | |
boost::shared_ptr< collection_type > | container |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Utility template class to handle collections that can be safely copied and shared.
typedef collection_type::const_iterator Lucene::Collection< TYPE >::const_iterator |
typedef collection_type::iterator Lucene::Collection< TYPE >::iterator |
typedef Collection<TYPE> Lucene::Collection< TYPE >::this_type |
|
inlinevirtual |
References Lucene::Collection< TYPE >::container.
Referenced by Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), Lucene::newCollection(), and Lucene::newCollection().
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::equals().
Referenced by Lucene::Collection< TYPE >::equals().
References Lucene::Collection< TYPE >::container.
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
References Lucene::Collection< TYPE >::container.
|
inlinestatic |
References Lucene::Collection< TYPE >::size().
Referenced by Lucene::newCollection(), and Lucene::NumericComparator< TYPE >::NumericComparator().
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::container.
|
inline |
References Lucene::Collection< TYPE >::resize().
References Lucene::Collection< TYPE >::container, and Lucene::Collection< TYPE >::size().
Referenced by Lucene::Collection< TYPE >::reset().
|
inline |
References Lucene::Collection< TYPE >::container.
Referenced by Lucene::Collection< TYPE >::newInstance(), and Lucene::Collection< TYPE >::resize().
References Lucene::Collection< TYPE >::container.
|
protected |
Referenced by Lucene::Collection< TYPE >::add(), Lucene::Collection< TYPE >::add(), Lucene::Collection< TYPE >::addAll(), Lucene::Collection< TYPE >::begin(), Lucene::Collection< TYPE >::begin(), Lucene::Collection< TYPE >::clear(), Lucene::Collection< TYPE >::contains(), Lucene::Collection< TYPE >::contains_if(), Lucene::Collection< TYPE >::empty(), Lucene::Collection< TYPE >::end(), Lucene::Collection< TYPE >::end(), Lucene::Collection< TYPE >::equals(), Lucene::Collection< TYPE >::find(), Lucene::Collection< TYPE >::find_if(), Lucene::Collection< TYPE >::hashCode(), Lucene::Collection< TYPE >::insert(), Lucene::Collection< TYPE >::operator bool(), Lucene::Collection< TYPE >::operator!(), Lucene::Collection< TYPE >::operator!=(), Lucene::Collection< TYPE >::operator==(), Lucene::Collection< TYPE >::operator[](), Lucene::Collection< TYPE >::operator[](), Lucene::Collection< TYPE >::remove(), Lucene::Collection< TYPE >::remove(), Lucene::Collection< TYPE >::remove(), Lucene::Collection< TYPE >::remove_if(), Lucene::Collection< TYPE >::removeFirst(), Lucene::Collection< TYPE >::removeLast(), Lucene::Collection< TYPE >::resize(), Lucene::Collection< TYPE >::size(), and Lucene::Collection< TYPE >::swap().