summaryrefslogtreecommitdiff
path: root/tests/unit/mockup/clangcodemodel/clangcompletionassistinterface.h
blob: 06f3e9033d76abc5224dc898fecfe7e015b1fe48 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <texteditor/codeassist/assistinterface.h>

#include <cplusplus/Token.h>

namespace ClangCodeModel {
namespace Internal {

enum class CompletionType { FunctionHint, Other };

class ClangCompletionAssistInterface: public TextEditor::AssistInterface
{
public:
    ClangCompletionAssistInterface(const QByteArray &text,
                                   int position)
        : TextEditor::AssistInterface(text, position),
          languageFeatures_(CPlusPlus::LanguageFeatures::defaultFeatures())
    {}

    CompletionType type() const { return CompletionType::Other; }
    CPlusPlus::LanguageFeatures languageFeatures() const { return languageFeatures_; }

private:
    CPlusPlus::LanguageFeatures languageFeatures_;
};

} // namespace Internal
} // namespace ClangCodeModel