qswiki/parser.h
Albert S 22f39eb8d8 Temporarily switch to boost::regex
In combination with musl, parser crashed. glibc fine. Could not pinpoint
down the exact reason mainly due to time constraints. Strange, in both
cases actually libstdc++ is used, so this is very odd.
2018-11-11 21:37:59 +01:00

21 sor
642 B
C++

#ifndef PARSER_H
#define PARSER_H
#include <boost/regex.hpp>
#include "iparser.h"
class Parser : public IParser
{
private:
std::string processLink(const PageDao &pageDao, UrlProvider &urlProvider, boost::smatch &match) const;
public:
std::string extractCommand(std::string cmdname, std::string content) const ;
std::vector<Headline> extractHeadlines(std::string content) const override ;
std::vector<std::string> extractCategories(std::string content) const override;
std::string parse(const PageDao &pagedao, UrlProvider &provider, std::string content) const override;
using IParser::IParser;
~Parser() { };
};
#endif // PARSER_H