Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmultimedia_enum_to_string_converter_p.h File Reference

(71938abd258876f72893145a2c63e3136d7e6f67)

#include <QtCore/private/qglobal_p.h>
#include <QtCore/qstring.h>
#include <optional>
Include dependency graph for qmultimedia_enum_to_string_converter_p.h:

Go to the source code of this file.

Classes

struct  QtMultimediaPrivate::EnumName
struct  QtMultimediaPrivate::StringResolver< Enum, Role >

Namespaces

namespace  QtMultimediaPrivate

Macros

#define QT_MM_CAT(x, y)
#define QT_MM_IMPL_CAT(x, y)
#define QT_MM_IMPL_GEN_CASE_MAP_ENUM_TO_STRING(SYMBOL, STRING)
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING(seq)
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1(x, y)
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2(x, y)
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1_END
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2_END
#define QT_MM_MAKE_STRING_RESOLVER(Enum, EnumName, ...)
#define QT_MM_DEFINE_QDEBUG_ENUM(EnumType)

Macro Definition Documentation

◆ QT_MM_CAT

#define QT_MM_CAT ( x,
y )
Value:
#define QT_MM_IMPL_CAT(x, y)
GLint GLint GLint GLint GLint x
GLint y

Definition at line 25 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_DEFINE_QDEBUG_ENUM

#define QT_MM_DEFINE_QDEBUG_ENUM ( EnumType)
Value:
QDebug operator<<(QDebug dbg, EnumType arg) \
{ \
QDebugStateSaver saver(dbg); \
dbg.noquote(); \
std::optional<QString> resolved = \
QtMultimediaPrivate::StringResolver<EnumType>::toQString(arg); \
if (resolved) \
dbg << *resolved; \
else \
dbg << "Unknown Enum value"; \
return dbg; \
} \
static_assert(true, "force semicolon")
\inmodule QtCore
\inmodule QtCore
SSL_CTX int void * arg
QDataStream & operator<<(QDataStream &, const QXxx &)
[0]

Definition at line 79 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_IMPL_CAT

#define QT_MM_IMPL_CAT ( x,
y )
Value:
x##y

Definition at line 26 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_IMPL_GEN_CASE_MAP_ENUM_TO_STRING

#define QT_MM_IMPL_GEN_CASE_MAP_ENUM_TO_STRING ( SYMBOL,
STRING )
Value:
case SYMBOL: \
return QStringLiteral(STRING);
#define QStringLiteral(str)
Definition qstring.h:1826

Definition at line 30 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING

#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING ( seq)
Value:
static_assert(true, "force semicolon")
#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1(x, y)

Definition at line 36 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1

#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1 ( x,
y )

◆ QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1_END

#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_1_END

Definition at line 43 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2

#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2 ( x,
y )

◆ QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2_END

#define QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING_2_END

Definition at line 44 of file qmultimedia_enum_to_string_converter_p.h.

◆ QT_MM_MAKE_STRING_RESOLVER

#define QT_MM_MAKE_STRING_RESOLVER ( Enum,
EnumName,
... )
Value:
template <> \
{ \
static std::optional<QString> toQString(Enum arg) \
{ \
switch (arg) { \
QT_MM_IMPL_GEN_CASES_ENUM_TO_STRING(__VA_ARGS__); \
default: \
return std::nullopt; \
} \
} \
}; \
static_assert(true, "force semicolon")

Definition at line 62 of file qmultimedia_enum_to_string_converter_p.h.