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. 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 (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 std::vector<TYPE> Lucene::Collection< TYPE >::collection_type |
typedef collection_type::const_iterator Lucene::Collection< TYPE >::const_iterator |
typedef collection_type::iterator Lucene::Collection< TYPE >::iterator |
typedef boost::shared_ptr<this_type> Lucene::Collection< TYPE >::shared_ptr |
typedef Collection<TYPE> Lucene::Collection< TYPE >::this_type |
typedef TYPE Lucene::Collection< TYPE >::value_type |
|
inlinevirtual |
|
inline |
Referenced by Lucene::newCollection().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by Lucene::Collection< CharArray >::equals().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Referenced by Lucene::newCollection(), and Lucene::NumericComparator< int32_t >::NumericComparator().
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by Lucene::Collection< CharArray >::reset().
|
inline |
|
inline |
|
protected |
Referenced by Lucene::Collection< CharArray >::add(), Lucene::Collection< CharArray >::addAll(), Lucene::Collection< CharArray >::begin(), Lucene::Collection< CharArray >::clear(), Lucene::Collection< CharArray >::contains(), Lucene::Collection< CharArray >::contains_if(), Lucene::Collection< CharArray >::empty(), Lucene::Collection< CharArray >::end(), Lucene::Collection< CharArray >::equals(), Lucene::Collection< CharArray >::find(), Lucene::Collection< CharArray >::find_if(), Lucene::Collection< CharArray >::hashCode(), Lucene::Collection< CharArray >::insert(), Lucene::Collection< CharArray >::newInstance(), Lucene::Collection< CharArray >::operator bool(), Lucene::Collection< CharArray >::operator!(), Lucene::Collection< CharArray >::operator!=(), Lucene::Collection< CharArray >::operator==(), Lucene::Collection< CharArray >::operator[](), Lucene::Collection< CharArray >::remove(), Lucene::Collection< CharArray >::remove_if(), Lucene::Collection< CharArray >::removeFirst(), Lucene::Collection< CharArray >::removeLast(), Lucene::Collection< CharArray >::resize(), Lucene::Collection< CharArray >::size(), and Lucene::Collection< CharArray >::swap().