Go to the source code of this file.
|
| template<typename E > |
| Enum< E >::Proto | EnumToProto (const std::optional< E > value) |
| |
| template<typename E > |
| Enum< E >::Proto | EnumToProto (const E value) |
| |
| template<typename P > |
| std::optional< typename EnumProto< P >::Cpp > | EnumFromProto (const P proto_value) |
| |
| template<typename E > |
| absl::string_view | EnumToString (const E value) |
| |
| template<typename E > |
| std::optional< absl::string_view > | EnumToOptString (const E value) |
| |
| template<typename E > |
| std::optional< E > | EnumFromString (const absl::string_view str) |
| |
| template<typename E , typename = std::enable_if_t<Enum<E>::kIsImplemented>> |
| std::ostream & | operator<< (std::ostream &out, const E value) |
| |
| template<typename E , typename = std::enable_if_t<Enum<E>::kIsImplemented>> |
| std::ostream & | operator<< (std::ostream &out, const std::optional< E > opt_value) |
| |
◆ MATH_OPT_DEFINE_ENUM
| #define MATH_OPT_DEFINE_ENUM |
( |
|
CppEnum, |
|
|
|
proto_unspecified_value |
|
) |
| |
Value: template <> \
struct Enum<CppEnum> { \
static constexpr bool kIsImplemented = true; \
using Proto = CppEnum##Proto; \
static constexpr Proto kProtoUnspecifiedValue = proto_unspecified_value; \
static std::optional<absl::string_view> ToOptString(CppEnum
value); \
static absl::Span<const CppEnum> AllValues(); \
}; \
\
template <> \
struct EnumProto<CppEnum##Proto> { \
using Cpp = CppEnum; \
static constexpr CppEnum##Proto kMin = CppEnum##Proto##_MIN; \
static constexpr CppEnum##Proto kMax = CppEnum##Proto##_MAX; \
}
bool(*)(int) ProtoEnumIsValid
Definition at line 319 of file enums.h.