pdf::PDFCollection< T > Class Template Reference

#include <pdf_collection.h>

Inheritance diagram for pdf::PDFCollection< T >:
Inheritance graph
[legend]
Collaboration diagram for pdf::PDFCollection< T >:
Collaboration graph
[legend]

Public Member Functions

 PDFCollection ()
virtual ~PDFCollection ()
virtual bool get_first_element (void **data_ptr)
virtual int get_count ()
void add (T t)
void clear ()
get (int num)
front ()
back ()
int size ()

Detailed Description

template<class T>
class pdf::PDFCollection< T >

Definition at line 103 of file pdf_collection.h.


Constructor & Destructor Documentation

template<class T >
pdf::PDFCollection< T >::PDFCollection (  )  [inline]

Definition at line 106 of file pdf_collection.h.

00106 : vect() {}

template<class T >
virtual pdf::PDFCollection< T >::~PDFCollection (  )  [inline, virtual]

Definition at line 107 of file pdf_collection.h.

References pdf::PDFCollection< T >::clear().

00107 {clear();}

Here is the call graph for this function:


Member Function Documentation

template<class T >
void pdf::PDFCollection< T >::add ( t  )  [inline]

Definition at line 124 of file pdf_collection.h.

Referenced by pdf::PDFSearcher::export_search_doc_to_coll(), pdf::PDFSearcher::seach_all(), pdf::PDFPage::search(), and pdf::PDFSearcher::search_next().

00125     {
00126         vect.push_back(t);
00127     }

Here is the caller graph for this function:

template<class T >
T pdf::PDFCollection< T >::back (  )  [inline]

Definition at line 157 of file pdf_collection.h.

References pdf::PDFCollection< T >::size().

00158     {
00159         if (size() > 0)
00160         {
00161             return vect[size()-1];
00162         }
00163         return 0;
00164     }

Here is the call graph for this function:

template<class T >
void pdf::PDFCollection< T >::clear ( void   )  [inline]

Definition at line 129 of file pdf_collection.h.

Referenced by pdf::PDFSearcher::export_search_doc_to_coll(), and pdf::PDFCollection< T >::~PDFCollection().

00130     {
00131         VectIter begin = vect.begin();
00132         VectIter end   = vect.end();
00133         VectIter iter  = begin;
00134         for(; iter != end; ++iter)
00135         {
00136             delete *iter;
00137         }
00138         vect.clear();
00139     }

Here is the caller graph for this function:

template<class T >
T pdf::PDFCollection< T >::front (  )  [inline]

Definition at line 148 of file pdf_collection.h.

References pdf::PDFCollection< T >::size().

00149     {
00150         if (size() > 0)
00151         {
00152             return vect[0];
00153         }
00154         return 0;
00155     }

Here is the call graph for this function:

template<class T >
T pdf::PDFCollection< T >::get ( int  num  )  [inline]

Definition at line 141 of file pdf_collection.h.

Referenced by pdf::PDFSearcher::export_search_doc_to_coll().

00142     {
00143         assert(num >= 0 && num < static_cast<int>(vect.size()));
00144 
00145         return vect[num];
00146     }

Here is the caller graph for this function:

template<class T >
virtual int pdf::PDFCollection< T >::get_count (  )  [inline, virtual]

Implements pdf::PDFCollectionBase.

Definition at line 119 of file pdf_collection.h.

References pdf::PDFCollection< T >::size().

00120     {
00121         return size();
00122     }

Here is the call graph for this function:

template<class T >
virtual bool pdf::PDFCollection< T >::get_first_element ( void **  data_ptr  )  [inline, virtual]

Implements pdf::PDFCollectionBase.

Definition at line 109 of file pdf_collection.h.

References pdf::PDFCollection< T >::size().

00110     {
00111         if (size())
00112         {
00113             *data_ptr = static_cast<void *>(&vect[0]);
00114             return true;
00115         }
00116         return false;
00117     }

Here is the call graph for this function:

template<class T >
int pdf::PDFCollection< T >::size (  )  [inline]

Definition at line 166 of file pdf_collection.h.

Referenced by pdf::PDFCollection< T >::back(), pdf::PDFSearcher::export_search_doc_to_coll(), pdf::PDFCollection< T >::front(), pdf::PDFCollection< T >::get_count(), pdf::PDFCollection< T >::get_first_element(), and pdf::PDFSearcher::seach_all().

00167     {
00168         return static_cast<int>(vect.size());
00169     }

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208