SourceForge.net Logo
Rss::Blocks 0.2
a codeblocks plugin that shows rss feeds

F:/C++/rssblocks/trunk/rsschannel.h

Go to the documentation of this file.
00001 /***************************************************************
00002  * Name:      rsschannel.h
00003  * Purpose:   rsschannel class definition
00004  * Author:    Gabriel Espinoza
00005  * Created:   2011-02-26
00006  * Copyright: Gabriel Espinoza
00007  * License: LGPLv3+
00008  **************************************************************/
00009 #ifndef RSSCHANNEL_H
00010 #define RSSCHANNEL_H
00011 
00012 #include "rssitem.h"
00013 #include <wx/xml/xml.h>
00014 #include <stdexcept>
00015 
00016 namespace virtuosonic {
00017 
00018 //class wxInvalidArg :
00019 //      public std::invalid_argument,public wxException
00020 //      {};
00027 class rsschannel
00028 {
00029         public:
00030                 rsschannel(wxInputStream& rssdoc) throw (std::invalid_argument);
00031                 virtual ~rsschannel();
00032                 //accessors
00034                 rssitemsarray& GetItems() {return items;}
00036                 const wxString& Getdesc() {return m_desc;}
00038                 const wxString& Gettitle() {return m_title;}
00040                 const wxString& Getlink() {return m_link;}
00041         private:
00042                 wxXmlDocument m_doc;
00043                 rssitemsarray items;
00044                 wxString m_title;
00045                 wxString m_desc;
00046                 wxString m_link;
00047                 //this functions are inline only to avoid
00048                 //to much identation
00049                 inline void FindChannel(wxXmlNode* node);
00050                 inline void FindItems(wxXmlNode* node);
00051                 inline void AddItem(wxXmlNode* node);
00052 };
00053 }//namespace virtuosonic
00054 
00055 #endif // RSSCHANNEL_H