Update ParserClass files
This commit is contained in:
parent
2166479d44
commit
41897f295f
7 changed files with 128 additions and 8 deletions
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @file FileManContainer.cpp
|
||||
* @brief FileManContainer class definitions
|
||||
* @author manzerbredes
|
||||
* @date 11 Mars 2015
|
||||
*
|
||||
* Contain all implementation of FileManContainer class.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "FileManContainer.hpp"
|
||||
|
||||
FileManContainer::FileManContainer(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FileManContainer::addWebsite(Website website){
|
||||
this->websites.push_back(website);
|
||||
}
|
||||
|
||||
std::vector<Website> FileManContainer::getWebsites(){
|
||||
return this->websites;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @file FileManContainer.hpp
|
||||
* @brief FileManContainer class definitions
|
||||
* @author manzerbredes
|
||||
* @date 11 Mars 2015
|
||||
*
|
||||
* Contain all definitions of FileManContainer class.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __FileManContainer__
|
||||
#define __FileManContainer__
|
||||
|
||||
//----- std -----
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
//----- class -----
|
||||
#include "Website.hpp"
|
||||
|
||||
|
||||
/**
|
||||
* @class Website Website.hpp "/ParserClass/FileManContainer/Website.hpp"
|
||||
* @brief Class for manager all FileMan container (websites etc...)
|
||||
* @author manzerbredes
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
class FileManContainer{
|
||||
|
||||
public:
|
||||
FileManContainer();
|
||||
|
||||
void addWebsite(Website website);
|
||||
std::vector<Website> getWebsites();
|
||||
|
||||
private:
|
||||
|
||||
std::vector<Website> websites;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -11,6 +11,20 @@
|
|||
|
||||
#include "Website.hpp"
|
||||
|
||||
|
||||
Website::Website(){
|
||||
boost::uuids::uuid uuid = boost::uuids::random_generator()();
|
||||
std::stringstream ss;
|
||||
ss << uuid;
|
||||
this->id=ss.str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
std::string Website::getId(){
|
||||
return this->id;
|
||||
}
|
||||
std::string Website::getTitle(){
|
||||
return this->title;
|
||||
}
|
||||
|
@ -29,6 +43,9 @@ std::string Website::getDescription(){
|
|||
|
||||
|
||||
|
||||
void Website::setId(std::string id){
|
||||
this->id = id;
|
||||
}
|
||||
void Website::setTitle(std::string title){
|
||||
this->title = title;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
*/
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <boost/uuid/uuid.hpp> // uuid class
|
||||
#include <boost/uuid/uuid_generators.hpp> // generators
|
||||
#include <boost/uuid/uuid_io.hpp> // streaming operators etc.
|
||||
|
||||
|
||||
|
||||
|
@ -43,10 +47,13 @@ class Website{
|
|||
|
||||
public:
|
||||
|
||||
Website();
|
||||
|
||||
/**
|
||||
* @brief Containner getters.
|
||||
*/
|
||||
|
||||
std::string getId();
|
||||
std::string getTitle();
|
||||
std::string getUrl();
|
||||
std::string getUsername();
|
||||
|
@ -57,6 +64,7 @@ class Website{
|
|||
/**
|
||||
* @brief Containner setters.
|
||||
*/
|
||||
void setId(std::string title);
|
||||
void setTitle(std::string title);
|
||||
void setUrl(std::string url);
|
||||
void setUsername(std::string username);
|
||||
|
@ -66,7 +74,8 @@ class Website{
|
|||
|
||||
private:
|
||||
|
||||
std::string title; ///< Title en the website
|
||||
std::string id; ///< id of the website
|
||||
std::string title; ///< Title of the website
|
||||
std::string url; ///< Url of the website
|
||||
std::string username; ///< username of the account
|
||||
std::string password; ///< password of the account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue