00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SYNDICATION_PARSERCOLLECTION_H
00024 #define SYNDICATION_PARSERCOLLECTION_H
00025
00026 #include <syndication/specificdocument.h>
00027 #include <syndication/abstractparser.h>
00028 #include <syndication/documentsource.h>
00029 #include <syndication/feed.h>
00030 #include <syndication/global.h>
00031 #include <syndication/mapper.h>
00032
00033 #include <QtCore/QString>
00034
00035 namespace Syndication {
00036
00037
00072 template <class T>
00073 class SYNDICATION_EXPORT ParserCollection
00074 {
00075 public:
00076
00078 virtual ~ParserCollection() {}
00079
00093 virtual boost::shared_ptr<T> parse(const DocumentSource& source,
00094 const QString& formatHint=QString()) = 0;
00095
00096
00103 virtual ErrorCode lastError() const = 0;
00104
00119 virtual bool registerParser(AbstractParser* parser, Mapper<T>* mapper) = 0;
00120
00129 virtual void changeMapper(const QString& format, Mapper<T>* mapper) = 0;
00130
00131 };
00132
00133 }
00134
00135 #endif // SYNDICATION_PARSERCOLLECTION_H