Skip to content

Commit

Permalink
Add doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
abyfall committed Dec 8, 2017
1 parent bc6fa37 commit c61ea94
Show file tree
Hide file tree
Showing 108 changed files with 8,398 additions and 1 deletion.
2,494 changes: 2,494 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

Binary file added client/bin/AlloHoustonClient
Binary file not shown.
2 changes: 1 addition & 1 deletion client/sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define SIZE_MSG 1024

/**
* @file main.c
* @file client/main.c
* @date 5 Dec 2017
* @brief Main du client
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Allo Houston: /home/abyfall/Projet/AlloHouston/serveur/sources/train.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Allo Houston
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle">
<div class="title">/home/abyfall/Projet/AlloHouston/serveur/sources/train.c</div> </div>
</div><!--header-->
<div class="contents">
<p>char *nomFichier = "../ressources/Trains.txt"; Train **listeTrain; int nbTrain; listeTrain = trainFromFile(nomFichier, &amp;nbTrain); // Récupération de la liste de train</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;../headers/temps.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;../headers/train.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;../headers/outils.h&quot;</span></div><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"></div><div class="line"><span class="keywordtype">void</span> printTrain(Train* train)</div><div class="line">{</div><div class="line"> printf(<span class="stringliteral">&quot;%d : %s -&gt; %s Départ %d:%d arrivée %d:%d Prix : %f Reduc : %d&quot;</span>, train-&gt;id, train-&gt;villeDepart, train-&gt;villeArrivee, train-&gt;heureDepart-&gt;heure, train-&gt;heureDepart-&gt;minute, train-&gt;heureArrivee-&gt;heure, train-&gt;heureArrivee-&gt;minute, train-&gt;prix, train-&gt;reduc);</div><div class="line">}</div><div class="line"></div><div class="line">Train* <a name="a0"></a><a class="code" href="train_8c.html#aed8aaf00ced6d9a3121352a88c2f8c23">trainFromCSV</a>(<span class="keywordtype">char</span>* csv)</div><div class="line">{</div><div class="line"> <span class="keyword">struct </span>Train* train = malloc(<span class="keyword">sizeof</span>(Train));</div><div class="line"> <span class="keywordtype">char</span> *token, *str, *tofree;</div><div class="line"> tofree = str = strdup(csv); <span class="comment">// We own str&#39;s memory now.</span></div><div class="line"> <span class="comment">// id</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> train-&gt;id = atoi(token);</div><div class="line"></div><div class="line"> <span class="comment">// villeDepart</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> <a name="a1"></a><a class="code" href="outils_8c.html#a687ea0d581d240391192e821e70ab607">strToUpper</a>(token); <span class="comment">// On met le nom de ville en majuscule</span></div><div class="line"> train-&gt;villeDepart = strdup(token);</div><div class="line"></div><div class="line"> <span class="comment">// villeArrivee</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> <a class="code" href="outils_8c.html#a687ea0d581d240391192e821e70ab607">strToUpper</a>(token); <span class="comment">// On met le nom de ville en majuscule</span></div><div class="line"> train-&gt;villeArrivee = strdup(token);</div><div class="line"></div><div class="line"> <span class="comment">// heureDepart</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> <span class="keyword">struct </span>Temps* heureDepart = malloc(<span class="keyword">sizeof</span>(Temps));</div><div class="line"> heureDepart = <a name="a2"></a><a class="code" href="temps_8c.html#a81e0f2549d4dd4dcb072ae1086bb65dc">tempsFromCSV</a>(token);</div><div class="line"> train-&gt;heureDepart = heureDepart;</div><div class="line"></div><div class="line"> <span class="comment">// heureArrivee</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> <span class="keyword">struct </span>Temps* heureArrivee = malloc(<span class="keyword">sizeof</span>(Temps));</div><div class="line"> heureArrivee = <a class="code" href="temps_8c.html#a81e0f2549d4dd4dcb072ae1086bb65dc">tempsFromCSV</a>(token);</div><div class="line"> train-&gt;heureArrivee = heureArrivee;</div><div class="line"></div><div class="line"> <span class="comment">// prix</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> train-&gt;prix = atof(token);</div><div class="line"></div><div class="line"> <span class="comment">// reduc</span></div><div class="line"> token = strsep(&amp;str, <span class="stringliteral">&quot;;&quot;</span>);</div><div class="line"> <span class="keywordflow">if</span> (token != NULL)</div><div class="line"> {</div><div class="line"> <a class="code" href="outils_8c.html#a687ea0d581d240391192e821e70ab607">strToUpper</a>(token); <span class="comment">// On met la reduc ou supp en majuscule</span></div><div class="line"> <span class="keywordtype">int</span> len = strlen(token);</div><div class="line"> token[len-1] = <span class="charliteral">&#39;\0&#39;</span>;</div><div class="line"> <span class="keywordflow">if</span> (strcmp(token, <span class="stringliteral">&quot;REDUC&quot;</span>) == 0)</div><div class="line"> {</div><div class="line"> train-&gt;reduc = 1;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (strcmp(token, <span class="stringliteral">&quot;SUPPL&quot;</span>) == 0)</div><div class="line"> {</div><div class="line"> train-&gt;reduc = -1;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> train-&gt;reduc = 0;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> free(tofree); <span class="comment">// We free the str we made</span></div><div class="line"> <span class="keywordflow">return</span> train;</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line">Train * <a name="a3"></a><a class="code" href="train_8c.html#ab3d507e8de3d02f93aa66801142d4840">trainFromFile</a>(<span class="keywordtype">char</span>* nomFichier, <span class="keywordtype">int</span>* nbTrain){</div><div class="line"> Train * listeToutTrain;</div><div class="line"> FILE *fichier = fopen ( nomFichier, <span class="stringliteral">&quot;r&quot;</span> );</div><div class="line"> <span class="keywordtype">int</span> compteLigne = 0;</div><div class="line"> <span class="keywordflow">if</span> (fichier != NULL)</div><div class="line"> {</div><div class="line"> <span class="keywordtype">char</span> ligne [ 256 ];</div><div class="line"> <span class="keywordtype">int</span> lineCount = 0;</div><div class="line"> <span class="keywordflow">while</span> (fgets(ligne, <span class="keyword">sizeof</span> ligne, fichier) != NULL) <span class="comment">/* lit une ligne */</span></div><div class="line"> {</div><div class="line"> compteLigne ++;</div><div class="line"> }</div><div class="line"> printf(<span class="stringliteral">&quot;%d ligne dans le fichier Trains.txt\n&quot;</span>, compteLigne);</div><div class="line"> rewind(fichier);</div><div class="line"> listeToutTrain = malloc(compteLigne * <span class="keyword">sizeof</span>(Train));</div><div class="line"> <span class="keywordflow">while</span> (fgets ( ligne, <span class="keyword">sizeof</span> ligne, fichier ) != NULL) <span class="comment">/* lit une ligne */</span></div><div class="line"> {</div><div class="line"> *(listeToutTrain + lineCount) = *<a class="code" href="train_8c.html#aed8aaf00ced6d9a3121352a88c2f8c23">trainFromCSV</a>(ligne);</div><div class="line"> lineCount ++;</div><div class="line"> }</div><div class="line"> fclose (fichier);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> perror ( nomFichier ); <span class="comment">/* Pourquoi le fichier ne s&#39;est pas ouvert ? */</span></div><div class="line"> }</div><div class="line"> *nbTrain = compteLigne;</div><div class="line"> <span class="keywordflow">return</span> listeToutTrain;</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
Binary file added doc/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/html/bdwn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/html/closed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions doc/html/dir_17197e2a5901f70601536f515e8d47d9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Allo Houston: serveur Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Allo Houston
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_17197e2a5901f70601536f515e8d47d9.html">serveur</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">serveur Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
96 changes: 96 additions & 0 deletions doc/html/dir_60c804fded23a45d56f6ac5c71f22e2d.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Allo Houston: serveur/sources Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Allo Houston
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_17197e2a5901f70601536f515e8d47d9.html">serveur</a></li><li class="navelem"><a class="el" href="dir_60c804fded23a45d56f6ac5c71f22e2d.html">sources</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">sources Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:outils_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outils_8c.html">outils.c</a></td></tr>
<tr class="memdesc:outils_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fichier contenant les méthodes utiles à toutes les parties du programme et non spécifique à une structure. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:requetes_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="requetes_8c.html">requetes.c</a></td></tr>
<tr class="memdesc:requetes_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Traitement des différentes requetes possibles. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:service_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="service_8c.html">service.c</a></td></tr>
<tr class="memdesc:service_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fichier permettant la création d'un nouveau service. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:temps_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="temps_8c.html">temps.c</a></td></tr>
<tr class="memdesc:temps_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fichier contenant les méthodes pour la structure temps. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:train_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="train_8c.html">train.c</a></td></tr>
<tr class="memdesc:train_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fichier contenant les méthodes pour la structure Train. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
Loading

0 comments on commit c61ea94

Please sign in to comment.