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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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< 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)
- 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_type
container
- 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

template<class TYPE>
typedef std::vector<TYPE> Lucene::Collection< TYPE >::collection_type
template<class TYPE>
typedef collection_type::const_iterator Lucene::Collection< TYPE >::const_iterator
template<class TYPE>
typedef collection_type::iterator Lucene::Collection< TYPE >::iterator
template<class TYPE>
typedef boost::shared_ptr<this_type> Lucene::Collection< TYPE >::shared_ptr
template<class TYPE>
typedef Collection<TYPE> Lucene::Collection< TYPE >::this_type
template<class TYPE>
typedef TYPE Lucene::Collection< TYPE >::value_type

Constructor & Destructor Documentation

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

Member Function Documentation

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

Referenced by Lucene::newCollection().

template<class TYPE>
void Lucene::Collection< TYPE >::add ( int32_t  pos,
const TYPE &  type 
)
inline
template<class TYPE>
template<class ITER >
void Lucene::Collection< TYPE >::addAll ( ITER  first,
ITER  last 
)
inline
template<class TYPE>
iterator Lucene::Collection< TYPE >::begin ( )
inline
template<class TYPE>
const_iterator Lucene::Collection< TYPE >::begin ( ) const
inline
template<class TYPE>
void Lucene::Collection< TYPE >::clear ( )
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::contains ( const TYPE &  type) const
inline
template<class TYPE>
template<class PRED >
bool Lucene::Collection< TYPE >::contains_if ( PRED  comp) const
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::empty ( ) const
inline
template<class TYPE>
iterator Lucene::Collection< TYPE >::end ( )
inline
template<class TYPE>
const_iterator Lucene::Collection< TYPE >::end ( ) const
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::equals ( const this_type other) const
inline
template<class TYPE>
template<class PRED >
bool Lucene::Collection< TYPE >::equals ( const this_type other,
PRED  comp 
) const
inline
template<class TYPE>
iterator Lucene::Collection< TYPE >::find ( const TYPE &  type)
inline
template<class TYPE>
template<class PRED >
iterator Lucene::Collection< TYPE >::find_if ( PRED  comp)
inline
template<class TYPE>
int32_t Lucene::Collection< TYPE >::hashCode ( )
inline
template<class TYPE>
template<class ITER >
void Lucene::Collection< TYPE >::insert ( ITER  pos,
const TYPE &  type 
)
inline
template<class TYPE>
static this_type Lucene::Collection< TYPE >::newInstance ( int32_t  size = 0)
inlinestatic

Referenced by Lucene::newCollection().

template<class TYPE>
template<class ITER >
static this_type Lucene::Collection< TYPE >::newInstance ( ITER  first,
ITER  last 
)
inlinestatic
template<class TYPE>
Lucene::Collection< TYPE >::operator bool ( ) const
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::operator! ( ) const
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::operator!= ( const this_type other)
inline
template<class TYPE>
bool Lucene::Collection< TYPE >::operator== ( const this_type other)
inline
template<class TYPE>
TYPE& Lucene::Collection< TYPE >::operator[] ( int32_t  pos)
inline
template<class TYPE>
const TYPE& Lucene::Collection< TYPE >::operator[] ( int32_t  pos) const
inline
template<class TYPE>
template<class ITER >
ITER Lucene::Collection< TYPE >::remove ( ITER  pos)
inline
template<class TYPE>
template<class ITER >
ITER Lucene::Collection< TYPE >::remove ( ITER  first,
ITER  last 
)
inline
template<class TYPE>
void Lucene::Collection< TYPE >::remove ( const TYPE &  type)
inline
template<class TYPE>
template<class PRED >
void Lucene::Collection< TYPE >::remove_if ( PRED  comp)
inline
template<class TYPE>
TYPE Lucene::Collection< TYPE >::removeFirst ( )
inline
template<class TYPE>
TYPE Lucene::Collection< TYPE >::removeLast ( )
inline
template<class TYPE>
void Lucene::Collection< TYPE >::reset ( )
inline
template<class TYPE>
void Lucene::Collection< TYPE >::resize ( int32_t  size)
inline
template<class TYPE>
int32_t Lucene::Collection< TYPE >::size ( ) const
inline
template<class TYPE>
void Lucene::Collection< TYPE >::swap ( this_type other)
inline

Field Documentation

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