diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/enumtypeentry.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/enumtypeentry.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/enumtypeentry.h b/sources/shiboken6/ApiExtractor/enumtypeentry.h new file mode 100644 index 000000000..3360d7db5 --- /dev/null +++ b/sources/shiboken6/ApiExtractor/enumtypeentry.h @@ -0,0 +1,51 @@ +// 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 "configurabletypeentry.h" +#include "typesystem_enums.h" + +class EnumTypeEntryPrivate; + +// EnumTypeEntry is configurable for global enums only +class EnumTypeEntry : public ConfigurableTypeEntry +{ +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; + + QString docFile() const; + void setDocFile(const QString &df); + + TypeEntry *clone() const override; +#ifndef QT_NO_DEBUG_STREAM + void formatDebug(QDebug &d) const override; +#endif +protected: + explicit EnumTypeEntry(EnumTypeEntryPrivate *d); +}; + +#endif // ENUMTYPEENTRY_H |