CollatorResolvedOptionsV1.hpp (1817B)
1 #ifndef icu4x_CollatorResolvedOptionsV1_HPP 2 #define icu4x_CollatorResolvedOptionsV1_HPP 3 4 #include "CollatorResolvedOptionsV1.d.hpp" 5 6 #include <stdio.h> 7 #include <stdint.h> 8 #include <stddef.h> 9 #include <stdbool.h> 10 #include <memory> 11 #include <functional> 12 #include <optional> 13 #include <cstdlib> 14 #include "../diplomat_runtime.hpp" 15 #include "CollatorAlternateHandling.hpp" 16 #include "CollatorCaseFirst.hpp" 17 #include "CollatorCaseLevel.hpp" 18 #include "CollatorMaxVariable.hpp" 19 #include "CollatorNumericOrdering.hpp" 20 #include "CollatorStrength.hpp" 21 22 23 namespace icu4x { 24 namespace capi { 25 extern "C" { 26 27 } // extern "C" 28 } // namespace capi 29 } // namespace 30 31 32 inline icu4x::capi::CollatorResolvedOptionsV1 icu4x::CollatorResolvedOptionsV1::AsFFI() const { 33 return icu4x::capi::CollatorResolvedOptionsV1 { 34 /* .strength = */ strength.AsFFI(), 35 /* .alternate_handling = */ alternate_handling.AsFFI(), 36 /* .case_first = */ case_first.AsFFI(), 37 /* .max_variable = */ max_variable.AsFFI(), 38 /* .case_level = */ case_level.AsFFI(), 39 /* .numeric = */ numeric.AsFFI(), 40 }; 41 } 42 43 inline icu4x::CollatorResolvedOptionsV1 icu4x::CollatorResolvedOptionsV1::FromFFI(icu4x::capi::CollatorResolvedOptionsV1 c_struct) { 44 return icu4x::CollatorResolvedOptionsV1 { 45 /* .strength = */ icu4x::CollatorStrength::FromFFI(c_struct.strength), 46 /* .alternate_handling = */ icu4x::CollatorAlternateHandling::FromFFI(c_struct.alternate_handling), 47 /* .case_first = */ icu4x::CollatorCaseFirst::FromFFI(c_struct.case_first), 48 /* .max_variable = */ icu4x::CollatorMaxVariable::FromFFI(c_struct.max_variable), 49 /* .case_level = */ icu4x::CollatorCaseLevel::FromFFI(c_struct.case_level), 50 /* .numeric = */ icu4x::CollatorNumericOrdering::FromFFI(c_struct.numeric), 51 }; 52 } 53 54 55 #endif // icu4x_CollatorResolvedOptionsV1_HPP