#pragma once #include "GeneratorGrantleeBase.h" #include "GrantleeWrappers.h" #include "StructBuilder.h" #include namespace CodeGen { class CppTopicGeneratorGrantlee final : public GeneratorGrantleeBase { Q_OBJECT public: explicit CppTopicGeneratorGrantlee(); bool init(const XmlReader* reader, StructBuilder* structBuilder) override; private: bool initDataTopics(); bool getSpecialColumns(const CompleteTopicTypeInformation& tti, QVector& keyColumns, QVector& trColumns) const; bool initFunctionTopics(); bool handleStruct(const FunctionTopic& ft, FunctionTopicsWrapper* functionTopicsWrapper); bool addRequesterRequestParams(const QString& request_name, const CompleteTopicTypeInformation& request, FunctionTopicWrapper* ftw); bool addRequesterReplyParams(const QString& request_name, const CompleteTopicTypeInformation& reply, FunctionTopicWrapper* ftw); bool handleIdlStruct(const CompleteTopicTypeInformation& csi, QSet& idlStructNames, QVector& idlStructs); bool initIdlStructs(); CompleteTopicTypeInformation topicTypeInformationByDerivedTopic(const CompleteTopicTypeInformation& tti) const; const XmlReader* m_reader = nullptr; }; } // namespace CodeGen