Merge branch 'PARSER'
This commit is contained in:
commit
3a10207bf5
17 changed files with 103 additions and 79 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,11 +1,2 @@
|
|||
#For codeblocks project:
|
||||
/*.depend
|
||||
/*.layout
|
||||
/*.cbp
|
||||
/*.cbTemp
|
||||
/bin
|
||||
/obj
|
||||
/Doxyfile
|
||||
/Doxygen
|
||||
*.untracked
|
||||
|
||||
#I have an Untraked folder
|
||||
Untracked
|
||||
|
|
68
main.cpp
68
main.cpp
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
* @file main.cpp
|
||||
* @brief Entry point
|
||||
* @author manzerbredes
|
||||
* @version Prototype
|
||||
* @date 8 Mars 2015
|
||||
*
|
||||
* Entry point of the application.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
//----- std -----
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
//----- class -----
|
||||
#include "FileManIOFile.hpp"
|
||||
#include "FileManParser.hpp"
|
||||
#include "Website.hpp"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @fn int main(int argc, char *argv[])
|
||||
* @author manzerbredes
|
||||
* @brief main function
|
||||
* @param argc contain *argv[] length
|
||||
* @param *argv[] contain the arguments list
|
||||
* @return Return code, an int.
|
||||
*/
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
//TEST PARSER FAKE ARGUMENT
|
||||
FileManParser xmlParser("");
|
||||
|
||||
std::vector<Website> *siteWeb=xmlParser.getWebsites();
|
||||
|
||||
siteWeb->erase(siteWeb->begin()+1);
|
||||
|
||||
xmlParser.updateParser();
|
||||
|
||||
|
||||
//Save modification in file
|
||||
|
||||
FileManIOFile save("Doxygen/bob.bin");
|
||||
|
||||
save.write("loic", xmlParser.getDocument());
|
||||
|
||||
//Print
|
||||
std::cout << xmlParser.getDocument();
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
21
src/Readme.md
Normal file
21
src/Readme.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
Class organisation
|
||||
=====
|
||||
|
||||
##CryptClass
|
||||
> Contain all crypting algorithm, and use
|
||||
**crypto++** library.
|
||||
|
||||
##IOFileClass
|
||||
> Contain all class that manage IO in file.
|
||||
*FileManIOFile* class load and save encrypted files, and use
|
||||
class from *CryptClass*.
|
||||
|
||||
##ParserClass
|
||||
> Contain class for parsing data (exemple: parsing a decrypted file from *FileManIOFile*.
|
||||
|
||||
##Coming soon:
|
||||
>GTK+Class to manager GUI.
|
||||
<br /><br />
|
||||
|
||||
PLEASE USE DOXYGEN COMMENTS
|
||||
=====
|
80
src/main.cpp
Normal file
80
src/main.cpp
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* @file main.cpp
|
||||
* @brief Entry point
|
||||
* @author manzerbredes
|
||||
* @version Prototype
|
||||
* @date 8 Mars 2015
|
||||
*
|
||||
* Entry point of the application.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
//----- std -----
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
//----- class -----
|
||||
#include "FileManIOFile.hpp"
|
||||
#include "FileManParser.hpp"
|
||||
#include "Website.hpp"
|
||||
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
/**
|
||||
* @fn int main(int argc, char *argv[])
|
||||
* @author manzerbredes
|
||||
* @brief main function
|
||||
* @param argc contain *argv[] length
|
||||
* @param *argv[] contain the arguments list
|
||||
* @return Return code, an int.
|
||||
*/
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
/* Initialisation de GTK+ */
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
|
||||
GtkWidget* MainWindow=NULL;
|
||||
|
||||
MainWindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
g_signal_connect(G_OBJECT(MainWindow), "delete-event", G_CALLBACK(gtk_main_quit), NULL);
|
||||
|
||||
|
||||
GtkWidget* bouton;
|
||||
|
||||
bouton=gtk_button_new_with_label("Hello Bro :");
|
||||
gtk_container_add(GTK_CONTAINER(MainWindow), bouton);
|
||||
|
||||
g_signal_connect(G_OBJECT(bouton), "leave", G_CALLBACK(gtk_main_quit), NULL);
|
||||
|
||||
gtk_window_set_title(GTK_WINDOW(MainWindow), "forgetIt");
|
||||
gtk_window_set_default_size(GTK_WINDOW(MainWindow), 500,500);
|
||||
|
||||
gtk_window_set_position(GTK_WINDOW(MainWindow), GTK_WIN_POS_CENTER);
|
||||
|
||||
|
||||
|
||||
gtk_widget_show_all(MainWindow);
|
||||
|
||||
|
||||
gtk_main();
|
||||
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue