2014-06-14 17:02:50 +00:00
|
|
|
#ifndef PAGE_H
|
|
|
|
#define PAGE_H
|
|
|
|
|
2014-06-15 16:35:37 +00:00
|
|
|
/* This Code Made By Sagi Dayan
|
|
|
|
* SagiDayan@gmail.com
|
|
|
|
*
|
|
|
|
* Minor changes has been made by Liran Ben Gida
|
|
|
|
* LiranBG@gmail.com
|
|
|
|
*/
|
|
|
|
|
2014-06-14 17:02:50 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Page
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
~Page() {}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Page(std::string& html);
|
|
|
|
std::string getString();
|
|
|
|
std::string getTitle();
|
|
|
|
void makeText(std::string& html);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
int findTitle(std::string& from, int index);
|
|
|
|
int runToActualText(std::string& from, int index);
|
|
|
|
void manageTableContent(std::string& html, int index);
|
|
|
|
int stitchText(std::string& from, std::string& to, int index);
|
|
|
|
bool endOfString(int index, int length);
|
|
|
|
|
|
|
|
std::string text;
|
|
|
|
std::string title;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-06-15 16:35:37 +00:00
|
|
|
#endif
|