aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/baremetal/sdccparser.h
blob: 0fb59727a77856a1a54a326ff8e31e2c1da96aa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2019 Denis Shienkov <denis.shienkov@gmail.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include <projectexplorer/ioutputparser.h>
#include <projectexplorer/task.h>

namespace BareMetal {
namespace Internal {

// SdccParser

class SdccParser final : public ProjectExplorer::OutputTaskParser
{
    Q_OBJECT

public:
    explicit SdccParser();
    static Utils::Id id();

private:
    void newTask(const ProjectExplorer::Task &task);
    void amendDescription(const QString &desc);

    Result handleLine(const QString &line, Utils::OutputFormat type) final;
    void flush() final;

    ProjectExplorer::Task m_lastTask;
    int m_lines = 0;
};

} // namespace Internal
} // namespace BareMetal