| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************** | ||
| 2 | Auteur : Pierre Aubert | ||
| 3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
| 4 | Licence : CeCILL-C | ||
| 5 | ****************************************/ | ||
| 6 | |||
| 7 | #ifndef __PABSTRACT_TRAIT_BACKEND_H__ | ||
| 8 | #define __PABSTRACT_TRAIT_BACKEND_H__ | ||
| 9 | |||
| 10 | #include <fstream> | ||
| 11 | #include <iostream> | ||
| 12 | #include <set> | ||
| 13 | #include "GeneratorMode.h" | ||
| 14 | #include "PClassConfig.h" | ||
| 15 | #include "type_utils.h" | ||
| 16 | #include "wrapper_utils.h" | ||
| 17 | #include "class_attribute_utils.h" | ||
| 18 | |||
| 19 | ///@brief Abstract trait of the backend | ||
| 20 | class PAbstractTraitBackend{ | ||
| 21 | public: | ||
| 22 | 34 | PAbstractTraitBackend(){} | |
| 23 | 34 | virtual ~PAbstractTraitBackend(){} | |
| 24 | |||
| 25 | //Add include for header | ||
| 26 | 18 | virtual void headerExtraInclude(std::ofstream & fs, const GeneratorMode & mode) const{} | |
| 27 | //Declaration or template which cannot have _impl.h implementation | ||
| 28 | 6 | virtual void publicMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 29 | 7 | virtual void publicMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 30 | 14 | virtual void protectedMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 31 | 16 | virtual void protectedMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 32 | 21 | virtual void privateMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 33 | 24 | virtual void privateMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 34 | 24 | virtual void classExtraFunctionDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 35 | 24 | virtual void classExtraFunctionImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 36 | |||
| 37 | 30 | virtual void testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 38 | 30 | virtual void testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 39 | |||
| 40 | }; | ||
| 41 | |||
| 42 | ///@brief Abstract trait of the backend | ||
| 43 | class PAbstractWrapperTraitBackend{ | ||
| 44 | public: | ||
| 45 | 6 | PAbstractWrapperTraitBackend(){} | |
| 46 | 6 | virtual ~PAbstractWrapperTraitBackend(){} | |
| 47 | |||
| 48 | //Add include for header | ||
| 49 | ✗ | virtual void headerExtraInclude(std::ofstream & fs, const GeneratorMode & mode) const{} | |
| 50 | |||
| 51 | ✗ | virtual void classMethodDeclaration(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 52 | ✗ | virtual void classMethodImplementation(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 53 | |||
| 54 | 3 | virtual void registerClassMember(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 55 | ✗ | virtual void registerClassGetterSetter(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 56 | ✗ | virtual void registerClassMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 57 | |||
| 58 | ✗ | virtual void testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 59 | ✗ | virtual void testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 60 | |||
| 61 | 2 | virtual void setupAddDependency(std::ofstream & fs, const GeneratorMode & mode) const{} | |
| 62 | }; | ||
| 63 | |||
| 64 | ///@brief Abstract trait of the backend for nanobind wrapper | ||
| 65 | class PAbstractNanobindTraitBackend{ | ||
| 66 | public: | ||
| 67 | 7 | PAbstractNanobindTraitBackend(){} | |
| 68 | 7 | virtual ~PAbstractNanobindTraitBackend(){} | |
| 69 | |||
| 70 | 12 | virtual void headerExtraInclude(std::set<std::string> & includes, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 71 | 12 | virtual void headerTestInclude(std::ofstream & fs, const GeneratorMode & mode, const PString & baseFileName) const{} | |
| 72 | |||
| 73 | 12 | virtual void registerProperty(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 74 | 10 | virtual void registerStaticMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 75 | 12 | virtual void registerMethod(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 76 | 12 | virtual void registerConstructor(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 77 | |||
| 78 | 6 | virtual void testFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode, const PString & baseFileName) const{} | |
| 79 | ✗ | virtual void testCallFunction(std::ofstream & fs, const PClassConfig & classConfig, const GeneratorMode & mode) const{} | |
| 80 | }; | ||
| 81 | |||
| 82 | |||
| 83 | #endif | ||
| 84 |