Commit c48efb2b authored by Johnny Jazeix's avatar Johnny Jazeix

Ajout de commentaires pour la doc et correction de quelques erreurs

parent 8b63c5e7
......@@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = Vite
PROJECT_NAME = ViTE
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
......@@ -513,7 +513,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = interface/src/ interface/tests/ parser/src/ structureDonnee/ values/
INPUT = interface/src/ interface/tests/ parser/src/ trace/src/ values/ main.cpp
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......@@ -590,7 +590,7 @@ EXAMPLE_RECURSIVE = NO
# directories that contain image that are included in the documentation (see
# the \image command).
IMAGE_PATH =
IMAGE_PATH = ./
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
......
......@@ -17,7 +17,7 @@ DIR_PARSER = parser
all:
cd interface/ && make
# @(cd $(DIR_PARSER) && make)
@(cd $(DIR_PARSER) && make)
@echo " "
@echo "Compilation completed! File created in 'bin' folder."
@echo " "
......
/*!
*\file ressource.hpp
*\file resource.hpp
*\brief This file gives some common header files for the interface classes.
*/
......
logo.png

11.1 KB

/*!
*\file main.cpp
*\brief The main launcher.
/*!
* \mainpage ViTE
*
* \image html logo.png
* \image latex logo.png
*
* \file main.cpp
* \brief The main launcher.
*/
#include "interface_console.hpp"
......
......@@ -41,13 +41,17 @@ public:
*/
Definition();
/*!
* \fn Definition(std::string &eventname)
* \brief constructor
* \param eventname : the name of the new Definition
*/
Definition(std::string &eventname);
/*!
* \brief : add a field to definition
* \param : name
* \param : value
* \param name : the name of the event
* \param value : the type of the event
*/
void store(std::string name,std::string value);
......@@ -66,6 +70,11 @@ public:
*/
const std::vector<field> &get_fields() const;
/*!
* \fn : get_event_name() const
* \return the string _event_name
*
*/
std::string get_event_name() const;
};
......
......@@ -40,13 +40,13 @@ public:
int definitions_number();
/*!
* \fn store_definition
* \fn store_definition(Line &)
* \param : the line to store,
*/
void store_definition(Line &);
/*!
* \fn get_definition
* \fn get_definition(int i)
* \param : the integer matching the definition we want
* \return : the i-th definition
*/
......@@ -59,19 +59,19 @@ public:
std::map<int,Definition> *get_hash_table_of_definitions();
/*!
* \fn enter_definition
* \fn enter_definition(Line &line)
* \param : line
*/
void enter_definition(Line &line);
/*!
* \fn leave_definition
* \fn leave_definition(Line&line)
* \param : line
*/
void leave_definition(Line&line);
/*!
* \fn add_field_to_definition
* \fn add_field_to_definition(std::string& first_token, Line& line)
* \param : the name of the file to parse
* \param : the structure of data to fill
*/
......
This diff is collapsed.
......@@ -12,7 +12,7 @@
#include "../../values/integer.hpp"
#include "../../values/name.hpp"
#include "../../values/string.hpp"
// #include "../../structureDonnee/trace.hpp"
#include "../../trace/src/Trace.hpp"
/**
* \class ParserEventDecoder
......
......@@ -17,7 +17,7 @@ class ParserPaje {
public:
/*!
* \fn parse(std::string filename)
* \fn parse(std::string filename, Trace &trace)
* \param : the name of the file to parse
* \param : the structure of data to fill
*/
......
CC = g++
LD = g++
OBJ = ../src/Line.o ../src/ParserDefinitionDecoder.o ../src/Definition.o ../src/TokenSource.o ../src/ParserPaje.o
OBJ = ../src/Line.o ../src/ParserDefinitionDecoder.o ../src/Definition.o ../src/TokenSource.o ../src/ParserEventDecoder.o ../src/ParserPaje.o
OPT = -g -Wall -W
......
......@@ -3,11 +3,11 @@
ContainerType::ContainerType(Name &name, ContainerType *parent): _name(name), _parent(parent), _children() {
_parent->_children.push_back(this);
}
const ContainerType *ContainerType::get_parent() const {
return _parent;
}
const list<ContainerType *> &ContainerType::get_children() const {
return _children;
}
......
#ifndef CONTAINERTYPE_HPP
#define CONTAINERTYPE_HPP
#ifndef CONTAINERTYPE_HPP
#define CONTAINERTYPE_HPP
#include <list>
using std::list;
#include "values/Name.hpp"
/*!
*
* \file containertype.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
*
*/
/*!
*
* \class ContainerType
* \brief describe the type of a container
*
*/
/*!
*
* \file containertype.hpp
* \author Clément Vuchener
* \brief Contains the definition of the class Container
* \date 2009 January 30th
*
*/
/*!
*
* \class ContainerType
* \brief describe the type of a container
*
*/
class ContainerType {
private:
Name _name;
ContainerType *_parent;
list<ContainerType *> _children;
public:
ContainerType(Name &name, ContainerType *parent);
/*!
*
* \fn get_parent
* \brief Returns the parent container type
*
*/
const ContainerType *get_parent() const;
/*!
*
* \fn get_children
* \brief Returns the list of the child container types
*
*/
const list<ContainerType *> &get_children() const;
};
#endif
public:
ContainerType(Name &name, ContainerType *parent);
/*!
*
* \fn get_parent
* \brief Returns the parent container type
*
*/
const ContainerType *get_parent() const;
/*!
*
* \fn get_children
* \brief Returns the list of the child container types
*
*/
const list<ContainerType *> &get_children() const;
};
#endif
#include "color.hpp"
#include "Color.hpp"
Color::Color() {
_r = 0;
_g = 0;
_b = 0;
}
Color::Color(double r, double g, double b) {
_r = r;
......
......@@ -26,6 +26,13 @@ private :
double _b;
public:
/*!
*
* \brief Constructor
*
*/
Color();
/*!
*
* \brief Constructor
......
#include "date.hpp"
#include "Date.hpp"
Date::Date(){
......
#include "double.hpp"
#include "Double.hpp"
Double::Double(){
......
#include "hex.hpp"
#include "Hex.hpp"
Hex::Hex() {
_value = 0;
}
Hex::Hex(int n) {
_value = n;
......
......@@ -26,6 +26,13 @@ class Hex: public Value {
private:
int _value;
public:
/*!
*
* \brief Constructor
*
*/
Hex();
/*!
*
* \brief Constructor
......
#include "integer.hpp"
#include "Integer.hpp"
Integer::Integer() {
_value = 0;
}
Integer::Integer(int n) {
_value = n;
......
......@@ -24,6 +24,13 @@ class Integer: public Value {
private:
int _value;
public:
/*!
*
* \brief Constructor
*
*/
Integer();
/*!
*
* \brief Constructor
......
#include "name.hpp"
const alias_only_t alias_only = {};
const name_only_t name_only = {};
Name::Name(std::string name, std::string alias) {
_name = name;
_alias = alias;
}
Name::Name(name_only_t name_only, std::string name) {
_name = name;
_alias.clear();
}
Name::Name(alias_only_t alias_only, std::string alias) {
_name.clear();
_alias = alias;
#include "Name.hpp"
const alias_only_t alias_only = {};
const name_only_t name_only = {};
Name::Name() {
_name.erase();
_alias.erase();
}
Name::Name(std::string name, std::string alias) {
_name = name;
_alias = alias;
}
Name::Name(name_only_t name_only, std::string name) {
_name = name;
_alias.clear();
}
Name::Name(alias_only_t alias_only, std::string alias) {
_name.clear();
_alias = alias;
}
Name::Name(Name &name) {
_name = name._name;
_alias = name._alias;
}
std::string Name::to_string() const {
if (!_name.empty())
return _name;
else
return _alias;
}
bool Name::operator== (String &s) const {
return s == _name || s == _alias;
}
}
std::string Name::to_string() const {
if (!_name.empty())
return _name;
else
return _alias;
}
bool Name::operator== (String &s) const {
return s == _name || s == _alias;
}
#ifndef NAME_HPP
#define NAME_HPP
/*!
*
* \file name.hpp
* \author Clément Vuchener
* \brief
* \date 2009 January 30th
*
*/
#include "Value.hpp"
#include "String.hpp"
struct alias_only_t {};
struct name_only_t {};
/*!
*
* \brief Used to construct a Name object with only an alias
*
*/
extern const alias_only_t alias_only;
/*!
*
* \Brief Used to construct a Name object with only a name
*
*/
extern const name_only_t name_only;
/*!
*
* \class Name
* \brief Store a name and/or an alias for trace objects
*
*/
class Name: public Value {
private:
std::string _alias, _name;
public:
/*!
*
* \brief Define with both name and alias
* \param name Name of the object
* \param alias Alias of the object
*
*/
Name(std::string name, std::string alias);
/*!
*
* \brief Define with only a name
* \param name_only Must be name_only
* \param name Name of the object
*
*/
Name(name_only_t name_only, std::string name);
/*!
*
* \brief Define with only a alias
* \param alias_anly Must be alias_only
* \param alias Alias of the object
*
*/
Name(alias_only_t, std::string alias);
#ifndef NAME_HPP
#define NAME_HPP
/*!
*
* \file name.hpp
* \author Clément Vuchener
* \brief
* \date 2009 January 30th
*
*/
#include "Value.hpp"
#include "String.hpp"
struct alias_only_t {};
struct name_only_t {};
/*!
*
* \brief Used to construct a Name object with only an alias
*
*/
extern const alias_only_t alias_only;
/*!
*
* \Brief Used to construct a Name object with only a name
*
*/
extern const name_only_t name_only;
/*!
*
* \class Name
* \brief Store a name and/or an alias for trace objects
*
*/
class Name: public Value {
private:
std::string _alias, _name;
public:
/*!
* \brief Constructor
*/
Name();
/*!
*
* \brief Define with both name and alias
* \param name Name of the object
* \param alias Alias of the object
*
*/
Name(std::string name, std::string alias);
/*!
*
* \brief Define with only a name
* \param name_only Must be name_only
* \param name Name of the object
*
*/
Name(name_only_t name_only, std::string name);
/*!
*
* \brief Define with only a alias
* \param alias_anly Must be alias_only
* \param alias Alias of the object
*
*/
Name(alias_only_t, std::string alias);
/*!
*
......@@ -73,23 +78,23 @@ public:
*
*/
Name(Name &);
/*!
*
* \fn to_string
* \return The name of the object, if it exists, the alias otherwise
*
*/
std::string to_string() const;
/*!
*
* \fn operator==
* \brief Compare the string with the name or the alias
* \return true if the string equals the name or the alias
*
*/
bool operator== (String &) const;
};
#endif // NAME_HPP
/*!
*
* \fn to_string
* \return The name of the object, if it exists, the alias otherwise
*
*/
std::string to_string() const;
/*!
*
* \fn operator==
* \brief Compare the string with the name or the alias
* \return true if the string equals the name or the alias
*
*/
bool operator== (String &) const;
};
#endif // NAME_HPP
#include "string.hpp"
#include "String.hpp"
String::String(){
_value.erase();
......
LD = g++
OBJ = color.o date.o double.o hex.o integer.o name.o string.o
OBJ = Color.o Date.o Double.o Hex.o Integer.o Name.o String.o
OPT = -g -Wall -W
LIBS =
......@@ -8,9 +8,9 @@ LIBS =
all: $(OBJ)
$(OBJ):%.o: %.cpp %.hpp value.hpp
$(OBJ):%.o: %.cpp %.hpp Value.hpp
$(LD) -c $< $(OPT)
clean:
$(RM) *.o *.*~ makefile~
$(RM) *.o *.*~ Makefile~
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