forgetIt/ParserClass/FileManParser.hpp

73 lines
1.1 KiB
C++
Raw Normal View History

2015-03-11 10:52:05 +04:00
/**
* @file FileManParser.hpp
* @brief FileManParser class definitions
* @author manzerbredes
* @date 11 Mars 2015
*
* Contain all definitions of FileManParser class.
*
*/
2015-03-14 18:44:05 +04:00
2015-03-11 16:12:56 +04:00
//----- std -----
#include <iostream>
2015-03-14 18:44:05 +04:00
#include <sstream>
2015-03-11 16:12:56 +04:00
#include <string>
#include <vector>
//----- class -----
#include "Website.hpp"
2015-03-14 18:44:05 +04:00
//----- libxml++ -----
#include <cstdlib>
#include <libxml++/libxml++.h>
2015-03-11 16:12:56 +04:00
2015-03-11 10:52:05 +04:00
class FileManParser{
public:
2015-03-14 18:44:05 +04:00
//Constructor
2015-03-11 16:12:56 +04:00
FileManParser(std::string data);
2015-03-11 10:52:05 +04:00
2015-03-14 18:44:05 +04:00
//Get document in string
std::string getDocument();
//Get container vector pointer:
std::vector<Website>* getWebsites();
2015-03-11 10:52:05 +04:00
2015-03-14 18:44:05 +04:00
//Apply change that have made on container
void updateParser();
2015-03-11 10:52:05 +04:00
private:
2015-03-11 16:12:56 +04:00
2015-03-14 18:44:05 +04:00
//Instaciate all website container
void initWebsites();
//Parser attributes
std::stringstream dataStream;
xmlpp::DomParser parser;
//Document attributes
xmlpp::Document* document;
xmlpp::Node* rootNode;
2015-03-11 16:12:56 +04:00
2015-03-14 18:44:05 +04:00
//Website attributes
xmlpp::Node* websitesNode;
std::vector<Website> *websites;
2015-03-11 16:12:56 +04:00
};