Lazy RSS
parser.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <functional>
5 
6 #include "item.hpp"
7 
11 namespace parser {
15 typedef std::function<void(const item::Item&)> parser_cb;
22 class Parser {
23  public:
29  explicit Parser(parser_cb &cb) noexcept(true);
35  void parse(const std::string &rss_xml);
36 
37  private:
38  parser_cb _cb;
39 };
40 }
RSS Parser class.
Definition: parser.hpp:22
void parse(const std::string &rss_xml)
Performs parsing of RSS feed.
Definition: parser.cpp:113
std::function< void(const item::Item &)> parser_cb
Parser callback type.
Definition: parser.hpp:15
Parser(parser_cb &cb) noexcept(true)
Constructor.
Definition: parser.cpp:106
RSS Parser module.
Definition: parser.hpp:11