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


Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::Collection< TYPE > Class Template Reference

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

#include <Collection.h>

+ Inheritance diagram for Lucene::Collection< TYPE >:

Public Types

typedef Collection< TYPEthis_type
 
typedef boost::shared_ptr< this_typeshared_ptr
 
typedef std::vector< TYPEcollection_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)
 
TYPEoperator[] (int32_t pos)
 
const TYPEoperator[] (int32_t pos) const
 
 operator bool () const
 
bool operator! () const
 
bool operator== (const this_type &other)
 
bool operator!= (const this_type &other)
 
collection_typeget ()
 
- 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 (int32_t size=0)
 
template<class ITER >
static this_type newInstance (ITER first, ITER last)
 

Protected Attributes

boost::shared_ptr< collection_typecontainer
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Detailed Description

template<class TYPE>
class Lucene::Collection< TYPE >

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

Member Typedef Documentation

◆ collection_type

template<class TYPE >
typedef std::vector<TYPE> Lucene::Collection< TYPE >::collection_type

◆ const_iterator

template<class TYPE >
typedef collection_type::const_iterator Lucene::Collection< TYPE >::const_iterator

◆ iterator

template<class TYPE >
typedef collection_type::iterator Lucene::Collection< TYPE >::iterator

◆ shared_ptr

template<class TYPE >
typedef boost::shared_ptr<this_type> Lucene::Collection< TYPE >::shared_ptr

◆ this_type

◆ value_type

template<class TYPE >
typedef TYPE Lucene::Collection< TYPE >::value_type

Constructor & Destructor Documentation

◆ ~Collection()

template<class TYPE >
virtual Lucene::Collection< TYPE >::~Collection ( )
inlinevirtual

Member Function Documentation

◆ add() [1/2]

template<class TYPE >
void Lucene::Collection< TYPE >::add ( const TYPE type)
inline

◆ add() [2/2]

template<class TYPE >
void Lucene::Collection< TYPE >::add ( int32_t  pos,
const TYPE type 
)
inline

◆ addAll()

template<class TYPE >
template<class ITER >
void Lucene::Collection< TYPE >::addAll ( ITER  first,
ITER  last 
)
inline

◆ begin() [1/2]

template<class TYPE >
iterator Lucene::Collection< TYPE >::begin ( )
inline

◆ begin() [2/2]

template<class TYPE >
const_iterator Lucene::Collection< TYPE >::begin ( ) const
inline

◆ clear()

template<class TYPE >
void Lucene::Collection< TYPE >::clear ( )
inline

◆ contains()

template<class TYPE >
bool Lucene::Collection< TYPE >::contains ( const TYPE type) const
inline

◆ contains_if()

template<class TYPE >
template<class PRED >
bool Lucene::Collection< TYPE >::contains_if ( PRED  comp) const
inline

◆ empty()

template<class TYPE >
bool Lucene::Collection< TYPE >::empty ( ) const
inline

◆ end() [1/2]

template<class TYPE >
iterator Lucene::Collection< TYPE >::end ( )
inline

◆ end() [2/2]

template<class TYPE >
const_iterator Lucene::Collection< TYPE >::end ( ) const
inline

◆ equals() [1/2]

template<class TYPE >
bool Lucene::Collection< TYPE >::equals ( const this_type other) const
inline

◆ equals() [2/2]

template<class TYPE >
template<class PRED >
bool Lucene::Collection< TYPE >::equals ( const this_type other,
PRED  comp 
) const
inline

◆ find()

template<class TYPE >
iterator Lucene::Collection< TYPE >::find ( const TYPE type)
inline

◆ find_if()

template<class TYPE >
template<class PRED >
iterator Lucene::Collection< TYPE >::find_if ( PRED  comp)
inline

◆ get()

template<class TYPE >
collection_type * Lucene::Collection< TYPE >::get ( )
inline

◆ hashCode()

template<class TYPE >
int32_t Lucene::Collection< TYPE >::hashCode ( )
inline

◆ insert()

template<class TYPE >
template<class ITER >
void Lucene::Collection< TYPE >::insert ( ITER  pos,
const TYPE type 
)
inline

◆ newInstance() [1/2]

template<class TYPE >
static this_type Lucene::Collection< TYPE >::newInstance ( int32_t  size = 0)
inlinestatic

◆ newInstance() [2/2]

template<class TYPE >
template<class ITER >
static this_type Lucene::Collection< TYPE >::newInstance ( ITER  first,
ITER  last 
)
inlinestatic

◆ operator bool()

template<class TYPE >
Lucene::Collection< TYPE >::operator bool ( ) const
inline

◆ operator!()

template<class TYPE >
bool Lucene::Collection< TYPE >::operator! ( ) const
inline

◆ operator!=()

template<class TYPE >
bool Lucene::Collection< TYPE >::operator!= ( const this_type other)
inline

◆ operator==()

template<class TYPE >
bool Lucene::Collection< TYPE >::operator== ( const this_type other)
inline

◆ operator[]() [1/2]

template<class TYPE >
TYPE & Lucene::Collection< TYPE >::operator[] ( int32_t  pos)
inline

◆ operator[]() [2/2]

template<class TYPE >
const TYPE & Lucene::Collection< TYPE >::operator[] ( int32_t  pos) const
inline

◆ remove() [1/3]

template<class TYPE >
void Lucene::Collection< TYPE >::remove ( const TYPE type)
inline

◆ remove() [2/3]

template<class TYPE >
template<class ITER >
ITER Lucene::Collection< TYPE >::remove ( ITER  first,
ITER  last 
)
inline

◆ remove() [3/3]

template<class TYPE >
template<class ITER >
ITER Lucene::Collection< TYPE >::remove ( ITER  pos)
inline

◆ remove_if()

template<class TYPE >
template<class PRED >
void Lucene::Collection< TYPE >::remove_if ( PRED  comp)
inline

◆ removeFirst()

template<class TYPE >
TYPE Lucene::Collection< TYPE >::removeFirst ( )
inline

◆ removeLast()

template<class TYPE >
TYPE Lucene::Collection< TYPE >::removeLast ( )
inline

◆ reset()

template<class TYPE >
void Lucene::Collection< TYPE >::reset ( )
inline

◆ resize()

template<class TYPE >
void Lucene::Collection< TYPE >::resize ( int32_t  size)
inline

◆ size()

template<class TYPE >
int32_t Lucene::Collection< TYPE >::size ( ) const
inline

◆ swap()

template<class TYPE >
void Lucene::Collection< TYPE >::swap ( this_type other)
inline

Field Documentation

◆ container

template<class TYPE >
boost::shared_ptr<collection_type> Lucene::Collection< TYPE >::container
protected

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

clucene.sourceforge.net