PhoenixGenerator  2.2.0
Set of tools to generate code
Loading...
Searching...
No Matches
PNanobindTraitBackendManager Class Reference

Manager of the Trait backends. More...

#include <PNanobindTraitBackendManager.h>

Public Member Functions

template<class Backend>
void addTraitBackend ()
 Add a trait backend into the PTraitBackendManager.
 
void clear ()
 Clear the PNanobindTraitBackendManager.
 
virtual void headerExtraInclude (std::set< std::string > &setInclude, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Add extra include on the header.
 
virtual void headerTestInclude (std::ofstream &fs, const GeneratorMode &mode, const PString &baseFileName) const
 Add extra include on the test header.
 
 PNanobindTraitBackendManager ()
 Default constructor of PNanobindTraitBackendManager.
 
virtual void registerConstructor (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Registration of constructor.
 
virtual void registerMethod (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Registration of method.
 
virtual void registerProperty (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Registration of property.
 
virtual void registerStaticMethod (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Registration of static method.
 
virtual void testCallFunction (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Call of the test function.
 
virtual void testFunction (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode, const PString &baseFileName) const
 Implementation of test function.
 
virtual ~PNanobindTraitBackendManager ()
 Destructor of PNanobindTraitBackendManager.
 

Private Member Functions

void initialisationPNanobindTraitBackendManager ()
 Initialisation function of the class PNanobindTraitBackendManager.
 

Private Attributes

bool isLastDef
 True if the property or function is the last one to be declared.
 
PVecNanobindTraitBackend p_vecTrait
 Vector of the Trait backend.
 

Detailed Description

Manager of the Trait backends.

Definition at line 16 of file PNanobindTraitBackendManager.h.

Constructor & Destructor Documentation

◆ PNanobindTraitBackendManager()

PNanobindTraitBackendManager::PNanobindTraitBackendManager ( )

Default constructor of PNanobindTraitBackendManager.

Definition at line 10 of file PNanobindTraitBackendManager.cpp.

10 {
12}
void initialisationPNanobindTraitBackendManager()
Initialisation function of the class PNanobindTraitBackendManager.

References initialisationPNanobindTraitBackendManager().

+ Here is the call graph for this function:

◆ ~PNanobindTraitBackendManager()

PNanobindTraitBackendManager::~PNanobindTraitBackendManager ( )
virtual

Destructor of PNanobindTraitBackendManager.

Definition at line 15 of file PNanobindTraitBackendManager.cpp.

15 {
16 clear();
17}
void clear()
Clear the PNanobindTraitBackendManager.

References clear().

+ Here is the call graph for this function:

Member Function Documentation

◆ addTraitBackend()

template<class Backend>
void PNanobindTraitBackendManager::addTraitBackend ( )
inline

Add a trait backend into the PTraitBackendManager.

Definition at line 23 of file PNanobindTraitBackendManager.h.

23 {
24 p_vecTrait.push_back(new Backend);
25 }
PVecNanobindTraitBackend p_vecTrait
Vector of the Trait backend.

References p_vecTrait.

Referenced by generateNanobindClassesFull().

+ Here is the caller graph for this function:

◆ clear()

void PNanobindTraitBackendManager::clear ( )

Clear the PNanobindTraitBackendManager.

Definition at line 107 of file PNanobindTraitBackendManager.cpp.

107 {
108 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
109 delete *it;
110 }
111 p_vecTrait.clear();
112}

References p_vecTrait.

Referenced by ~PNanobindTraitBackendManager().

+ Here is the caller graph for this function:

◆ headerExtraInclude()

void PNanobindTraitBackendManager::headerExtraInclude ( std::set< std::string > & setInclude,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Add extra include on the header.

Parameters
[out]setInclude: set of all includes
[out]fs: file to be completed
mode: mode of the generator

Definition at line 24 of file PNanobindTraitBackendManager.cpp.

24 {
25 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
26 (*it)->headerExtraInclude(setInclude, classConfig, mode);
27 }
28}

References p_vecTrait.

Referenced by generator_nanobind_class().

+ Here is the caller graph for this function:

◆ headerTestInclude()

void PNanobindTraitBackendManager::headerTestInclude ( std::ofstream & fs,
const GeneratorMode & mode,
const PString & baseFileName ) const
virtual

Add extra include on the test header.

Parameters
[out]fs: file to be completed
mode: mode of the generator

Definition at line 34 of file PNanobindTraitBackendManager.cpp.

34 {
35 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
36 (*it)->headerTestInclude(fs, mode, baseFileName);
37 }
38}

References p_vecTrait.

Referenced by generator_nanobind_test().

+ Here is the caller graph for this function:

◆ initialisationPNanobindTraitBackendManager()

void PNanobindTraitBackendManager::initialisationPNanobindTraitBackendManager ( )
private

Initialisation function of the class PNanobindTraitBackendManager.

Definition at line 115 of file PNanobindTraitBackendManager.cpp.

115 {
116
117}

Referenced by PNanobindTraitBackendManager().

+ Here is the caller graph for this function:

◆ registerConstructor()

void PNanobindTraitBackendManager::registerConstructor ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Registration of constructor.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 78 of file PNanobindTraitBackendManager.cpp.

78 {
79 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
80 (*it)->registerConstructor(fs, classConfig, mode);;
81 }
82}

References p_vecTrait.

Referenced by generator_nanobind_class().

+ Here is the caller graph for this function:

◆ registerMethod()

void PNanobindTraitBackendManager::registerMethod ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Registration of method.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 56 of file PNanobindTraitBackendManager.cpp.

56 {
57 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
58 (*it)->registerMethod(fs, classConfig, mode);;
59 }
60}

References p_vecTrait.

Referenced by generator_nanobind_class().

+ Here is the caller graph for this function:

◆ registerProperty()

void PNanobindTraitBackendManager::registerProperty ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Registration of property.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 45 of file PNanobindTraitBackendManager.cpp.

45 {
46 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
47 (*it)->registerProperty(fs, classConfig, mode);;
48 }
49}

References p_vecTrait.

Referenced by generator_nanobind_class().

+ Here is the caller graph for this function:

◆ registerStaticMethod()

void PNanobindTraitBackendManager::registerStaticMethod ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Registration of static method.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 67 of file PNanobindTraitBackendManager.cpp.

67 {
68 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
69 (*it)->registerStaticMethod(fs, classConfig, mode);;
70 }
71}

References p_vecTrait.

Referenced by generator_nanobind_class().

+ Here is the caller graph for this function:

◆ testCallFunction()

void PNanobindTraitBackendManager::testCallFunction ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const
virtual

Call of the test function.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 100 of file PNanobindTraitBackendManager.cpp.

100 {
101 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
102 (*it)->testCallFunction(fs, classConfig, mode);;
103 }
104}

References p_vecTrait.

◆ testFunction()

void PNanobindTraitBackendManager::testFunction ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode,
const PString & baseFileName ) const
virtual

Implementation of test function.

Parameters
[out]fs: file to be completed
classConfig: PClassConfig to be used
mode: mode of the generator

Definition at line 89 of file PNanobindTraitBackendManager.cpp.

89 {
90 for(PVecNanobindTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
91 (*it)->testFunction(fs, classConfig, mode, baseFileName);;
92 }
93}

References p_vecTrait.

Referenced by generator_nanobind_test().

+ Here is the caller graph for this function:

Member Data Documentation

◆ isLastDef

bool PNanobindTraitBackendManager::isLastDef
private

True if the property or function is the last one to be declared.

Definition at line 43 of file PNanobindTraitBackendManager.h.

◆ p_vecTrait


The documentation for this class was generated from the following files: