Commit 47d3de60 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

Suppression des Doxyfile intermédiaires

Modification de name.cpp pour qu'il compile
Ajout de commentaires dans d'autres headers
parent 87c04e7f
......@@ -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/
INPUT = interface/src/ interface/tests/ parser/src/ structureDonnee/ values/
# 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
......
######################################################################
# Automatically generated by qmake (2.01a) dim. fvr. 8 15:58:07 2009
# Automatically generated by qmake (2.01a) dim. fvr. 8 18:47:09 2009
######################################################################
TARGET = vite
RESOURCES= vite.qrc
SOURCES+=../../main.cpp
OBJECTS_DIR=../bin
DESTDIR=../../bin
CONFIG+=uitools
QT+=opengl
TEMPLATE = app
TARGET =
DEPENDPATH += .
......
......@@ -11,4 +11,4 @@ debug:
clean:
@(cd $(DIR_SRC) && make clean)
@(cd $(DIR_TESTS) && make clean)
rm -rf makefile~
rm -rf makefile~ *.*~
......@@ -2,6 +2,10 @@
using namespace std;
Definition::Definition(){
_event_name.erase();
}
Definition::Definition(std::string& eventname){
_event_name = eventname;
}
......
......@@ -39,8 +39,10 @@ public:
* \param : string event name
*
*/
Definition(){}
Definition(std::string& eventname);
Definition();
Definition(std::string &eventname);
/*!
* \brief : add a field to definition
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ public:
* \param : A reference of the line to be copied
*/
Line(Line &);
Line(string &filename);
Line(std::string &filename);
Line(const char* filename);
/*!
* \brief Destructor
......
......@@ -15,10 +15,10 @@
*/
class ParserDefinitionDecoder{
/**
*Reads line to find events definition
*
*/
/**
*Reads line to find events definition
*
*/
private:
/*! \brief Hash table to retrive easily event in Parser Event. */
......@@ -27,16 +27,62 @@ private:
int _current_definition;
public:
/*!
* \fn ParserDefinitionDecoder
* \brief constructor
*/
ParserDefinitionDecoder();
/*!
* \fn definitions_number
* \return : the number of definitions in the map
*/
int definitions_number();
/*!
* \fn store_definition
* \param : the line to store,
*/
void store_definition(Line &);
/*!
* \fn get_definition
* \param : the integer matching the definition we want
* \return : the i-th definition
*/
Definition &get_definition(int i);
/*! \brief Print all the definitions. Useful for debug.*/
void print_definitions();
/*!
* \fn get_hash_table_of_definitions
* \return : the hash table of definitions
*/
std::map<int,Definition> *get_hash_table_of_definitions();
/*!
* \fn enter_definition
* \param : line
*/
void enter_definition(Line &line);
/*!
* \fn leave_definition
* \param : line
*/
void leave_definition(Line&line);
void add_field_to_definition(std::string& first_token,Line& line);
/*!
* \fn add_field_to_definition
* \param : the name of the file to parse
* \param : the structure of data to fill
*/
void add_field_to_definition(std::string& first_token, Line& line);
/*! \fn print_definitions
* \brief Print all the definitions. Useful for debug.
*/
void print_definitions();
};
#endif // PARSERDEFINITIONDECODER_HPP
......@@ -8,6 +8,9 @@
// nom_variable_is_initialized = true; \
// }
using namespace std;
ParserEventDecoder::ParserEventDecoder(){
}
......
#include "TokenSource.hpp"
using namespace std;
TokenSource::TokenSource(){
//no file are opened
......@@ -13,7 +13,7 @@ void TokenSource::open(const char *filename){
eof = false;
file.open(filename, ios::in);
fill_buffer();
}
}
TokenSource::TokenSource(const char *filename){
open(filename);
}
......@@ -23,16 +23,16 @@ bool TokenSource::fill_buffer(){
return false;
}
else{
file.read(buffer,BUFFER_SIZE);
buffer_size=file.gcount();
file.read(buffer, BUFFER_SIZE);
buffer_size = file.gcount();
return true;
}
}
bool TokenSource::go_to_next_token(){
while(buffer[cursor]==' ' || buffer[cursor]=='\t'){
cursor++;
if (cursor>=buffer_size){
cursor ++;
if (cursor >= buffer_size){
if (!fill_buffer()){
return true;
}
......@@ -46,88 +46,88 @@ bool TokenSource::go_to_next_token(){
void TokenSource::build_composite_token(){
cursor++;
if (cursor==buffer_size){
if (!fill_buffer()){
std::cout<<"found \" at end of file"<<endl;
return;
}
cursor=0;
}
do
{
token[client_cursor]=buffer[cursor];
cursor++;
client_cursor++;
if (ensure_capacity())
break;
if (client_cursor==WORD_SIZE){
std::cout<<"lire_token : word too large"<<endl;
token[client_cursor-1]='\0';
return;
}
}
while(buffer[cursor]!='"');
cursor++;
cursor ++;
if (cursor == buffer_size){
if (!fill_buffer()){
cout << "found \" at end of file" << endl;
return;
}
cursor=0;
}
do
{
token[client_cursor] = buffer[cursor];
cursor ++;
client_cursor ++;
if (ensure_capacity())
;
break;
if (client_cursor == WORD_SIZE){
cout << "lire_token : word too large" << endl;
token[client_cursor-1] = '\0';
return;
}
}
while(buffer[cursor] != '"');
cursor ++;
if (ensure_capacity())
;
}
void TokenSource::build_simple_token(){
while(buffer[cursor]!=' ' && buffer[cursor]!='\n' && buffer[cursor]!='\t')
while(buffer[cursor] != ' ' && buffer[cursor] != '\n' && buffer[cursor] != '\t')
{
token[client_cursor]=buffer[cursor];
cursor++;
client_cursor++;
token[client_cursor] = buffer[cursor];
cursor ++;
client_cursor ++;
if (ensure_capacity())
break;
if (client_cursor==WORD_SIZE){
std::cout<<"lire_token : word too large"<<endl;
token[client_cursor-1]='\0';
if (client_cursor == WORD_SIZE){
cout << "lire_token : word too large" << endl;
token[client_cursor-1] = '\0';
return;
}
}
}
}
bool TokenSource::ensure_capacity(){
if (cursor>=buffer_size){
if (!fill_buffer()){
eof = true;
return true;
}
cursor=0;
if (cursor >= buffer_size){
if (!fill_buffer()){
eof = true;
return true;
}
cursor = 0;
}
return false;
}
void TokenSource::build_line_breaks(){
while(buffer[cursor]=='\n'){
cursor++;
if (ensure_capacity())
break;
}
token[client_cursor++]='\n';
}
while(buffer[cursor] == '\n'){
cursor ++;
if (ensure_capacity())
break;
}
token[client_cursor ++] = '\n';
}
TokenSource::~TokenSource(){
file.close();
file.close();
}
void TokenSource::build_definition_starter()
{
cursor++;
ensure_capacity();
token[client_cursor++]='%';
cursor ++;
ensure_capacity();
token[client_cursor ++] = '%';
}
char *TokenSource::lire_token(){
//regexp recognition
//a token is
//(1) a line break
//(2) composite : a char buffer delimited by \"
//(3) a char buffer delimited by space
//regexp recognition
//a token is
//(1) a line break
//(2) composite : a char buffer delimited by \"
//(3) a char buffer delimited by space
client_cursor = 0;
......@@ -138,16 +138,16 @@ char *TokenSource::lire_token(){
if(go_to_next_token())
return NULL;
if (buffer[cursor]=='\n')
if (buffer[cursor] == '\n')
build_line_breaks();
else if (buffer[cursor]=='%')
else if (buffer[cursor] == '%')
build_definition_starter();
else if (buffer[cursor]!='"')
else if (buffer[cursor] != '"')
build_simple_token();
else
build_composite_token();
token[client_cursor]='\0';
token[client_cursor] = '\0';
return token;
......
#ifndef TOKENSOURCE_HPP_INCLUDED
#define TOKENSOURCE_HPP_INCLUDED
#ifndef TOKENSOURCE_HPP
#define TOKENSOURCE_HPP
#define BUFFER_SIZE 2048
#define WORD_SIZE 64
#include <fstream>
#include <iostream>
using namespace std;
/*! \class TokenSource supply tokens from a file trace. Tokens are word unit used in PajeFile trace formats*/
/*!
* \class TokenSource supply tokens from a file trace. Tokens are word unit used in PajeFile trace formats.
*/
class TokenSource{
private:
......@@ -41,4 +40,4 @@ class TokenSource{
};
#endif // TOKEN_HPP_INCLUDED
#endif // TOKENSOURCE_HPP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Definition.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>Definition.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef DEFINITION_HPP</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define DEFINITION_HPP</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#define INTEGER 0</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define COLOR 1</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor">#define STRING 2</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define DATE 3</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00013"></a><a class="code" href="classDefinition.html">00013</a> <span class="keyword">class </span><a class="code" href="classDefinition.html">Definition</a>{
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="keyword">struct </span>champs {
<a name="l00016"></a>00016 std::string name;
<a name="l00017"></a>00017 <span class="keywordtype">int</span> type;
<a name="l00018"></a>00018 };
<a name="l00019"></a>00019
<a name="l00020"></a>00020 std::vector&lt;champs&gt; compulsory;
<a name="l00021"></a>00021 std::vector&lt;champs&gt; notcompulsory;
<a name="l00022"></a>00022 std::string Eventname;
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="keyword">private</span>:
<a name="l00029"></a>00029 <span class="keywordtype">int</span> typetoint(std::string);
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="keyword">public</span>:
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00039"></a>00039 <a class="code" href="classDefinition.html#de087d00efc14ca3a7bbe191f3656f4c" title=": constructor">Definition</a>(std::string&amp; eventname);
<a name="l00040"></a>00040
<a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="classDefinition.html#1c05be0fc9e0ea2931f8bd15d33ebb93" title=": add a field to definition">store</a>(std::string name,std::string value);
<a name="l00047"></a>00047
<a name="l00048"></a>00048
<a name="l00049"></a>00049
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classDefinition.html#10473299c28a8dd88cbeda7c33df2b89" title=": print() : display the definitions">print</a>();
<a name="l00056"></a>00056
<a name="l00057"></a>00057 }
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="preprocessor">#endif // DEFINITION_HPP</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Feb 3 18:14:58 2009 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Line.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>Line.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef LINE_HPP</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define LINE_HPP</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#define BUFFSIZE 256</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00012"></a><a class="code" href="classLine.html">00012</a> <span class="keyword">class </span><a class="code" href="classLine.html">Line</a>{
<a name="l00013"></a>00013
<a name="l00014"></a>00014 <span class="keyword">private</span>:
<a name="l00015"></a>00015
<a name="l00016"></a>00016 std::vector&lt;std::string&gt; tokens;
<a name="l00017"></a>00017
<a name="l00018"></a>00018
<a name="l00019"></a>00019
<a name="l00020"></a>00020
<a name="l00021"></a>00021
<a name="l00022"></a>00022
<a name="l00026"></a>00026 <span class="keywordtype">void</span> tokenize();
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="keyword">public</span>:
<a name="l00034"></a>00034 <a class="code" href="classLine.html#cc11b8a429d8cdd63ba6803dff5602b3" title="Constructor.">Line</a>();
<a name="l00040"></a>00040 <a class="code" href="classLine.html#cc11b8a429d8cdd63ba6803dff5602b3" title="Constructor.">Line</a>(<a class="code" href="classLine.html">Line</a> &amp;);
<a name="l00041"></a>00041
<a name="l00046"></a>00046 <a class="code" href="classLine.html#abe85f48d22d92b62257091f48174fac" title="Destructor Destroy the line.">~Line</a>();
<a name="l00047"></a>00047
<a name="l00052"></a>00052 <span class="keywordtype">bool</span> <a class="code" href="classLine.html#dd1caa070aca84470bd2469c11024711">starts_with</a>(std::string &amp;);
<a name="l00053"></a>00053
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="classLine.html#dc553f616438f6de04b83d9b83acee20" title="store() read the next line and divide into tokens">store</a>(std::ifstream &amp;);
<a name="l00059"></a>00059
<a name="l00060"></a>00060
<a name="l00065"></a>00065 <span class="keywordtype">bool</span> <a class="code" href="classLine.html#cdd062b6a8147e4bb1b7a7352d67fe23" title="line compare">operator== </a>(std::string &amp;);
<a name="l00066"></a>00066
<a name="l00071"></a>00071 std::string&amp; <a class="code" href="classLine.html#0e5f64922c4ba654235f7f0c688344b1" title="the ith token in the line">item</a> (<span class="keywordtype">int</span> i );
<a name="l00072"></a>00072
<a name="l00073"></a>00073
<a name="l00074"></a>00074
<a name="l00075"></a>00075
<a name="l00080"></a>00080 <span class="keywordtype">int</span> <a class="code" href="classLine.html#1fa8a36f5fe5e37b3008337294c84ea7" title="number of token">length</a>();
<a name="l00081"></a>00081
<a name="l00082"></a>00082 };
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="preprocessor">#endif // LINE_HPP</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Feb 3 18:14:58 2009 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Line.hpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Line.hpp File Reference</h1><code>#include &lt;string&gt;</code><br>
<p>
<a href="Line_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>Line</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Contains the definition of a line. </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 29 17:52:12 2009 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ParserDefinitionDecoder.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>ParserDefinitionDecoder.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PARSERDEFINITIONDECODER_HPP</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PARSERDEFINITIONDECODER_HPP</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include "Definition.hpp"</span>
<a name="l00006"></a>00006
<a name="l00013"></a><a class="code" href="classParserDefinitionDecoder.html">00013</a> <span class="keyword">class </span><a class="code" href="classParserDefinitionDecoder.html" title="Parse the definitions of the trace and stock them.">ParserDefinitionDecoder</a>{
<a name="l00014"></a>00014
<a name="l00020"></a>00020 <span class="keyword">private</span>:
<a name="l00022"></a>00022 Map&lt;int,Definition&gt; Definitions;
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="keyword">public</span>:
<a name="l00025"></a>00025 <span class="keywordtype">int</span> definitions_number();
<a name="l00026"></a>00026 <span class="keywordtype">void</span> store_definition(<a class="code" href="classLine.html">Line</a> &amp;, ifstream &amp;);
<a name="l00027"></a>00027 <a class="code" href="classDefinition.html">Definition</a>&amp; get_definition(<span class="keywordtype">int</span> i);
<a name="l00028"></a>00028
<a name="l00029"></a>00029 };
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#endif // PARSERDEFINITIONDECODER_HPP</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Feb 3 18:14:58 2009 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ParserEventDecoder.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>