2018-11-03 17:12:20 +01:00
|
|
|
#ifndef IPARSER_H
|
|
|
|
#define IPARSER_H
|
|
|
|
#include <vector>
|
|
|
|
#include <string_view>
|
|
|
|
#include "headline.h"
|
|
|
|
#include "database/pagedao.h"
|
|
|
|
#include "urlprovider.h"
|
2021-04-25 12:06:37 +02:00
|
|
|
|
|
|
|
|
2018-11-03 17:12:20 +01:00
|
|
|
class IParser
|
|
|
|
{
|
|
|
|
public:
|
2018-11-04 19:33:06 +01:00
|
|
|
virtual std::string extractCommand(std::string cmdname, std::string content) const = 0;
|
2018-11-03 17:12:20 +01:00
|
|
|
virtual std::vector<Headline> extractHeadlines(std::string content) const = 0;
|
|
|
|
virtual std::string parse(const PageDao &pagedao, UrlProvider &provider, std::string content) const = 0;
|
|
|
|
virtual std::vector<std::string> extractCategories(std::string content) const = 0;
|
|
|
|
|
|
|
|
virtual ~IParser(){};
|
|
|
|
};
|
|
|
|
|
2021-04-25 12:06:37 +02:00
|
|
|
|
|
|
|
|
2018-11-03 17:12:20 +01:00
|
|
|
#endif // PARSER_H
|