Skip to content

Commit

Permalink
Finished documentation (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
lfsjesus committed Nov 6, 2022
1 parent ccabd3f commit 63baea4
Show file tree
Hide file tree
Showing 204 changed files with 5,530 additions and 26 deletions.
3 changes: 2 additions & 1 deletion Classes/CourseUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class CourseUnit {

/**
* @brief
* Insere o nome de uma turma (turma1, turma2, ...) no set de turmas da classe
* O(log (n)).
* Insere o nome de uma turma (turma1, turma2, ...) no set de turmas da classe.
* @param _class
*/
void insertClass(string &_class);
Expand Down
12 changes: 6 additions & 6 deletions Classes/Managing.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class Managing {

/**
* @brief
* Lê todos os ficheiros TODO: quais?
* Lê todos os ficheiros: estudantes, horários, classes/UCs, requests e rejected requests.
*/
void readFiles();

const set<Student *, studComp> &getStudents() const;

/**
* O(n² - chama outra função O(n) dentro do loop O(n) TODO: concluir
* O(n² - chama outra função O(n) dentro do loop O(n)).
* @brief
* @param year
* @return set de pointers de estudantes de um dado ano ordenados por UP
Expand Down Expand Up @@ -83,14 +83,14 @@ class Managing {


/**
* O(1) se não receber argumento.
* O(1) se não receber argumento. O(n³).
* @param _classes
* @return vector de pares, número de alunos & turma
*/
vector<pair<int, Turma>> getOcupacaoTurmas(set<Turma> _classes = {});

/**
* O(1) se não receber argumento.
* O(1) se não receber argumento. O(n³).
* @param UCs
* @return vector de pares, número de alunos & UC
*/
Expand Down Expand Up @@ -138,7 +138,7 @@ class Managing {
bool checkBalancing(const Turma &turma);

/**
* O(n)
* O(n log(n))
* @param turma
* @return 1 se com a inscrição do aluno, o número de alunos for superior a 30 (CAP estipulado), else 0.
*/
Expand All @@ -157,7 +157,7 @@ class Managing {
void setRejectedRequests(const vector<Request *> &rejectedRequests);

/**
*brief
* @brief
* Atualiza o ficheiro dos students
*/
void writeStudents();
Expand Down
20 changes: 20 additions & 0 deletions Classes/Request.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,38 @@ class Request {

Request(unsigned int studentCode1, unsigned int studentCode2, const vector<Turma> &newClasses, string &type);

/**
* @brief
* Retorna o UP do estudante que efetuou o pedido. O(1).
* @return código UP do estudante.
*/
unsigned int getStudentCode1() const;

void setStudentCode1(unsigned int studentCode1);

/**
* @brief
* Retorna o UP de um possível segundo estudante envolvido num pedido. O(1).
* @return código UP do estudante.
*/
unsigned int getStudentCode2() const;

void setStudentCode2(unsigned int studentCode2);

/**
* @brief
* Retorna o um vector de turmas para as quais o estudante deseja ir. O(1).
* @return vector de turmas.
*/
const vector<Turma> &getNewClasses() const;

void setNewClasses(const vector<Turma> &newClasses);

/**
* @brief
* Retorna o nome de um estudante que esteja a ser inscrito pela primeira vez. O(1).
* @return nome do estudante.
*/
const string &getStudentName() const;

void setStudentName(const string &studentName);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Schedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Schedule {
friend ostream &operator<<(ostream &os, const Schedule &schedule);

/**
* O(n)
* O(n log(n))
* @brief
* Ordena os slots de um horário e elimina slots iguais, caso existam (horários de uma UC, onde aparece a mesma aula teórica múltiplas vezes).
*/
Expand Down
10 changes: 5 additions & 5 deletions Classes/Slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ class Slot {
void setTurma(const Turma &turma);

/**
* O(1)
* @brief
* Permite comparar dias da semana mais facilmente, atribuindo-lhes um número
* Permite comparar dias da semana mais facilmente, atribuindo-lhes um número. O(1).
* @param weekday
* @return número do dia da semana
* @return número do dia da semana.
*/
unsigned weekdayToNum(string weekday) const;

/**
* @brief
* Converte de decimal para formato horário.
* Converte de decimal para formato horário. O(1).
* @param _hours
* @return string com as horas no formato habitual.
*/
string convert_hours(float _hours) const;

/**
* Converte o dia da semana em inglês, para português. O(1).
* @param weekday
* @return dia da semana em português
* @return dia da semana em português.
*/
string to_portuguese(string weekday) const;

Expand Down
20 changes: 16 additions & 4 deletions Classes/Student.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class Student {

unsigned int getCode() const;

/**
* @brief
* Retorna o ano curricular do estudante de acordo com o critério do SIGARRA: o ano do estudante é o ano da UC de maior ano. O(n).
* @return ano curricular do estudante.
*/
unsigned int getYear() const;

void setCode(unsigned int code);
Expand All @@ -29,22 +34,25 @@ class Student {

void setName(const string &name);

/**
* @brief
* Retorna a lista de turmas do estudante. O(1).
* @return lista de turmas do estudante.
*/
const list<Turma> &getClasses() const;

void setClasses(const list<Turma> &classes);

/**
* O(1)
* @brief
* Adiciona uma turma a um estudante
* Adiciona uma turma a um estudante. O(1).
* @param _class
*/
void addClass(Turma _class);

/**
* O(n)
* @brief
* Elimina turma de um estudante
* Elimina turma de um estudante. O(n).
* @param _class
*/
void removeClass(Turma _class);
Expand All @@ -53,6 +61,10 @@ class Student {

friend ostream &operator<<(ostream &os, const Student &student);

/**
* @brief
* Imprime as turmas de um estudante.
*/
void printClasses();

bool operator<(const Student &rhs) const;
Expand Down
6 changes: 0 additions & 6 deletions Classes/Turma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ Turma::Turma(const string &classCode) {
this->classCode = classCode;
}

/**
* just checking if this works
* @param classCode
* @param ucCode
*/

Turma::Turma(const string &classCode, const string &ucCode) {
this->classCode = classCode;
this->ucCode = ucCode;
Expand Down
10 changes: 10 additions & 0 deletions Classes/Turma.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,22 @@ class Turma {

Turma(const string &classCode);

/**
* @brief
* Retorna o código da turma. O(1).
* @return código da turma.
*/
const string &getClassCode() const;

void setClassCode(const string &classCode);

bool operator<(const Turma &rhs) const;

/**
* @brief
* Retorna o código da UC. O(1).
* @return código da UC.
*/
const string &getUcCode() const;

void setUcCode(const string &ucCode);
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PROJECT_NUMBER = 1
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = This tool is designed to manage L.EIC students' schedules
PROJECT_BRIEF = This tool is designed to manage L.EIC students' schedules.

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
128 changes: 128 additions & 0 deletions docs/html/Comparators_8cpp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Gestor de Horários: Classes/Comparators.cpp File 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">Gestor de Horários
&#160;<span id="projectnumber">1</span>
</div>
<div id="projectbrief">This tool is designed to manage L.EIC students&#39; schedules</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</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_0c68614ac8d8401edbf4146ded722294.html">Classes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">Comparators.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="Student_8h_source.html">Student.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="Schedule_8h_source.html">Schedule.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for Comparators.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="Comparators_8cpp__incl.png" border="0" usemap="#aClasses_2Comparators_8cpp" alt=""/></div>
<map name="aClasses_2Comparators_8cpp" id="aClasses_2Comparators_8cpp">
<area shape="rect" title=" " alt="" coords="225,5,412,32"/>
<area shape="rect" href="Student_8h.html" title=" " alt="" coords="318,80,402,107"/>
<area shape="rect" href="Schedule_8h.html" title=" " alt="" coords="229,155,323,181"/>
<area shape="rect" title=" " alt="" coords="5,379,85,405"/>
<area shape="rect" title=" " alt="" coords="453,379,515,405"/>
<area shape="rect" title=" " alt="" coords="423,229,465,256"/>
<area shape="rect" title=" " alt="" coords="397,155,440,181"/>
<area shape="rect" href="Turma_8h.html" title=" " alt="" coords="404,304,479,331"/>
<area shape="rect" href="Slot_8h.html" title=" " alt="" coords="213,229,272,256"/>
<area shape="rect" title=" " alt="" coords="108,304,193,331"/>
<area shape="rect" title=" " alt="" coords="217,304,292,331"/>
<area shape="rect" title=" " alt="" coords="317,304,379,331"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="Comparators_8cpp__dep__incl.png" border="0" usemap="#aClasses_2Comparators_8cppdep" alt=""/></div>
<map name="aClasses_2Comparators_8cppdep" id="aClasses_2Comparators_8cppdep">
<area shape="rect" title=" " alt="" coords="66,5,253,32"/>
<area shape="rect" href="Managing_8h.html" title=" " alt="" coords="83,80,235,107"/>
<area shape="rect" href="Managing_8cpp.html" title=" " alt="" coords="5,155,172,181"/>
<area shape="rect" href="menu_8h.html" title=" " alt="" coords="196,155,267,181"/>
<area shape="rect" href="main_8cpp.html" title=" " alt="" coords="135,229,218,256"/>
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="243,229,329,256"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstudComp.html">studComp</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structschedComp.html">schedComp</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstudentByName.html">studentByName</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstudentByNUCS.html">studentByNUCS</a></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="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
8 changes: 8 additions & 0 deletions docs/html/Comparators_8cpp__dep__incl.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<map id="Classes/Comparators.cpp" name="Classes/Comparators.cpp">
<area shape="rect" id="node1" title=" " alt="" coords="66,5,253,32"/>
<area shape="rect" id="node2" href="$Managing_8h.html" title=" " alt="" coords="83,80,235,107"/>
<area shape="rect" id="node3" href="$Managing_8cpp.html" title=" " alt="" coords="5,155,172,181"/>
<area shape="rect" id="node4" href="$menu_8h.html" title=" " alt="" coords="196,155,267,181"/>
<area shape="rect" id="node5" href="$main_8cpp.html" title=" " alt="" coords="135,229,218,256"/>
<area shape="rect" id="node6" href="$menu_8cpp.html" title=" " alt="" coords="243,229,329,256"/>
</map>
1 change: 1 addition & 0 deletions docs/html/Comparators_8cpp__dep__incl.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b84ab9c9e29c1d352ee6b0c1f87bc0a5
Binary file added docs/html/Comparators_8cpp__dep__incl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/html/Comparators_8cpp__incl.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<map id="Classes/Comparators.cpp" name="Classes/Comparators.cpp">
<area shape="rect" id="node1" title=" " alt="" coords="225,5,412,32"/>
<area shape="rect" id="node2" href="$Student_8h.html" title=" " alt="" coords="318,80,402,107"/>
<area shape="rect" id="node8" href="$Schedule_8h.html" title=" " alt="" coords="229,155,323,181"/>
<area shape="rect" id="node3" title=" " alt="" coords="5,379,85,405"/>
<area shape="rect" id="node4" title=" " alt="" coords="453,379,515,405"/>
<area shape="rect" id="node5" title=" " alt="" coords="423,229,465,256"/>
<area shape="rect" id="node6" title=" " alt="" coords="397,155,440,181"/>
<area shape="rect" id="node7" href="$Turma_8h.html" title=" " alt="" coords="404,304,479,331"/>
<area shape="rect" id="node9" href="$Slot_8h.html" title=" " alt="" coords="213,229,272,256"/>
<area shape="rect" id="node10" title=" " alt="" coords="108,304,193,331"/>
<area shape="rect" id="node11" title=" " alt="" coords="217,304,292,331"/>
<area shape="rect" id="node12" title=" " alt="" coords="317,304,379,331"/>
</map>
1 change: 1 addition & 0 deletions docs/html/Comparators_8cpp__incl.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0f9147b11a5d28ddf8bf1e0c587b518e
Binary file added docs/html/Comparators_8cpp__incl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 63baea4

Please sign in to comment.