|
/*
Project : RSS Reader plugin for Internet Explorer
File Name : RRPRssParser.h
Date :
Purpose : It is the parser for the rss file.
Note :
Send comments
or Bugs to : prafulla_t@users.sourceforge.net
*/
#pragma once
#include "tinyxml.h"
#include "stdafx.h"
#include <vector>
#include "RRPRssItemIterator.h"
class RRPRssParser : public RRPRssItemIterator {
public:
RRPRssParser(const char *nameOfFile);
~RRPRssParser(void);
BOOL isError();
const char* getErrorString();
void parse();
//Even though we have defined Iterator we need this function
//To paint menu items correctly
//Gets RSSItem at the specified position
RRPRssItem *getRssItem(int index) {
return rssItemVector[index];
}
//Returns how many RssItems are there
int getVectorSize() {
return rssItemVector.size();
}
RRPRssItemIterator* getItemIterator() {
index = -1;
return dynamic_cast<RRPRssItemIterator*>(this);
};
//Abstract methods from class RRPRssItemIterator
virtual BOOL hasNext();
virtual RRPRssItem* getItem();
private:
TiXmlDocument *doc;
char *fileName;
BOOL errorCode;
std::vector<RRPRssItem *> rssItemVector;
//Index for iteration,at a time only one iteration is possible!
unsigned int index ;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Quote : "Life is all about solving problems and enjoying their solutions !! "