Commit 38cc000c authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Only some whitespace cleanup

parent 63a7e640
......@@ -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
......
......@@ -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
......@@ -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>
......
......@@ -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
/*
** 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;
}
......@@ -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;
}
......
......@@ -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 );
}
}
......
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