GCC Code Coverage Report


Directory: ./
File: src/Representation/PRustTraitBackendManager.cpp
Date: 2026-10-16 17:52:29
Exec Total Coverage
Lines: 29 29 100.0%
Functions: 8 9 88.9%
Branches: 16 17 94.1%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : LGPL-3.0-only
5 ****************************************/
6
7 #include "PRustTraitBackendManager.h"
8
9 ///Default constructor of PRustTraitBackendManager
10 1 PRustTraitBackendManager::PRustTraitBackendManager(){
11
1/1
✓ Branch 0 (3→4) taken 1 times.
1 initialisationPRustTraitBackendManager();
12 1 }
13
14 ///Destructor of PRustTraitBackendManager
15 1 PRustTraitBackendManager::~PRustTraitBackendManager(){
16 1 clear();
17 1 }
18
19 ///Add extra include on the header
20 /** @param[out] fs : file to be completed
21 * @param mode : mode of the generator
22 */
23 2 void PRustTraitBackendManager::headerExtraInclude(std::ofstream & fs, const GeneratorMode & mode) const{
24
2/2
✓ Branch 0 (16→3) taken 2 times.
✓ Branch 1 (16→17) taken 2 times.
8 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
25
1/1
✓ Branch 0 (5→6) taken 2 times.
2 (*it)->headerExtraInclude(fs, mode);
26 }
27 2 }
28
29 ///Implementation of the impl block methods
30 /** @param[out] fs : file to be completed
31 * @param classConfig : PClassConfig to be used
32 * @param mode : mode of the generator
33 */
34 2 void PRustTraitBackendManager::implMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
35
2/2
✓ Branch 0 (16→3) taken 2 times.
✓ Branch 1 (16→17) taken 2 times.
8 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
36
1/1
✓ Branch 0 (5→6) taken 2 times.
2 (*it)->implMethodDeclaration(fs, classConfig, mode);
37 }
38 2 }
39
40 ///Implementation of extra declarations
41 /** @param[out] fs : file to be completed
42 * @param classConfig : PClassConfig to be used
43 * @param mode : mode of the generator
44 */
45 2 void PRustTraitBackendManager::classExtraDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
46
2/2
✓ Branch 0 (16→3) taken 2 times.
✓ Branch 1 (16→17) taken 2 times.
8 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
47
1/1
✓ Branch 0 (5→6) taken 2 times.
2 (*it)->classExtraDeclaration(fs, classConfig, mode);
48 }
49 2 }
50
51 ///Implementation of test function
52 /** @param[out] fs : file to be completed
53 * @param classConfig : PClassConfig to be used
54 * @param mode : mode of the generator
55 */
56 3 void PRustTraitBackendManager::testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
57
2/2
✓ Branch 0 (16→3) taken 3 times.
✓ Branch 1 (16→17) taken 3 times.
12 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
58
1/1
✓ Branch 0 (5→6) taken 3 times.
3 (*it)->testFunction(fs, classConfig, mode);
59 }
60 3 }
61
62 ///Clear the PRustTraitBackendManager
63 1 void PRustTraitBackendManager::clear(){
64
2/2
✓ Branch 0 (21→7) taken 1 times.
✓ Branch 1 (21→22) taken 1 times.
5 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
65
1/2
✓ Branch 0 (9→10) taken 1 times.
✗ Branch 1 (9→11) not taken.
1 delete *it;
66 }
67 1 p_vecTrait.clear();
68 1 }
69
70 ///Initialisation function of the class PRustTraitBackendManager
71 1 void PRustTraitBackendManager::initialisationPRustTraitBackendManager(){
72
73 1 }
74