Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1756 X-link: https://github.com/facebook/react-native/pull/48049 Changelog: [Internal] Original commit changeset: 1d596964e0c8 Original Phabricator Diff: D66332307 Reviewed By: NickGerleman Differential Revision: D66662662 fbshipit-source-id: 4f9ac2b1557b848f519dcd728d7097b52f1190b3
46 lines
939 B
C++
46 lines
939 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
// @generated by enums.py
|
|
// clang-format off
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <yoga/YGEnums.h>
|
|
#include <yoga/enums/YogaEnums.h>
|
|
|
|
namespace facebook::yoga {
|
|
|
|
enum class Unit : uint8_t {
|
|
Undefined = YGUnitUndefined,
|
|
Point = YGUnitPoint,
|
|
Percent = YGUnitPercent,
|
|
Auto = YGUnitAuto,
|
|
MaxContent = YGUnitMaxContent,
|
|
FitContent = YGUnitFitContent,
|
|
Stretch = YGUnitStretch,
|
|
};
|
|
|
|
template <>
|
|
constexpr int32_t ordinalCount<Unit>() {
|
|
return 7;
|
|
}
|
|
|
|
constexpr Unit scopedEnum(YGUnit unscoped) {
|
|
return static_cast<Unit>(unscoped);
|
|
}
|
|
|
|
constexpr YGUnit unscopedEnum(Unit scoped) {
|
|
return static_cast<YGUnit>(scoped);
|
|
}
|
|
|
|
inline const char* toString(Unit e) {
|
|
return YGUnitToString(unscopedEnum(e));
|
|
}
|
|
|
|
} // namespace facebook::yoga
|