Manages a document map. More...
#include <documentlist.hpp>
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. |
Manages a document map.
DocumentList::DocumentList | ( | ) |
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.
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.