54 lines
1.7 KiB
C++
Executable File
54 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Generate an dtc/dts interface file from idl-struct defined in a xml-file
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2016-01-05
|
|
*/
|
|
#pragma once
|
|
|
|
#include "GeneratorGrantleeBase.h"
|
|
#include "StructBuilder.h"
|
|
#include "GrantleeWrappers.h"
|
|
#include "codegen_export.h"
|
|
|
|
namespace CodeGen
|
|
{
|
|
|
|
class CppTopicGeneratorGrantlee final : public GeneratorGrantleeBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CppTopicGeneratorGrantlee();
|
|
|
|
bool init(const XmlReader *reader, StructBuilder *structBuilder) override;
|
|
|
|
private:
|
|
// DataTopics
|
|
bool initDataTopics();
|
|
bool getSpecialColumns(const CompleteTopicTypeInformation &tti,
|
|
QVector<IdlData> &keyColumns,
|
|
QVector<IdlData> &trColumns) const;
|
|
// FunctionTopics
|
|
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);
|
|
// Idl
|
|
bool handleIdlStruct(const CompleteTopicTypeInformation &csi,
|
|
QSet<QString> &idlStructNames,
|
|
QVector<IdlStructWrapper *> &idlStructs);
|
|
bool initIdlStructs();
|
|
// Common
|
|
CompleteTopicTypeInformation topicTypeInformationByDerivedTopic(const CompleteTopicTypeInformation &tti) const;
|
|
|
|
const XmlReader *m_reader = nullptr;
|
|
};
|
|
} // namespace CodeGen
|