Directory: | ./ |
---|---|
File: | tmp_project/PhoenixTex2Html/src/PLatexObj/platexobj_updateId.cpp |
Date: | 2025-03-24 18:12:43 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 12 | 12 | 100.0% |
Branches: | 6 | 6 | 100.0% |
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 "platexobj_updateId.h" | ||
9 | |||
10 | ///Update the id of the PLatexObj | ||
11 | /** @param[out] obj : PLatexObj to be updated | ||
12 | * @param[out] id : current id | ||
13 | */ | ||
14 | 21258 | void platexobj_updateId(PLatexObj & obj, long unsigned int & id){ | |
15 | 21258 | obj.setId(id); | |
16 | 21258 | ++id; | |
17 | 21258 | PVecLatexObj & vecContent = obj.getVecContent(); | |
18 |
2/2✓ Branch 1 taken 5457 times.
✓ Branch 2 taken 15801 times.
|
21258 | if(vecContent.size() != 0lu){ |
19 |
2/2✓ Branch 4 taken 21131 times.
✓ Branch 5 taken 5457 times.
|
26588 | for(PVecLatexObj::iterator it(vecContent.begin()); it != vecContent.end(); ++it){ |
20 |
1/1✓ Branch 2 taken 21131 times.
|
21131 | platexobj_updateId(*it, id); |
21 | } | ||
22 | } | ||
23 | 21258 | } | |
24 | |||
25 | ///Update the id of the PLatexObj | ||
26 | /** @param[out] obj : PLatexObj to be updated | ||
27 | */ | ||
28 | 127 | void platexobj_updateId(PLatexObj & obj){ | |
29 | 127 | long unsigned int id(0lu); | |
30 |
1/1✓ Branch 1 taken 127 times.
|
127 | platexobj_updateId(obj, id); |
31 | 127 | } | |
32 | |||
33 | |||
34 |