! * @brief Code generator for Python. */
| 26 | * @brief Code generator for Python. |
| 27 | */ |
| 28 | class PythonGenerator : public Generator |
| 29 | { |
| 30 | public: |
| 31 | /*! |
| 32 | * @brief This function is constructor of PythonGenerator class. |
| 33 | * |
| 34 | * @param[in] def Contains all Symbols parsed from IDL files. |
| 35 | */ |
| 36 | explicit PythonGenerator(InterfaceDefinition *def); |
| 37 | |
| 38 | /*! |
| 39 | * @brief This function is destructor of PythonGenerator class. |
| 40 | * |
| 41 | * This function close opened files. |
| 42 | */ |
| 43 | virtual ~PythonGenerator() {} |
| 44 | |
| 45 | /*! |
| 46 | * @brief This function generate output code for output files. |
| 47 | * |
| 48 | * This code call all necessary functions for prepare output code and parse it into output files. |
| 49 | */ |
| 50 | virtual void generate() override; |
| 51 | |
| 52 | protected: |
| 53 | std::string m_suffixStrip; //!< String to remove from suffixes of names. |
| 54 | size_t m_suffixStripSize; //!< Length of the suffix filter string. |
| 55 | |
| 56 | /*! |
| 57 | * @brief This function prepare helpful functions located in template files. |
| 58 | * |
| 59 | * These function may be used while parsing templates |
| 60 | */ |
| 61 | void parseSubtemplates(); |
| 62 | |
| 63 | /*! |
| 64 | * @brief This function generate output files. |
| 65 | * |
| 66 | * This function call functions for generating client/server source files. |
| 67 | * |
| 68 | * @param[in] fileName Name for output files. |
| 69 | */ |
| 70 | void generateOutputFiles(const std::string &fileName) override; |
| 71 | |
| 72 | /*! |
| 73 | * @brief This function generate output common module. |
| 74 | * |
| 75 | * @param[in] fileName Name for output files. |
| 76 | */ |
| 77 | void generateCommonFile(std::string fileName); |
| 78 | |
| 79 | /*! |
| 80 | * @brief This function generate output package init file. |
| 81 | * |
| 82 | * @param[in] fileName Name for output files. |
| 83 | */ |
| 84 | void generateInitFile(std::string fileName); |
| 85 |