GCC Code Coverage Report


Directory: ./
File: src/Representation/PNanobindTraitBackendManager.h
Date: 2026-01-30 16:30:53
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 7 7 100.0%
Branches: 4 7 57.1%

Line Branch Exec Source
1 /***************************************
2 Auteur : Thibaut Oprinsen
3 Mail : thibaut.oprinsen@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #ifndef __PNANOBIND_WRAPPER_TRAIT_BACKEND_MANAGER_H__
8 #define __PNANOBIND_WRAPPER_TRAIT_BACKEND_MANAGER_H__
9
10 #include <set>
11 #include "PAbstractTraitBackend.h"
12
13 typedef std::vector<PAbstractNanobindTraitBackend*> PVecNanobindTraitBackend;
14
15 ///@brief Manager of the Trait backends
16 class PNanobindTraitBackendManager{
17 public:
18 PNanobindTraitBackendManager();
19 virtual ~PNanobindTraitBackendManager();
20
21 ///Add a trait backend into the PTraitBackendManager
22 template<class Backend>
23 7 void addTraitBackend(){
24
4/7
✓ Branch 0 (2→3) taken 7 times.
✓ Branch 2 (3→4) taken 7 times.
✓ Branch 4 (4→5) taken 7 times.
✗ Branch 6 (5→6) not taken.
✓ Branch 7 (5→7) taken 7 times.
✗ Branch 8 (8→9) not taken.
✗ Branch 9 (8→10) not taken.
7 p_vecTrait.push_back(new Backend);
25 7 }
26
27 virtual void headerExtraInclude(std::set<std::string> & setInclude, const PClassConfig & classConfig, const GeneratorMode & mode) const;
28 virtual void headerTestInclude(std::ofstream & fs, const GeneratorMode & mode, const PString & baseFileName) const;
29
30 virtual void registerProperty(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
31 virtual void registerConstructor(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
32 virtual void registerStaticMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
33 virtual void registerMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
34
35 virtual void testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode, const PString & baseFileName) const;
36 virtual void testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const;
37 void clear();
38
39 private:
40 void initialisationPNanobindTraitBackendManager();
41
42 ///True if the property or function is the last one to be declared
43 bool isLastDef;
44 ///Vector of the Trait backend
45 PVecNanobindTraitBackend p_vecTrait;
46 };
47
48
49
50 #endif
51
52