1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef CPPCODEMARKER_H |
5 | #define CPPCODEMARKER_H |
6 | |
7 | #include "codemarker.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class CppCodeMarker : public CodeMarker |
12 | { |
13 | public: |
14 | CppCodeMarker() = default; |
15 | ~CppCodeMarker() override = default; |
16 | |
17 | bool recognizeCode(const QString &code) override; |
18 | bool recognizeExtension(const QString &ext) override; |
19 | bool recognizeLanguage(const QString &lang) override; |
20 | [[nodiscard]] Atom::AtomType atomType() const override; |
21 | QString markedUpCode(const QString &code, const Node *relative, |
22 | const Location &location) override; |
23 | QString markedUpSynopsis(const Node *node, const Node *relative, Section::Style style) override; |
24 | QString markedUpQmlItem(const Node *node, bool summary) override; |
25 | QString markedUpName(const Node *node) override; |
26 | QString markedUpEnumValue(const QString &enumValue, const Node *relative) override; |
27 | QString markedUpInclude(const QString &include) override; |
28 | |
29 | private: |
30 | QString addMarkUp(const QString &protectedCode, const Node *relative, const Location &location); |
31 | }; |
32 | |
33 | QT_END_NAMESPACE |
34 | |
35 | #endif |
36 | |