Directory: | ./ |
---|---|
File: | tmp_project/PhoenixTex2Html/src/PLatexObj/updateMenu.cpp |
Date: | 2025-03-24 18:12:43 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 11 | 11 | 100.0% |
Branches: | 17 | 19 | 89.5% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /*************************************** | ||
2 | Auteur : Pierre Aubert | ||
3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
4 | Licence : CeCILL-C | ||
5 | ****************************************/ | ||
6 | |||
7 | |||
8 | #include "updateMenu.h" | ||
9 | |||
10 | ///Update the menu of the latex obj | ||
11 | /** @param[out] outputMode : output mode of the html backend | ||
12 | * @param[out] obj : PLatexObj to be updated | ||
13 | */ | ||
14 | 589 | void updateMenu(POutoutMode & outputMode, PLatexObj & obj){ | |
15 |
4/6✓ Branch 1 taken 127 times.
✓ Branch 2 taken 462 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 127 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 589 times.
|
589 | if(!isSection(obj) && obj.getType() != PLatexType::FILE){return;} |
16 | 589 | PVecLatexObj & vecObj = obj.getVecContent(); | |
17 |
2/2✓ Branch 4 taken 12500 times.
✓ Branch 5 taken 589 times.
|
13089 | for(PVecLatexObj::iterator it(vecObj.begin()); it != vecObj.end(); ++it){ |
18 |
3/3✓ Branch 2 taken 12500 times.
✓ Branch 4 taken 12038 times.
✓ Branch 5 taken 462 times.
|
12500 | if(!isSection(*it)){continue;} |
19 |
1/1✓ Branch 1 taken 462 times.
|
462 | PLatexMenu menu; |
20 |
2/2✓ Branch 2 taken 462 times.
✓ Branch 5 taken 462 times.
|
462 | menu.setLink(it->getLink()); |
21 | // menu.setText(it->getName()); | ||
22 |
2/2✓ Branch 2 taken 462 times.
✓ Branch 5 taken 462 times.
|
462 | menu.setText(getSectionTitle(outputMode, *it)); |
23 |
2/2✓ Branch 1 taken 462 times.
✓ Branch 4 taken 462 times.
|
462 | obj.getVecMenu().push_back(menu); |
24 |
1/1✓ Branch 2 taken 462 times.
|
462 | updateMenu(outputMode, *it); |
25 | 462 | } | |
26 | } | ||
27 | |||
28 | |||
29 |