Go to the source code of this file.
◆ CE_STRUCT_ENUM_DECL
| #define CE_STRUCT_ENUM_DECL |
( |
|
T | ) |
|
Value: using RawType = decltype(raw); \
constexpr T() = default; \
CE_EXPLICIT(false) constexpr T(RawType raw) : raw(raw) {} \
explicit constexpr T(UnderlyingType raw) : T(RawType(raw)) {} \
\
public: \
\
\
\
[[nodiscard]] static Optional<T> fromString(StringView string) noexcept;
BasicStringView< char > StringView
Narrow string view used for handling narrow encoded text in UTF-8.
Definition String.hpp:190
StringView toString(Button button) noexcept
Returns a string representation for the given button
◆ CE_STRUCT_ENUM_DEF
| #define CE_STRUCT_ENUM_DEF |
( |
|
T | ) |
|
Value:
CE_STRUCT_ENUM_FROM_STRING(T, T)
#define CE_STRUCT_ENUM_TO_STRING(T, M)
Definition StructEnum.hpp:67
◆ CE_STRUCT_ENUM_DEF2
| #define CE_STRUCT_ENUM_DEF2 |
( |
|
T, |
|
|
|
M |
|
) |
| |
Value:
CE_STRUCT_ENUM_FROM_STRING(T, M)
◆ CE_STRUCT_ENUM_FOREACH
| #define CE_STRUCT_ENUM_FOREACH |
( |
|
T, |
|
|
|
F |
|
) |
| CE_STRUCT_ENUM_FOREACH_##T(F) |
◆ CE_STRUCT_ENUM_FROM_STRING
| #define CE_STRUCT_ENUM_FROM_STRING |
( |
|
T, |
|
|
|
M |
|
) |
| |
Value: Optional<T> T::fromString(StringView string) noexcept { \
return {}; \
}
#define CE_STRUCT_ENUM_FROM_STRING_IMPL(T)
Definition StructEnum.hpp:73
◆ CE_STRUCT_ENUM_FROM_STRING_IMPL
| #define CE_STRUCT_ENUM_FROM_STRING_IMPL |
( |
|
T | ) |
|
Value: if(string == #T) \
return T;
◆ CE_STRUCT_ENUM_TO_STRING
| #define CE_STRUCT_ENUM_TO_STRING |
( |
|
T, |
|
|
|
M |
|
) |
| |
Value: StringView T::toString() const noexcept { \
return "<unknown>"; \
}
#define CE_STRUCT_ENUM_TO_STRING_IMPL(T)
Definition StructEnum.hpp:64
#define CE_STRUCT_ENUM_FOREACH(T, F)
Definition StructEnum.hpp:62
◆ CE_STRUCT_ENUM_TO_STRING_IMPL
| #define CE_STRUCT_ENUM_TO_STRING_IMPL |
( |
|
T | ) |
|