Automatic versioned tokenized enum support.
Main docs: Home
Namespaces | |
| namespace | pw |
| The Pigweed namespace. | |
Macros | |
| #define | PW_ENUM(enum_name, ...) |
| #define PW_ENUM | ( | enum_name, | |
| ... | |||
| ) |
Registers a C++ enum for automatic stringification and tokenization.
This macro must be called at the global scope (outside of any namespaces, classes, or functions).
| enum_name | The fully-qualified C++ enum name (e.g., my_ns::MyEnum). |
| ... | The enumerator names to register. By default, Google-style kCamelCase names are converted to UPPER_SNAKE_CASE without the k prefix. A custom display name can be specified with kEnum = "custom". If multiple enumerators share the same value (aliases), they are grouped and their names are joined (e.g., "A|B"). |