Public Member Functions

DocumentList Class Reference
[Global code used by all commands]

Manages a document map. More...

#include <documentlist.hpp>

List of all members.

Public Member Functions

 DocumentList ()
void addDocument (ParserFactory::FileType docType, int sourceId, const QString &uri, const QString &docSeparator=QString())
 Adds a document to the list.
ParserFactory::FileType mostWaitingType () const
 Returns the file type which has the highest total of documents in the list.
int size () const
 Returns document count.
QList< int > sourceIds () const
 Returns the list of the document files id.
DocumentInfo takeDocument (ParserFactory::FileType fileType)
 Removes a document from the list with the given type and returns its info.

Detailed Description

Manages a document map.


Constructor & Destructor Documentation

DocumentList::DocumentList (  ) 

Member Function Documentation

void DocumentList::addDocument ( ParserFactory::FileType  docType,
int  sourceId,
const QString &  uri,
const QString &  docSeparator = QString() 
)

Adds a document to the list.

The function does not prevent from adding a document more than once.

ParserFactory::FileType DocumentList::mostWaitingType (  )  const

Returns the file type which has the highest total of documents in the list.

Exceptions:
Exception if no type can be computed, that means empty list or internal counting error
int DocumentList::size (  )  const

Returns document count.

QList< int > DocumentList::sourceIds (  )  const

Returns the list of the document files id.

DocumentInfo DocumentList::takeDocument ( ParserFactory::FileType  fileType  ) 

Removes a document from the list with the given type and returns its info.

Thread-safe.

Returns:
An empty document-info if nothing can be found for the given file type.
All Classes Functions Variables Typedefs Enumerations Enumerator