GCC Code Coverage Report


Directory: ./
File: src/Representation/PWrapperTraitBackendManager.h
Date: 2025-12-15 11:32:44
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 3 3 100.0%
Branches: 4 7 57.1%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #ifndef __PWRAPPER_TRAIT_BACKEND_MANAGER_H__
8 #define __PWRAPPER_TRAIT_BACKEND_MANAGER_H__
9
10 #include "PAbstractTraitBackend.h"
11
12 typedef std::vector<PAbstractWrapperTraitBackend*> PVecWrapperTraitBackend;
13
14 ///@brief Manager of the Trait backends
15 class PWrapperTraitBackendManager{
16 public:
17 PWrapperTraitBackendManager();
18 virtual ~PWrapperTraitBackendManager();
19
20 ///Add a trait backend into the PWrapperTraitBackendManager
21 template<class Backend>
22 6 void addTraitBackend(){
23
4/7
✓ Branch 0 (2→3) taken 6 times.
✓ Branch 2 (3→4) taken 6 times.
✓ Branch 4 (4→5) taken 6 times.
✗ Branch 6 (5→6) not taken.
✓ Branch 7 (5→7) taken 6 times.
✗ Branch 8 (8→9) not taken.
✗ Branch 9 (8→10) not taken.
6 p_vecTrait.push_back(new Backend);
24 6 }
25
26 void headerExtraInclude(std::ofstream & fs, const GeneratorMode & mode) const;
27
28 void classMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
29 void classMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
30
31 void registerClassMember(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
32 void registerClassGetterSetter(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
33 void registerClassMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
34
35 void testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
36 void testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
37 void setupAddDependency(std::ofstream & fs, const GeneratorMode & mode) const;
38
39 void clear();
40 private:
41 void initialisationPWrapperTraitBackendManager();
42
43 ///Vector of the Trait backend
44 PVecWrapperTraitBackend p_vecTrait;
45 };
46
47
48
49 #endif
50
51