#include <item.h>
Public Member Functions | |
virtual | ~xml_node_rss_item () |
xml_node_rss_item (rss_item *the_item, xml_text_reader_by_node &reader, output::pointer out) | |
xml_node_rss_item (const xml_node_rss_item &) | |
virtual void | element_begin (const nstring &name) |
virtual void | element_end (const nstring &name) |
int | num_items () const |
Private Member Functions | |
xml_node_rss_item () | |
xml_node_rss_item & | operator= (const xml_node_rss_item &) |
Private Attributes | |
rss_item * | new_item |
int | num_items_found |
Instantiating an object of this type will register itself with the xml_text_reader_by_node object (specified in the constructor) as the handler for the item element (not item sub-elements).
This class counts items as they are encounted in an RSS feed file. If no new item (to be added to the RSS feed) is specified, then that is all this class does. If a new item is specified, that new item will be added to the feed before any existing items.
This class can thus be used for two purposes -- for counting items and for adding a new item. If it is used to add a new item and no existing items are found in the feed, that new item will not be added.
Definition at line 46 of file item.h.
virtual xml_node_rss_item::~xml_node_rss_item | ( | ) | [virtual] |
The destructor.
xml_node_rss_item::xml_node_rss_item | ( | rss_item * | the_item, | |
xml_text_reader_by_node & | reader, | |||
output::pointer | out | |||
) |
Constructor.
the_item | The item to the added. Can be null (see above). | |
reader | The xml_text_reader using this object. | |
out | The output destination to write to. |
xml_node_rss_item::xml_node_rss_item | ( | const xml_node_rss_item & | ) |
The copy constructor.
xml_node_rss_item::xml_node_rss_item | ( | ) | [private] |
The default constructor. Don't use.
virtual void xml_node_rss_item::element_begin | ( | const nstring & | name | ) | [virtual] |
Handle element beginings.
Reimplemented from xml_node_rss.
virtual void xml_node_rss_item::element_end | ( | const nstring & | name | ) | [virtual] |
Handle element endings.
Reimplemented from xml_node_rss.
int xml_node_rss_item::num_items | ( | ) | const |
Get the number of item elements encountered.
xml_node_rss_item& xml_node_rss_item::operator= | ( | const xml_node_rss_item & | ) | [private] |
The assignment operator. Don't use.
rss_item* xml_node_rss_item::new_item [private] |
int xml_node_rss_item::num_items_found [private] |