diff --git a/src/common/Message.cpp b/src/common/Message.cpp index 5f5164cad667402a5480f1d7f62565ab38e44d69..2101265adb7ede1458528b4bacdb3627a5db5bc3 100644 --- a/src/common/Message.cpp +++ b/src/common/Message.cpp @@ -6,13 +6,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -23,7 +23,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-A license and that you accept its terms. ** @@ -37,7 +37,7 @@ ** - MARCOUEILLE Jule ** - NOISETTE Pascal ** - REDONDY Arthur -** - VUCHENER Clément +** - VUCHENER Clément ** */ @@ -119,7 +119,7 @@ Interface *Message::get_interface() { std::ostream &operator<<(std::ostream &out, Message::end_error_t) { Message *message = Message::get_instance(); Interface *interface = Message::get_interface(); - + if (interface) { interface->error(message->str()); message->str(""); // flush the stream @@ -132,7 +132,7 @@ std::ostream &operator<<(std::ostream &out, Message::end_error_t) { std::ostream &operator<<(std::ostream &out, Message::end_warning_t) { Message *message = Message::get_instance(); Interface *interface = Message::get_interface(); - + if (interface) { interface->warning(message->str()); message->str(""); // flush the stream @@ -145,7 +145,7 @@ std::ostream &operator<<(std::ostream &out, Message::end_warning_t) { std::ostream &operator<<(std::ostream &out, Message::end_information_t) { Message *message = Message::get_instance(); Interface *interface = Message::get_interface(); - + if (interface) { interface->information(message->str()); message->str(""); // flush the stream @@ -159,7 +159,7 @@ std::ostream &operator<<(std::ostream &out, Message::end_information_t) { std::ostream &operator<<(std::ostream &out, Message::end_selection_information_t) { Message *message = Message::get_instance(); Interface *interface = Message::get_interface(); - + if (interface) { interface->selection_information(message->str()); message->str(""); // flush the stream diff --git a/src/common/Message.hpp b/src/common/Message.hpp index 8080d65623a02b99e24e4afa337ef898f98b4137..f188a91cb763c09ef1048995480ea70842ba6874 100644 --- a/src/common/Message.hpp +++ b/src/common/Message.hpp @@ -6,13 +6,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -23,7 +23,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-A license and that you accept its terms. ** @@ -37,7 +37,7 @@ ** - MARCOUEILLE Jule ** - NOISETTE Pascal ** - REDONDY Arthur -** - VUCHENER Clément +** - VUCHENER Clément ** */ #ifndef MESSAGE_HPP @@ -57,21 +57,21 @@ class Message: public std::stringstream { private: static Message *_message; static Interface *_interface; - + Message(); public: static const class end_error_t { } ende; static const class end_warning_t { } endw; - static const class end_information_t { } endi; - static const class end_selection_information_t { } endsi; - + static const class end_information_t { } endi; + static const class end_selection_information_t { } endsi; + static Message *get_instance(); static void kill(); - + static void set_interface(Interface *); static Interface *get_interface(); - + }; std::ostream &operator<<(std::ostream &, Message::end_error_t); @@ -80,4 +80,3 @@ std::ostream &operator<<(std::ostream &, Message::end_information_t); std::ostream &operator<<(std::ostream &, Message::end_selection_information_t); #endif - diff --git a/src/parser/PajeParser/BuilderThread.cpp b/src/parser/PajeParser/BuilderThread.cpp index 90de6d5baa2766609f1b074f367bc76ea855a872..5870fbe63231474b909d2a23e6de484635c81a8b 100644 --- a/src/parser/PajeParser/BuilderThread.cpp +++ b/src/parser/PajeParser/BuilderThread.cpp @@ -6,13 +6,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -23,7 +23,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-A license and that you accept its terms. ** @@ -37,7 +37,7 @@ ** - MARCOUEILLE Jule ** - NOISETTE Pascal ** - REDONDY Arthur -** - VUCHENER Clément +** - VUCHENER Clément ** */ #include <fstream> diff --git a/src/parser/PajeParser/BuilderThread.hpp b/src/parser/PajeParser/BuilderThread.hpp index bcd80bc6847f6ca51efedda20944f8261b20a039..9a743cf7db4de82edf58137d5695cbef4e9cc7f1 100644 --- a/src/parser/PajeParser/BuilderThread.hpp +++ b/src/parser/PajeParser/BuilderThread.hpp @@ -6,13 +6,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -23,7 +23,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-A license and that you accept its terms. ** @@ -37,7 +37,7 @@ ** - MARCOUEILLE Jule ** - NOISETTE Pascal ** - REDONDY Arthur -** - VUCHENER Clément +** - VUCHENER Clément ** */ #ifndef BUILDING_THREAD_HPP @@ -101,7 +101,7 @@ public slots: void run(int n, PajeLine* line); signals: - void build_finished(); - void build_trace(int, Trace_builder_struct*); + void build_finished(); + void build_trace(int, Trace_builder_struct*); }; #endif // PARSING_THREAD_HPP diff --git a/src/parser/PajeParser/mt_ParserEventPaje.cpp b/src/parser/PajeParser/mt_ParserEventPaje.cpp index e6e2b14c1ca67e3ef0926c87d8ac80025cfcae33..eabcf8af78a593e33768a389fc0119f1d686a710 100644 --- a/src/parser/PajeParser/mt_ParserEventPaje.cpp +++ b/src/parser/PajeParser/mt_ParserEventPaje.cpp @@ -1,45 +1,45 @@ /* -** This file is part of the ViTE project. -** -** This software is governed by the CeCILL-A license under French law -** and abiding by the rules of distribution of free software. You can -** use, modify and/or redistribute the software under the terms of the -** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following -** URL: "http://www.cecill.info". -** -** As a counterpart to the access to the source code and rights to copy, -** modify and redistribute granted by the license, users are provided -** only with a limited warranty and the software's author, the holder of -** the economic rights, and the successive licensors have only limited -** liability. -** -** In this respect, the user's attention is drawn to the risks associated -** with loading, using, modifying and/or developing or reproducing the -** software by the user in light of its specific status of free software, -** that may mean that it is complicated to manipulate, and that also -** therefore means that it is reserved for developers and experienced -** professionals having in-depth computer knowledge. Users are therefore -** encouraged to load and test the software's suitability as regards -** their requirements in conditions enabling the security of their -** systems and/or data to be ensured and, more generally, to use and -** operate it in the same conditions as regards security. -** -** The fact that you are presently reading this means that you have had -** knowledge of the CeCILL-A license and that you accept its terms. -** -** -** ViTE developers are (for version 0.* to 1.0): -** -** - COULOMB Kevin -** - FAVERGE Mathieu -** - JAZEIX Johnny -** - LAGRASSE Olivier -** - MARCOUEILLE Jule -** - NOISETTE Pascal -** - REDONDY Arthur -** - VUCHENER Clément -** -*/ + ** This file is part of the ViTE project. + ** + ** This software is governed by the CeCILL-A license under French law + ** and abiding by the rules of distribution of free software. You can + ** use, modify and/or redistribute the software under the terms of the + ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following + ** URL: "http://www.cecill.info". + ** + ** As a counterpart to the access to the source code and rights to copy, + ** modify and redistribute granted by the license, users are provided + ** only with a limited warranty and the software's author, the holder of + ** the economic rights, and the successive licensors have only limited + ** liability. + ** + ** In this respect, the user's attention is drawn to the risks associated + ** with loading, using, modifying and/or developing or reproducing the + ** software by the user in light of its specific status of free software, + ** that may mean that it is complicated to manipulate, and that also + ** therefore means that it is reserved for developers and experienced + ** professionals having in-depth computer knowledge. Users are therefore + ** encouraged to load and test the software's suitability as regards + ** their requirements in conditions enabling the security of their + ** systems and/or data to be ensured and, more generally, to use and + ** operate it in the same conditions as regards security. + ** + ** The fact that you are presently reading this means that you have had + ** knowledge of the CeCILL-A license and that you accept its terms. + ** + ** + ** ViTE developers are (for version 0.* to 1.0): + ** + ** - COULOMB Kevin + ** - FAVERGE Mathieu + ** - JAZEIX Johnny + ** - LAGRASSE Olivier + ** - MARCOUEILLE Jule + ** - NOISETTE Pascal + ** - REDONDY Arthur + ** - VUCHENER Clément + ** + */ #include <string> #include <map> #include <set> @@ -85,8 +85,8 @@ mt_ParserEventPaje::~mt_ParserEventPaje(){ void mt_ParserEventPaje::setTrace(Trace* trace){_trace=trace;} int mt_ParserEventPaje::store_event(const PajeLine *line, - Trace &trace, - Trace_builder_struct* tb_struct) { + Trace &trace, + Trace_builder_struct* tb_struct) { string fvalue; string alias; string name; @@ -232,18 +232,18 @@ int mt_ParserEventPaje::store_event(const PajeLine *line, return -1; } -// if(!value->is_correct()) { // Check if the value is correct or not -// Error::set(Error::VITE_ERR_INCOMPATIBLE_VALUE_IN_EVENT + fvalue + " (expecting a \"" + ftype + "\")", -// line->_id, Error::VITE_ERRCODE_WARNING); -// return; -// } - // if(tb_struct->extra_fields==NULL)tb_struct->extra_fields=new map<std::string, Value *>(); - // tb_struct->extra_fields->insert(pair<std::string, Value *>((*FNames)[idname]._name, value)); - tb_struct->extra_fields.insert(pair<std::string, Value *>((*FNames)[idname]._name, value)); + // if(!value->is_correct()) { // Check if the value is correct or not + // Error::set(Error::VITE_ERR_INCOMPATIBLE_VALUE_IN_EVENT + fvalue + " (expecting a \"" + ftype + "\")", + // line->_id, Error::VITE_ERRCODE_WARNING); + // return; + // } + // if(tb_struct->extra_fields==NULL)tb_struct->extra_fields=new map<std::string, Value *>(); + // tb_struct->extra_fields->insert(pair<std::string, Value *>((*FNames)[idname]._name, value)); + tb_struct->extra_fields.insert(pair<std::string, Value *>((*FNames)[idname]._name, value)); } } - // Name alias_name; + // Name alias_name; if ( (alias != "") && (name == "" ) ){ name = alias; @@ -262,110 +262,110 @@ int mt_ParserEventPaje::store_event(const PajeLine *line, switch( def->_id ) { case _PajeDefineContainerType : - { - tb_struct->func= TraceBuilderThread::define_container_type; - } - break; + { + tb_struct->func= TraceBuilderThread::define_container_type; + } + break; case _PajeCreateContainer : - { - tb_struct->func= TraceBuilderThread::create_container; - } - break; + { + tb_struct->func= TraceBuilderThread::create_container; + } + break; case _PajeDestroyContainer : - { - tb_struct->func= TraceBuilderThread::destroy_container; - } - break; + { + tb_struct->func= TraceBuilderThread::destroy_container; + } + break; case _PajeDefineEventType : - { + { tb_struct->func= TraceBuilderThread::define_event_type; - } - break; + } + break; case _PajeDefineStateType : - { - tb_struct->func= TraceBuilderThread::define_state_type; - } - break; + { + tb_struct->func= TraceBuilderThread::define_state_type; + } + break; case _PajeDefineVariableType : - { + { tb_struct->func= TraceBuilderThread::define_variable_type; - } - break; + } + break; case _PajeDefineLinkType : - { + { tb_struct->func= TraceBuilderThread::define_link_type; - } - break; + } + break; case _PajeDefineEntityValue : - { + { tb_struct->func= TraceBuilderThread::define_entity_value; - } - break; + } + break; case _PajeSetState : - { - tb_struct->func= TraceBuilderThread::set_state; - } - break; + { + tb_struct->func= TraceBuilderThread::set_state; + } + break; case _PajePushState : - { - tb_struct->func= TraceBuilderThread::push_state; - } - break; + { + tb_struct->func= TraceBuilderThread::push_state; + } + break; case _PajePopState : - { - tb_struct->func= TraceBuilderThread::pop_state; - } - break; + { + tb_struct->func= TraceBuilderThread::pop_state; + } + break; case _PajeNewEvent : - { - tb_struct->func= TraceBuilderThread::new_event; - } - break; + { + tb_struct->func= TraceBuilderThread::new_event; + } + break; case _PajeSetVariable : - { + { tb_struct->func= TraceBuilderThread::set_variable; - } - break; + } + break; case _PajeAddVariable : - { - tb_struct->func= TraceBuilderThread::add_variable; - } - break; + { + tb_struct->func= TraceBuilderThread::add_variable; + } + break; case _PajeSubVariable : - { + { tb_struct->func= TraceBuilderThread::sub_variable; - } - break; + } + break; case _PajeStartLink : - { + { tb_struct->func= TraceBuilderThread::start_link; - } - break; + } + break; case _PajeEndLink : - { + { tb_struct->func= TraceBuilderThread::end_link; - } - break; + } + break; default: Error::set(Error::VITE_ERR_UNKNOWN_EVENT_DEF + def->_name, line->_id, Error::VITE_ERRCODE_WARNING); return -1; } - return 0; - } + return 0; +} diff --git a/src/trace/DrawTrace.hpp b/src/trace/DrawTrace.hpp index 8d8ff0b56347b88ccf2158198b04ab8b683eec6e..6139da67972c3c2036a9fb21c5c1ed3e6ac47f4d 100644 --- a/src/trace/DrawTrace.hpp +++ b/src/trace/DrawTrace.hpp @@ -687,13 +687,13 @@ public: if (!Info::Render::_no_events) if ((event = find_event(container, x, d))) { *Message::get_instance() << "<center><strong>Event</strong></center>" - << "<strong>Value:</strong> " << event->get_value()->get_name() << "<br />" + << "<strong>Value:</strong> " << event->get_value()->get_name() << "<br />" << "<strong>Container:</strong> " << event->get_container()->get_Name().to_string() << "<br />" - << "<strong>Type:</strong> " << event->get_type()->get_name() << "<br />" - << "<strong>Date:</strong> " << event->get_time().get_value() << "<br />"; + << "<strong>Type:</strong> " << event->get_type()->get_name() << "<br />" + << "<strong>Date:</strong> " << event->get_time().get_value() << "<br />"; print_extra_fields("Event", event->get_extra_fields()); print_extra_fields("Value", event->get_value()->get_extra_fields()); - print_extra_fields("Type", event->get_type()->get_extra_fields()); + print_extra_fields("Type", event->get_type()->get_extra_fields()); *Message::get_instance() << Message::endsi; return; } diff --git a/src/trace/TraceBuilderThread.cpp b/src/trace/TraceBuilderThread.cpp index d87ac2e1065b6f77c075a5e319e380b3dff4d6b2..6a1b1ea8367704fd39d18fa4c30d3b1dd3fdbea3 100644 --- a/src/trace/TraceBuilderThread.cpp +++ b/src/trace/TraceBuilderThread.cpp @@ -280,38 +280,39 @@ void TraceBuilderThread::pop_state(Trace_builder_struct* tb_struct){ //if(tb_struct->extra_fields==NULL)tb_struct->extra_fields=new map<std::string, Value *>(); tb_struct->_trace->pop_state( tb_struct->time, temp_state_type, temp_container,tb_struct->extra_fields); } - - } void TraceBuilderThread::new_event(Trace_builder_struct* tb_struct){ EventType *temp_event_type = tb_struct->_trace->search_event_type( tb_struct->type); + Container *temp_container = NULL; + + Container_map::const_iterator it; + it = (*tb_struct->_containers).find( tb_struct->container); - Container *temp_container = NULL; - Container_map::const_iterator it=(*tb_struct->_containers).find( tb_struct->container); if( it != (*tb_struct->_containers).end()) { - temp_container =( (*it).second); + temp_container = (*it).second; } else { - temp_container = tb_struct->_trace->search_container( tb_struct->container); + temp_container = tb_struct->_trace->search_container( tb_struct->container ); (*tb_struct->_containers)[tb_struct->container] = temp_container; } - if(temp_event_type == NULL && tb_struct->type.to_string() != "0"){ - Error::set(Error::VITE_ERR_UNKNOWN_EVENT_TYPE + tb_struct->type.to_string(), tb_struct->_id, Error::VITE_ERRCODE_ERROR); + if( (temp_event_type == NULL) && (tb_struct->type.to_string() != "0") ) + { + Error::set( Error::VITE_ERR_UNKNOWN_EVENT_TYPE + tb_struct->type.to_string(), + tb_struct->_id, Error::VITE_ERRCODE_ERROR ); } - else if(temp_container == NULL && tb_struct->container.to_string() != "0"){ - Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + tb_struct->container.to_string(), tb_struct->_id, Error::VITE_ERRCODE_ERROR); + else if( (temp_container == NULL) && (tb_struct->container.to_string() != "0") ) + { + Error::set( Error::VITE_ERR_UNKNOWN_CONTAINER + tb_struct->container.to_string(), + tb_struct->_id, Error::VITE_ERRCODE_ERROR ); } else{ - // unsigned long long before = getCurrentTime(); - tb_struct->_trace->new_event( tb_struct->time, temp_event_type, temp_container, tb_struct->extra_fields); - // unsigned long long after = getCurrentTime(); - // g_totalTime+=(after-before); + tb_struct->_trace->new_event( tb_struct->time, temp_event_type, + temp_container, tb_struct->extra_fields ); } - }