cpp-ElementTree
Python ElementTree-alike XML API for C++
Public Member Functions | List of all members
etree::feed::Item Class Reference

Represent a single feed item. More...

#include <feed.hpp>

Public Member Functions

std::string author () const
 Return the item author name, or the empty string.
 
void author (const std::string &author)
 Set the item author name. More...
 
std::string content () const
 Return the item content, or the empty string.
 
void content (const std::string &s)
 Set the item content. More...
 
std::string guid () const
 Return the item GUID, often this is simply the item URL.
 
void guid (const std::string &s)
 Set the item GUID. More...
 
std::string link () const
 Return the item link URL, or the empty string.
 
void link (const std::string &s)
 Set the item link URL. More...
 
std::string originalGuid () const
 Return the item's GUID as it appeared in the original source feed, or the present GUID if no original GUID is found. More...
 
time_t published () const
 Return the item's published date as a UNIX timestamp.
 
void published (time_t published)
 Set the item's published date as a UNIX timestamp. More...
 
void remove ()
 Remove this item from its parent feed, if any.
 
std::string title () const
 Return the item title.
 
void title (const std::string &s)
 Set the item title. More...
 
enum content_type type () const
 Return the item content's content type.
 
void type (enum content_type)
 Set the item content's content type. More...
 
time_t updated () const
 Return the item's updated date as a UNIX timestamp.
 
void updated (time_t updated)
 Set the item's updated date as a UNIX timestamp. More...
 

Detailed Description

Represent a single feed item.

Use Feed::makeItem() to make an instance.

Member Function Documentation

void etree::feed::Item::author ( const std::string &  author)

Set the item author name.

Parameters
authorNew author name.
void etree::feed::Item::content ( const std::string &  s)

Set the item content.

Parameters
sNew content.
void etree::feed::Item::guid ( const std::string &  s)

Set the item GUID.

Parameters
sNew item GUID.
void etree::feed::Item::link ( const std::string &  s)

Set the item link URL.

Parameters
sNew link.
std::string etree::feed::Item::originalGuid ( ) const

Return the item's GUID as it appeared in the original source feed, or the present GUID if no original GUID is found.

Note
Used to recover GUIDs from the Google Reader API.
void etree::feed::Item::published ( time_t  published)

Set the item's published date as a UNIX timestamp.

Parameters
publishedPublished date.
void etree::feed::Item::title ( const std::string &  s)

Set the item title.

Parameters
sNew title.
void etree::feed::Item::type ( enum  content_type)

Set the item content's content type.

Parameters
content_typeNew content type.
void etree::feed::Item::updated ( time_t  updated)

Set the item's updated date as a UNIX timestamp.

Parameters
updatedupdated date.

The documentation for this class was generated from the following files: