aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/enumtypeentry.h
blob: 14bab50cf4109924db85dad6a5dfa26997d0e20f (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
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#ifndef ENUMTYPEENTRY_H
#define ENUMTYPEENTRY_H

#include "typesystem.h"
#include "typesystem_enums.h"

class EnumTypeEntryPrivate;

class EnumTypeEntry : public TypeEntry
{
public:
    explicit EnumTypeEntry(const QString &entryName,
                           const QVersionNumber &vr,
                           const TypeEntryCPtr &parent);

    TypeSystem::PythonEnumType pythonEnumType() const;
    void setPythonEnumType(TypeSystem::PythonEnumType t);

    QString targetLangQualifier() const;

    QString qualifier() const;

    EnumValueTypeEntryCPtr nullValue() const;
    void setNullValue(const EnumValueTypeEntryCPtr &n);

    void setFlags(const FlagsTypeEntryPtr &flags);
    FlagsTypeEntryPtr flags() const;

    QString cppType() const;
    void setCppType(const QString &t);

    bool isEnumValueRejected(const QString &name) const;
    void addEnumValueRejection(const QString &name);
    QStringList enumValueRejections() const;

    TypeEntry *clone() const override;
#ifndef QT_NO_DEBUG_STREAM
    void formatDebug(QDebug &d) const override;
#endif
protected:
    explicit EnumTypeEntry(EnumTypeEntryPrivate *d);
};

#endif // ENUMTYPEENTRY_H