/src/yoga/yoga/enums/LogLevel.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) Meta Platforms, Inc. and affiliates. |
3 | | * |
4 | | * This source code is licensed under the MIT license found in the |
5 | | * LICENSE file in the root directory of this source tree. |
6 | | */ |
7 | | |
8 | | // @generated by enums.py |
9 | | // clang-format off |
10 | | #pragma once |
11 | | |
12 | | #include <cstdint> |
13 | | #include <yoga/YGEnums.h> |
14 | | #include <yoga/enums/YogaEnums.h> |
15 | | |
16 | | namespace facebook::yoga { |
17 | | |
18 | | enum class LogLevel : uint8_t { |
19 | | Error = YGLogLevelError, |
20 | | Warn = YGLogLevelWarn, |
21 | | Info = YGLogLevelInfo, |
22 | | Debug = YGLogLevelDebug, |
23 | | Verbose = YGLogLevelVerbose, |
24 | | Fatal = YGLogLevelFatal, |
25 | | }; |
26 | | |
27 | | template <> |
28 | 0 | constexpr int32_t ordinalCount<LogLevel>() { |
29 | 0 | return 6; |
30 | 0 | } |
31 | | |
32 | 0 | constexpr LogLevel scopedEnum(YGLogLevel unscoped) { |
33 | 0 | return static_cast<LogLevel>(unscoped); |
34 | 0 | } |
35 | | |
36 | 0 | constexpr YGLogLevel unscopedEnum(LogLevel scoped) { |
37 | 0 | return static_cast<YGLogLevel>(scoped); |
38 | 0 | } |
39 | | |
40 | 0 | inline const char* toString(LogLevel e) { |
41 | 0 | return YGLogLevelToString(unscopedEnum(e)); |
42 | 0 | } |
43 | | |
44 | | } // namespace facebook::yoga |