1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef NINJAGENERATOR_H
6#define NINJAGENERATOR_H
7
8#include "services/language/languagegenerator.h"
9#include "dap/protocol.h"
10
11class NinjaGeneratorPrivate;
12class NinjaGenerator : public dpfservice::LanguageGenerator
13{
14 Q_OBJECT
15public:
16 explicit NinjaGenerator();
17 virtual ~NinjaGenerator() override;
18
19 static QString toolKitName() { return "ninja"; }
20
21 QString debugger() override;
22 bool prepareDebug(const QMap<QString, QVariant> &param, QString &retMsg) override;
23 bool requestDAPPort(const QString &uuid, const QMap<QString, QVariant> &param, QString &retMsg) override;
24 bool isNeedBuild() override;
25 bool isTargetReady() override;
26 bool isLaunchNotAttach() override;
27 dap::LaunchRequest launchDAP(const QMap<QString, QVariant> &param) override;
28 QString build(const QString &projectPath) override;
29 QMap<QString, QVariant> getDebugArguments(const dpfservice::ProjectInfo &projectInfo,
30 const QString &currentFile) override;
31 dpfservice::RunCommandInfo getRunArguments(const dpfservice::ProjectInfo &projectInfo,
32 const QString &currentFile) override;
33
34signals:
35
36private slots:
37
38private:
39 NinjaGeneratorPrivate *const d;
40};
41
42#endif // NINJAGENERATOR_H
43