Commit 54bb59b0 authored by Johnny Jazeix's avatar Johnny Jazeix

Table des matieres en anglais pour le manuel technique.

Debut d'ajout des messages du parser lors de bugues de parsage dans la 
fenetre graphique.
Les messages s'affichent de haut en bas et pas le contraire.
parent 26de62f2
......@@ -117,21 +117,21 @@ void Interface_graphic::load_windows(){
void Interface_graphic::error(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
//_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='red'>"+buf+"</font><br /><br />");
}
void Interface_graphic::warning(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
//_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='orange'>"+buf+"</font><br /><br />");
}
void Interface_graphic::information(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
//_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='green'>"+buf+"</font><br /><br />");
}
......
......@@ -2,13 +2,13 @@
#define PARSER_HPP
#include <string>
#include "../message/message_ns.hpp"
#define WARN_IF(condition, message2) if (condition) \
message << message2 << endw;
#define WARN_IF(condition, message) if (condition) \
std::cerr << message << std::endl;
#define DIE_IF(condition, message) if (condition){ \
std::cerr << message << std::endl; \
#define DIE_IF(condition, message2) if (condition){ \
message << message2 << ende; \
return;}
/*!
......
#include "ParserDefinitionDecoder.hpp"
using namespace std;
using namespace message_ns;
ParserDefinitionDecoder::ParserDefinitionDecoder(){
_state = _OUT_A_DEFINITION;
......@@ -22,7 +23,7 @@ void ParserDefinitionDecoder::enter_definition(Line &line){
DIE_IF(!line.item(3, definition_identity_string), "Error : definition has no identifier");
DIE_IF(sscanf(definition_identity_string.c_str(), "%d", &definition_identity) != 1, "Error : expected identifier for a definition");
Definition current_definition = Definition(definition_name);
_definitions.insert(pair<unsigned int,Definition>(definition_identity, current_definition));
_definitions.insert(pair<unsigned int,Definition>(definition_identity, current_definition));
_current_definition = definition_identity;
WARN_IF((line.length() > 4), "Warning : extra token in %EventDef");
......
......@@ -7,12 +7,13 @@
#include "Definition.hpp"
#include "Line.hpp"
#include "../message/message_ns.hpp"
#define WARN_IF(condition, message) if (condition) \
std::cerr << message << std::endl;
#define WARN_IF(condition, message2) if (condition) \
message << message2 << endw;
#define DIE_IF(condition, message) if (condition){ \
std::cerr << message << std::endl; \
#define DIE_IF(condition, message2) if (condition){ \
message << message2 << ende; \
return;}
/*!
......
#include "ParserEventDecoder.hpp"
using namespace std;
using namespace message_ns;
ParserEventDecoder::ParserEventDecoder(){
}
......@@ -34,7 +35,7 @@ void ParserEventDecoder::store_event(const Definition &definition, Line &line, T
string current_value;
if (!line.item(i, current_value)) {
cerr << "warning : missing values" << endl;
message << "warning : missing values" << endl;
return;
}
......
#include "ParserPaje.hpp"
using namespace std;
using namespace message_ns;
void ParserPaje::parse(string filename, Trace &trace){
......
......@@ -9,6 +9,8 @@
#include "ParserEventDecoder.hpp"
#include "Parser.hpp"
#include "Line.hpp"
#include "../message/message_ns.hpp"
//#ifdef DEBUG_PRINT_TRACE
//#include "../../tests/parser/stub/trace.hpp"
//#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment