Commit b8526f42 authored by Johnny Jazeix's avatar Johnny Jazeix

Normes + autres choses.

parent ae6ee410
......@@ -1339,7 +1339,7 @@ DOT_MULTI_TARGETS = NO
# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
GENERATE_LEGEND = YES
GENERATE_LEGEND = NO
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
# remove the intermediate dot files that are used to generate
......
......@@ -3,17 +3,19 @@
*\brief This file contains functions that are used in different modules and do not belong to a particular class.
*/
#ifndef TOOLS_HPP
#define TOOLS_HPP
#include <string>
#include <iostream>
/*!
* \fn convert_to_double(const std::string args)
* \brief Convert the string in double
* \arg arg : the string to be doublized.
* \param args the string to be doublized.
* \return the double well converted or -1. on error.
*/
double convert_to_double(const std::string arg);
double convert_to_double(const std::string args);
#endif // TOOLS_HPP
......@@ -228,16 +228,16 @@ int Interface_console::get_state(int argc, char** argv){
else if((string)argv[i] == "-f" || (string)argv[i] == "-a"){
// We want to open the file which follow this argument
i ++;
if(i < argc){
if(i < argc) {
_file_opened = argv[i];
state |= _STATE_OPEN_FILE;
}
else{
else {
cerr << "no filename to open" << endl;
return _STATE_UNKNOWN;
}
}
else if((string)argv[i] == "-e"){
else if((string)argv[i] == "-e") {
// We want to export the file which follow this argument
i ++;
if(i < argc){
......@@ -313,7 +313,7 @@ int Interface_console::get_state(int argc, char** argv){
i++;
}
else if((string)argv[i] == "-grow"){
else if((string)argv[i] == "-grow") {
if (!(i + 1 < argc)) {
cerr << "grow argc" << endl;
return _STATE_UNKNOWN;
......@@ -326,7 +326,7 @@ int Interface_console::get_state(int argc, char** argv){
Svg::set_height_factor(atof(argv[i+1]));
i++;
}
else if((string)argv[i] == "-scale"){
else if((string)argv[i] == "-scale") {
if (!(i + 1 < argc)) {
cerr << "scale argc" << endl;
return _STATE_UNKNOWN;
......@@ -528,7 +528,7 @@ void Interface_console::display_help(){
<< " In these cases, the trace will be printed from the start and/or to the end." << endl
<< "-f [path-source] -e [path-dest] : export the trace file in the svg format." << endl
<< "-f [path-source] -e [path-dest] -t ([time_init]):([time_end]) : export the trace file in the svg format in the interval given." << endl
<< "[-epsilon float_values][-interval (lower|0) (upper|0) ][-wide float_values][-grow float_values]"<< endl << endl;
<< "[-epsilon float_values][-wide float_values][-grow float_values]"<< endl << endl;
}
......
......@@ -164,7 +164,7 @@ public:
/*!
* \brief The default constructor
* \arg parent: the parent widget of the graphical interface. Should be ignored.
* \param parent: the parent widget of the graphical interface. Should be ignored.
*/
Interface_graphic(Interface_console* core, QWidget *parent = 0);
......@@ -183,24 +183,24 @@ public:
**********************************/
/*!
* \arg string : the string to be displayed.
* \param string : the string to be displayed.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on with an indeterminated behaviour.
*/
void error(const std::string) const;
void error(const std::string string) const;
/*!
*\arg string : the string to be displayed.
*\param string : the string to be displayed.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on with an indeterminated behaviour.
*/
void warning(const std::string) const;
void warning(const std::string string) const;
/*!
*\arg string : the string to be displayed.
*\param string : the string to be displayed.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on.
*/
void information(const std::string) const;
void information(const std::string string) const;
......@@ -211,10 +211,10 @@ public:
**********************************/
/*!
*\arg string : the string to be displayed.
*\param string : the string to be displayed.
*\brief The function takes strings and/or numbers then displayed it in the entity informative text area in the info window.
*/
void selection_information(const std::string) const;
void selection_information(const std::string string) const;
......@@ -227,7 +227,7 @@ public:
/*!
* \brief Create a Parser and a DataStructure to display a trace file.
* \arg path The path of the file.
* \param path The path of the file.
*/
void opening_file(const std::string &path);
......@@ -346,7 +346,7 @@ protected slots:
/*!
*\brief A slot called when 'zoom_box' widget is triggered.
*
* \arg s The new string value of the zoom box.
* \param s The new string value of the zoom box.
*/
void on_zoom_box_textChanged(QString s);
......
......@@ -3,6 +3,13 @@
*
* \image html logo.png
* \image latex logo.png
* \authors COULOMB Kevin
* \authors JAZEIX Johnny
* \authors LAGRASSE Olivier
* \authors MARCOUEILLE Jule
* \authors NOISETTE Pascal
* \authors REDONDY Arthur
* \authors VUCHENER Clément
*
* \file main.cpp
* \brief The main launcher.
......
......@@ -28,7 +28,9 @@ typedef double Element_pos;
*/
typedef double Element_col;
/* Define the unity of time */
/*!
* \brief Define the unity of time.
*/
typedef double Times;
......
......@@ -73,7 +73,7 @@ public:
void print() const;
/*!
* \fn print() const
* \fn print_string() const
* \brief display the definitions in a string
* \return the string with informations about the definition
*/
......
......@@ -38,16 +38,23 @@ public:
*/
void parse(std::string filename, Trace &trace);
/*!
* \fn set_file_to_parse(const std::string filename)
* \param filename : the name of the file to parse
* \brief set the name of the file to parse.
*/
void set_file_to_parse(const std::string filename);
/*!
* \fn get_size_loaded()
* \fn get_size_loaded() const
* \brief return the size of the file already read.
* \return the size already loaded of the file by the parser
*/
const int get_size_loaded() const;
/*!
* \fn get_total_size_of_file()
* \fn get_total_size_of_file() const
* \brief get the size of the file parsed.
* \return the size of the file parsed
*/
const int get_total_size_of_file() const;
......
......@@ -97,6 +97,11 @@ public:
std::string* read_token();
/*!
* \fn get_size_loaded()
* \brief get the size already parsed.
* \return the size already parsed
*/
static const int get_size_loaded();
};
......
......@@ -172,8 +172,8 @@ class Render_opengl : public QGLWidget, public Render
/*!
* \brief Call by the system when the render area was resized (occurs during a window resizement).
* \arg width : the new width of the render area.
* height : the new height of the render area.
* \param width : the new width of the render area.
* \param height : the new height of the render area.
*/
void resizeGL(int width, int height);
......@@ -184,37 +184,37 @@ class Render_opengl : public QGLWidget, public Render
/*!
* \brief This functions receives all mouse press events.
* \arg event The event triggered by mouse.
* \param event The event triggered by mouse.
*/
void mousePressEvent(QMouseEvent * event);
/*!
* \brief If user press, this functions receives all mouse move events until user release mouse.
* \arg event The event triggered by mouse.
* \param event The event triggered by mouse.
*/
void mouseMoveEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse release events.
* \arg event The event triggered by mouse.
* \param event The event triggered by mouse.
*/
void mouseReleaseEvent(QMouseEvent * event);
/*!
* \brief This functions receives all mouse wheel events.
* \arg event The event triggered by the mouse wheel.
* \param event The event triggered by the mouse wheel.
*/
void wheelEvent(QWheelEvent * event);
/*!
* \brief This functions receives all keyboard events.
* \arg event The event triggered by the keyboard event.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent * event);
/*!
* \brief This functions receives all keyboard release events.
* \arg event The event triggered by a keyboard release.
* \param event The event triggered by a keyboard release.
*/
void keyReleaseEvent(QKeyEvent * event);
......@@ -611,7 +611,6 @@ public:
/*!
* \brief This function draws the trace.
* \arg trace the trace which be displayed.
*/
bool build();
......
......@@ -4,6 +4,12 @@
using namespace std;
Times Svg::_start_interval_time = 0.;
Times Svg::_end_interval_time = 0.;
Element_pos Svg::_wide_factor = 200.;
Element_pos Svg::_height_factor = 20.;
double Svg::_epsilon = 0.1;
double Svg::_scale_frequency = 50.;
void Svg::init(const char *path){
......
......@@ -12,38 +12,45 @@
/*
*\brief Distance between two container
* \def MARGIN
* \brief Distance between two container
*/
#define MARGIN 10
/*
*\brief Spike size
* \def ARROWSIZE
* \brief Spike size
*/
#define ARROWSIZE 2
/*
*\brief Distance between two states
* \def MARGINSTATE
* \brief Distance between two states
*/
#define MARGINSTATE 0.5
/*
*\brief offset between the top and the picture due to the scale
* \def MARGINTOP
* \brief offset between the top and the picture due to the scale
*/
#define MARGINTOP 20
/*
*\brief a State of chronogramme drawer automaton
* \def WAIT_NEW_CHRONO
* \brief a State of chronogramme drawer automaton
*/
#define WAIT_NEW_CHRONO 0
/*
*\brief a State of chronogramme drawer automaton
* \def INIT
* \brief a State of chronogramme drawer automaton
*/
#define INIT 1
/*
*\brief a State of chronogramme drawer automaton
* \def WAIT_FOR_POINT
* \brief a State of chronogramme drawer automaton
*/
#define WAIT_FOR_POINT 2
......@@ -53,44 +60,17 @@
#include "resource.hpp"
#define max(a,b) ((a)>(b)?(a):(b));
#define min(a,b) ((a)>(b)?(b):(a));
/*!
* \brief Trace can be exported on a selected period of time, beginning with _start_interval_time, default 0 and command line changed with -t _start_interval_time _end_interval_time or the static svg::set_interval(Times t1,Times t2)
*/
static Times _start_interval_time;
/*!
* \brief Trace can be exported on a selected period of time, endding with _end_interval_time, default 0 (no upper selection) and command line changed with -t _start_interval_time _end_interval_time or the static svg::set_interval(Times t1,Times t2)
*/
static Times _end_interval_time;
/*!
* \brief Svg display is widden by _wide_factor (in pixel/second), default 100, and command line changed with -w _wide_factor
*/
static Element_pos _wide_factor;
/*
*\brief Svg display is grown by _height_factor (in pixel/second), default 20, and command line changed with -w _wide_factor
It corresponds to the height of a containers in pixel
\def max(a, b)
Computes the maximum of \a a and \a b.
*/
static Element_pos _height_factor;
#define max(a,b) ((a)>(b)?(a):(b));
/*!
* \brief accuracy required : an element less wide than _epsilon will not be printed
*/
static double _epsilon;
\def min(a, b)
Computes the minimum of \a a and \a b.
*/
#define min(a,b) ((a)>(b)?(b):(a));
/*!
* \brief the scale can be more accurate by increasing the _scale_frequency
*/
static double _scale_frequency;
......@@ -186,6 +166,42 @@ private:
public:
/*!
* \brief Trace can be exported on a selected period of time, beginning with _start_interval_time, default 0 and command line changed with -t _start_interval_time _end_interval_time or the static svg::set_interval(Times t1,Times t2)
*/
static Times _start_interval_time;
/*!
* \brief Trace can be exported on a selected period of time, endding with _end_interval_time, default 0 (no upper selection) and command line changed with -t _start_interval_time _end_interval_time or the static svg::set_interval(Times t1,Times t2)
*/
static Times _end_interval_time;
/*!
* \brief Svg display is widden by _wide_factor (in pixel/second), default 100, and command line changed with -w _wide_factor
*/
static Element_pos _wide_factor;
/*
*\brief Svg display is grown by _height_factor (in pixel/second), default 20, and command line changed with -w _wide_factor
It corresponds to the height of a containers in pixel
*/
static Element_pos _height_factor;
/*!
* \brief accuracy required : an element less wide than _epsilon will not be printed
*/
static double _epsilon;
/*!
* \brief the scale can be more accurate by increasing the _scale_frequency
*/
static double _scale_frequency;
/*STATIC : allows commands line parameter*/
/*!
......
......@@ -5,7 +5,11 @@
#ifndef VBO_HPP
#define VBO_HPP
#define VBO_BUFFER_OFFSET(a) ((char*)NULL + (a))/* OpenGL special macro */
/*!
\def VBO_BUFFER_OFFSET(a)
OpenGL special macro
*/
#define VBO_BUFFER_OFFSET(a) ((char*)NULL + (a))
class Vbo;
......@@ -84,10 +88,10 @@ public:
/*!
* \brief Constructor.
* \arg nb_verteces_per_object Number of verteces per object.
* \arg nb_object Number of objects. Object can be a container or entity.
* \arg object_type Defines how kind of OpenGL primitive object is made.
* \arg client_state Define how kind of OpenGL buffer object belongs to.
* \param nb_verteces_per_object Number of verteces per object.
* \param nb_object Number of objects. Object can be a container or entity.
* \param object_type Defines how kind of OpenGL primitive object is made.
* \param client_state Define how kind of OpenGL buffer object belongs to.
*/
Vbo(int nb_verteces_per_object, int nb_object, GLenum object_type, GLenum client_state);
......@@ -121,8 +125,8 @@ public:
/*!
* \brief Fill the vertex buffer object.
* \arg data_size The vertex buffer data size.
* \arg data A vertex buffer to be display (its type MUST BE <i>Element_pos</i>).
* \param data_size The vertex buffer data size.
* \param data A vertex buffer to be display (its type MUST BE <i>Element_pos</i>).
*
* \return The state of the buffer.
*
......
......@@ -75,10 +75,10 @@ public:
/*!
* \fn Container(Name name, Date creation_time, ContainerType *type, Container *parent)
* \brief Constructor of Container
* \arg name Name of the container
* \arg creation_time Date when the container was created
* \arg type Type of the container
* \arg parent Parent container (NULL if the container is root)
* \param name Name of the container
* \param creation_time Date when the container was created
* \param type Type of the container
* \param parent Parent container (NULL if the container is root)
*/
Container(Name name, Date creation_time, ContainerType *type, Container *parent);
......@@ -91,88 +91,88 @@ public:
/*!
* \fn add_child(Container *)
* \brief Add a child to the container
* \arg child new child container
* \param child new child container
*/
void add_child(Container *child);
/*!
* \fn set_state(Date time, StateType *type, EntityValue *value)
* \brief Set the current state of the container
* \arg time Date of the event
* \arg type Type of the state
* \arg value Value of the state
* \param time Date of the event
* \param type Type of the state
* \param value Value of the state
*/
void set_state(Date time, StateType *type, EntityValue *value);
/*!
* \fn push_state(Date time, StateType *type, EntityValue *value)
* \brief Set the current state of the container and save the previous state
* \arg time Date of the event
* \arg type Type of the state
* \arg value Value of the state
* \param time Date of the event
* \param type Type of the state
* \param value Value of the state
*/
void push_state(Date time, StateType *type, EntityValue *value);
/*!
* \fn pop_state(Date time)
* \brief Restore a previous state
* \arg time Date of the event
* \param time Date of the event
*/
void pop_state(Date time);
/*!
* \fn new_event(Date time, EventType *type, EntityValue *value)
* \brief Add a new event
* \arg time Date of the event
* \arg type Type of the event
* \arg value Value of the event
* \param time Date of the event
* \param type Type of the event
* \param value Value of the event
*/
void new_event(Date time, EventType *type, EntityValue *value);
/*!
* \fn start_link(Date time, LinkType *type, Container *source, EntityValue *value, String key)
* \brief Start a new link identified by key
* \arg time Date of the start of the link
* \arg type Type of the link
* \arg source Container from where the link is sent
* \arg value Value of the link
* \arg key String that identifies the link to match its end
* \param time Date of the start of the link
* \param type Type of the link
* \param source Container from where the link is sent
* \param value Value of the link
* \param key String that identifies the link to match its end
*/
void start_link(Date time, LinkType *type, Container *source, EntityValue *value, String key);
/*!
* \fn end_link(Date time, Container *destination, String key)
* \brief End a link identified by key
* \arg time Date of the end of the link
* \arg destination Container to where the link is sent
* \arg key String that identifies the link to match its beginning
* \param time Date of the end of the link
* \param destination Container to where the link is sent
* \param key String that identifies the link to match its beginning
*/
void end_link(Date time, Container *destination, String key);
/*!
* \fn set_variable(Date time, VariableType *type, Double value)
* \brief Set a new value of a variable
* \arg time Date of the event
* \arg type Type of the variable
* \arg value New value of the variable
* \param time Date of the event
* \param type Type of the variable
* \param value New value of the variable
*/
void set_variable(Date time, VariableType *type, Double value);
/*!
* \fn add_variable(Date time, VariableType *type, Double value)
* \brief Add a value to the current value of a variable
* \arg time Date of the event
* \arg type Type of the variable
* \arg value Value to add
* \param time Date of the event
* \param type Type of the variable
* \param value Value to add
*/
void add_variable(Date time, VariableType *type, Double value);
/*!
* \fn sub_variable(Date time, VariableType *type, Double value)
* \brief Substract a value to the current value of a variable
* \arg time Date of the event
* \arg type Type of the variable
* \arg value Value to substract
* \param time Date of the event
* \param type Type of the variable
* \param value Value to substract
*/
void sub_variable(Date time, VariableType *type, Double value);
......@@ -245,12 +245,12 @@ public:
/*!
* \fn destroy(const Date &time)
* \brief Sets the destruction time of the container
* \arg time Destruction tim
* \param time Destruction tim
*/
void destroy(const Date &time);
/*!
* \fn finish()
* \fn finish(const Date &time)
* \brief Finish to initialize the container (flush temporary states)
* \param time Time to set destruction time if it was not destroy
*/
......
......@@ -24,8 +24,8 @@ public:
/*!
* \fn ContainerType(Name &name, ContainerType *parent)
* \brief Constructor of ContainerType
* \arg name Name of the container type
* \arg parent Type of the parent container
* \param name Name of the container type
* \param parent Type of the parent container
*/
ContainerType(Name &name, ContainerType *parent);
......@@ -38,7 +38,7 @@ public:
/*!
* \fn add_child(ContainerType *child)
* \brief Add a type of child container
* \arg child Type of child container
* \param child Type of child container
*/
void add_child(ContainerType *child);
......
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