Lazy RSS
item.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <sstream>
5 
9 namespace item {
10 class Item {
11  public:
13  Item() noexcept(true);
15  Item(const std::string &title,
16  const std::string &category,
17  const std::string &link,
18  const std::string &guid,
19  const std::string &desc) noexcept(true);
20 
22  const std::string& title() const;
28  Item& set_title(const std::string& title);
29 
31  const std::string& category() const;
37  Item& set_category(const std::string& category);
38 
40  const std::string& link() const;
46  Item& set_link(const std::string& link);
47 
49  const std::string& guid() const;
55  Item& set_guid(const std::string& guid);
56 
58  const std::string& desc() const;
64  Item& set_desc(const std::string& desc);
65 
69  void reset();
70 
76  explicit operator std::string() const;
77 
84  operator bool() const;
85 
89  operator !() const;
90 
91  private:
92  std::string _title;
93  std::string _category;
94  std::string _link;
95  std::string _guid;
96  std::string _desc;
97 };
98 
99 }
Definition: item.hpp:10
Item & set_desc(const std::string &desc)
Sets new value to RSS Item description.
Definition: item.cpp:58
const std::string & title() const
Definition: item.cpp:23
Item & set_link(const std::string &link)
Sets new value to RSS Item link.
Definition: item.cpp:42
const std::string & guid() const
Definition: item.cpp:47
operator!() const
Definition: item.cpp:88
RSS Item module.
Definition: item.hpp:9
Item & set_title(const std::string &title)
Sets new value to RSS Item title.
Definition: item.cpp:26
const std::string & link() const
Definition: item.cpp:39
Item & set_guid(const std::string &guid)
Sets new value to RSS Item guid.
Definition: item.cpp:50
const std::string & category() const
Definition: item.cpp:31
Item() noexcept(true)
Default constructor for empty Item.
Definition: item.cpp:5
const std::string & desc() const
Definition: item.cpp:55
void reset()
Unsets all attributes of RSS Item.
Definition: item.cpp:63
Item & set_category(const std::string &category)
Sets new value to RSS Item category.
Definition: item.cpp:34