GCC Code Coverage Report


Directory: ./
File: src/Representation/PTraitBackendManager.cpp
Date: 2025-12-15 11:32:44
Exec Total Coverage
Lines: 57 57 100.0%
Functions: 15 16 93.8%
Branches: 37 38 97.4%

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 "PTraitBackendManager.h"
9
10 ///Default constructor of PTraitBackendManager
11 4 PTraitBackendManager::PTraitBackendManager(){
12
1/1
✓ Branch 0 (3→4) taken 4 times.
4 initialisationPTraitBackendManager();
13 4 }
14
15 ///Destructor of PTraitBackendManager
16 4 PTraitBackendManager::~PTraitBackendManager(){
17 4 clear();
18 4 }
19
20 ///Add extra include on the header
21 /** @param[out] fs : file to be completed
22 * @param mode : mode of the generator
23 */
24 4 void PTraitBackendManager::headerExtraInclude(std::ofstream & fs, const GeneratorMode & mode) const{
25
2/2
✓ Branch 0 (16→3) taken 31 times.
✓ Branch 1 (16→17) taken 4 times.
70 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
26
1/1
✓ Branch 0 (5→6) taken 31 times.
31 (*it)->headerExtraInclude(fs, mode);
27 }
28 4 }
29
30 ///Declaration of public methods
31 /** @param[out] fs : file to be completed
32 * @param classConfig : PClassConfig to be used
33 * @param mode : mode of the generator
34 */
35 5 void PTraitBackendManager::publicMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
36
2/2
✓ Branch 0 (16→3) taken 34 times.
✓ Branch 1 (16→17) taken 5 times.
78 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
37
1/1
✓ Branch 0 (5→6) taken 34 times.
34 (*it)->publicMethodDeclaration(fs, classConfig, mode);
38 }
39 5 }
40
41 ///Implementation of public methods
42 /** @param[out] fs : file to be completed
43 * @param classConfig : PClassConfig to be used
44 * @param mode : mode of the generator
45 */
46 6 void PTraitBackendManager::publicMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
47
2/2
✓ Branch 0 (16→3) taken 42 times.
✓ Branch 1 (16→17) taken 6 times.
96 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
48
1/1
✓ Branch 0 (5→6) taken 42 times.
42 (*it)->publicMethodImplementation(fs, classConfig, mode);
49 }
50 6 }
51
52 ///Declaration of protected methods
53 /** @param[out] fs : file to be completed
54 * @param classConfig : PClassConfig to be used
55 * @param mode : mode of the generator
56 */
57 5 void PTraitBackendManager::protectedMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
58
2/2
✓ Branch 0 (16→3) taken 34 times.
✓ Branch 1 (16→17) taken 5 times.
78 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
59
1/1
✓ Branch 0 (5→6) taken 34 times.
34 (*it)->protectedMethodDeclaration(fs, classConfig, mode);
60 }
61 5 }
62
63 ///Implementation of protected methods
64 /** @param[out] fs : file to be completed
65 * @param classConfig : PClassConfig to be used
66 * @param mode : mode of the generator
67 */
68 6 void PTraitBackendManager::protectedMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
69
2/2
✓ Branch 0 (16→3) taken 42 times.
✓ Branch 1 (16→17) taken 6 times.
96 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
70
1/1
✓ Branch 0 (5→6) taken 42 times.
42 (*it)->protectedMethodImplementation(fs, classConfig, mode);
71 }
72 6 }
73
74 ///Declaration of private methods
75 /** @param[out] fs : file to be completed
76 * @param classConfig : PClassConfig to be used
77 * @param mode : mode of the generator
78 */
79 5 void PTraitBackendManager::privateMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
80
2/2
✓ Branch 0 (16→3) taken 34 times.
✓ Branch 1 (16→17) taken 5 times.
78 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
81
1/1
✓ Branch 0 (5→6) taken 34 times.
34 (*it)->privateMethodDeclaration(fs, classConfig, mode);
82 }
83 5 }
84
85 ///Implementation of private methods
86 /** @param[out] fs : file to be completed
87 * @param classConfig : PClassConfig to be used
88 * @param mode : mode of the generator
89 */
90 6 void PTraitBackendManager::privateMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
91
2/2
✓ Branch 0 (16→3) taken 42 times.
✓ Branch 1 (16→17) taken 6 times.
96 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
92
1/1
✓ Branch 0 (5→6) taken 42 times.
42 (*it)->privateMethodImplementation(fs, classConfig, mode);
93 }
94 6 }
95
96
97 ///Declaration of extra functions
98 /** @param[out] fs : file to be completed
99 * @param classConfig : PClassConfig to be used
100 * @param mode : mode of the generator
101 */
102 6 void PTraitBackendManager::classExtraFunctionDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
103
2/2
✓ Branch 0 (16→3) taken 42 times.
✓ Branch 1 (16→17) taken 6 times.
96 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
104
1/1
✓ Branch 0 (5→6) taken 42 times.
42 (*it)->classExtraFunctionDeclaration(fs, classConfig, mode);
105 }
106 6 }
107
108 ///Implementation of extra functions
109 /** @param[out] fs : file to be completed
110 * @param classConfig : PClassConfig to be used
111 * @param mode : mode of the generator
112 */
113 6 void PTraitBackendManager::classExtraFunctionImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
114
2/2
✓ Branch 0 (16→3) taken 42 times.
✓ Branch 1 (16→17) taken 6 times.
96 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
115
1/1
✓ Branch 0 (5→6) taken 42 times.
42 (*it)->classExtraFunctionImplementation(fs, classConfig, mode);
116 }
117 6 }
118
119 ///Implementation of test function
120 /** @param[out] fs : file to be completed
121 * @param classConfig : PClassConfig to be used
122 * @param mode : mode of the generator
123 */
124 4 void PTraitBackendManager::testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
125
2/2
✓ Branch 0 (16→3) taken 32 times.
✓ Branch 1 (16→17) taken 4 times.
72 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
126
1/1
✓ Branch 0 (5→6) taken 32 times.
32 (*it)->testFunction(fs, classConfig, mode);
127 }
128 4 }
129
130 ///Call of the test function
131 /** @param[out] fs : file to be completed
132 * @param classConfig : PClassConfig to be used
133 * @param mode : mode of the generator
134 */
135 4 void PTraitBackendManager::testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{
136
2/2
✓ Branch 0 (16→3) taken 32 times.
✓ Branch 1 (16→17) taken 4 times.
72 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
137
1/1
✓ Branch 0 (5→6) taken 32 times.
32 (*it)->testCallFunction(fs, classConfig, mode);
138 }
139 4 }
140
141
142 ///Clear the PTraitBackendManager
143 4 void PTraitBackendManager::clear(){
144
2/2
✓ Branch 0 (21→7) taken 26 times.
✓ Branch 1 (21→22) taken 4 times.
64 for(PVecTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
145
1/2
✓ Branch 0 (9→10) taken 26 times.
✗ Branch 1 (9→11) not taken.
26 delete *it;
146 }
147 4 p_vecTrait.clear();
148 4 }
149
150 ///Initialisation function of the class PTraitBackendManager
151 4 void PTraitBackendManager::initialisationPTraitBackendManager(){
152
153 4 }
154
155
156
157
158
159