PhoenixGenerator  3.4.0
Generate code from template files and projects in C++, Rust, Python and wrapped C++ to Python
Loading...
Searching...
No Matches
PRustTraitBackendManager Class Reference

Manager of the Rust trait backends. More...

#include <PRustTraitBackendManager.h>

Public Member Functions

template<class Backend>
void addTraitBackend ()
 Add a trait backend into the PRustTraitBackendManager.
void classExtraDeclaration (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Implementation of extra declarations.
void clear ()
 Clear the PRustTraitBackendManager.
void headerExtraInclude (std::ofstream &fs, const GeneratorMode &mode) const
 Add extra include on the header.
void implMethodDeclaration (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Implementation of the impl block methods.
 PRustTraitBackendManager ()
 Default constructor of PRustTraitBackendManager.
void testFunction (std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
 Implementation of test function.
virtual ~PRustTraitBackendManager ()
 Destructor of PRustTraitBackendManager.

Private Member Functions

void initialisationPRustTraitBackendManager ()
 Initialisation function of the class PRustTraitBackendManager.

Private Attributes

PVecRustTraitBackend p_vecTrait
 Vector of the Trait backend.

Detailed Description

Manager of the Rust trait backends.

Definition at line 15 of file PRustTraitBackendManager.h.

Constructor & Destructor Documentation

◆ PRustTraitBackendManager()

PRustTraitBackendManager::PRustTraitBackendManager ( )

Default constructor of PRustTraitBackendManager.

Definition at line 10 of file PRustTraitBackendManager.cpp.

10 {
12}
void initialisationPRustTraitBackendManager()
Initialisation function of the class PRustTraitBackendManager.

References initialisationPRustTraitBackendManager().

Here is the call graph for this function:

◆ ~PRustTraitBackendManager()

PRustTraitBackendManager::~PRustTraitBackendManager ( )
virtual

Destructor of PRustTraitBackendManager.

Definition at line 15 of file PRustTraitBackendManager.cpp.

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

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ addTraitBackend()

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

Add a trait backend into the PRustTraitBackendManager.

Definition at line 22 of file PRustTraitBackendManager.h.

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

References p_vecTrait.

Referenced by generateRustClassesFull().

Here is the caller graph for this function:

◆ classExtraDeclaration()

void PRustTraitBackendManager::classExtraDeclaration ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const

Implementation of extra declarations.

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

Definition at line 45 of file PRustTraitBackendManager.cpp.

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

References p_vecTrait.

Referenced by generator_rust_class_file().

Here is the caller graph for this function:

◆ clear()

void PRustTraitBackendManager::clear ( )

Clear the PRustTraitBackendManager.

Definition at line 63 of file PRustTraitBackendManager.cpp.

63 {
64 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
65 delete *it;
66 }
67 p_vecTrait.clear();
68}

References p_vecTrait.

Referenced by ~PRustTraitBackendManager().

Here is the caller graph for this function:

◆ headerExtraInclude()

void PRustTraitBackendManager::headerExtraInclude ( std::ofstream & fs,
const GeneratorMode & mode ) const

Add extra include on the header.

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

Definition at line 23 of file PRustTraitBackendManager.cpp.

23 {
24 for(PVecRustTraitBackend::const_iterator it(p_vecTrait.begin()); it != p_vecTrait.end(); ++it){
25 (*it)->headerExtraInclude(fs, mode);
26 }
27}

References p_vecTrait.

Referenced by generator_rust_class().

Here is the caller graph for this function:

◆ implMethodDeclaration()

void PRustTraitBackendManager::implMethodDeclaration ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const

Implementation of the impl block methods.

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

Definition at line 34 of file PRustTraitBackendManager.cpp.

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

References p_vecTrait.

Referenced by generator_rust_class_file().

Here is the caller graph for this function:

◆ initialisationPRustTraitBackendManager()

void PRustTraitBackendManager::initialisationPRustTraitBackendManager ( )
private

Initialisation function of the class PRustTraitBackendManager.

Definition at line 71 of file PRustTraitBackendManager.cpp.

71 {
72
73}

Referenced by PRustTraitBackendManager().

Here is the caller graph for this function:

◆ testFunction()

void PRustTraitBackendManager::testFunction ( std::ofstream & fs,
const PClassConfig & classConfig,
const GeneratorMode & mode ) const

Implementation of test function.

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

Definition at line 56 of file PRustTraitBackendManager.cpp.

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

References p_vecTrait.

Referenced by generator_rust_class_test().

Here is the caller graph for this function:

Member Data Documentation

◆ p_vecTrait

PVecRustTraitBackend PRustTraitBackendManager::p_vecTrait
private

Vector of the Trait backend.

Definition at line 37 of file PRustTraitBackendManager.h.

Referenced by addTraitBackend(), classExtraDeclaration(), clear(), headerExtraInclude(), implMethodDeclaration(), and testFunction().


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