Factory for the parsers. More...
#include <parserfactory.hpp>
Public Types | |
enum | FileType { Invalid = 0, XML = 1, ODT = 2 } |
File types to parse. More... | |
typedef QHash< FileType, int > | TypeCountMap |
Map for counting each file type total files. | |
Static Public Member Functions | |
static FileType | fileType (const QString &fileName) |
Returns the file type depending on the file extension. | |
static void | initializeTypeCountMap (TypeCountMap &map) |
Initializes the map to zero for each file type. | |
static AbstractParser * | newParser (FileType fileType, IndexingProgress &indexingProgress, DocumentList &documentList, OptionManager &optionManager, GlobalParserDatabase &globalDatabase) |
Returns the parser for the given file type. |
Factory for the parsers.
typedef QHash<FileType, int> ParserFactory::TypeCountMap |
Map for counting each file type total files.
ParserFactory::FileType ParserFactory::fileType | ( | const QString & | fileName | ) | [static] |
Returns the file type depending on the file extension.
void ParserFactory::initializeTypeCountMap | ( | ParserFactory::TypeCountMap & | map | ) | [static] |
Initializes the map to zero for each file type.
AbstractParser * ParserFactory::newParser | ( | ParserFactory::FileType | fileType, | |
IndexingProgress & | indexingProgress, | |||
DocumentList & | documentList, | |||
OptionManager & | optionManager, | |||
GlobalParserDatabase & | globalDatabase | |||
) | [static] |
Returns the parser for the given file type.
Exception | if file type is unknown or has no parser |