1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef ICU4X_CaseMapLocales_D_HPP
#define ICU4X_CaseMapLocales_D_HPP
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <memory>
#include <functional>
#include <optional>
#include <cstdlib>
#include "diplomat_runtime.hpp"
namespace icu4x {
namespace capi { struct Locale; }
class Locale;
} // namespace icu4x
namespace icu4x {
namespace capi {
struct CaseMapLocales;
} // namespace capi
} // namespace
namespace icu4x {
/**
* A type that provides access to preconstructred Locales, to avoid
* needing to parse user locales when the code knows what locale it wants.
*
* In most cases, you should be taking a locale from the user, but in some
* limited cases you may be parsing from a limited set of locales and not
* wish to pull in full-fledged parsing code.
*
* This type is for locales that have special meaning to `CaseMapper`,
* since it only cares about a small set of locales and locale parsing takes
* up a relatively large amount of binary size in the context of casemapping.
*/
class CaseMapLocales {
public:
/**
* Returns a borrowed "az" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& az();
/**
* Returns a borrowed "el" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& el();
/**
* Returns a borrowed "hy" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& hy();
/**
* Returns a borrowed "lt" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& lt();
/**
* Returns a borrowed "nl" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& nl();
/**
* Returns a borrowed "tr" {@link Locale}, without allocating.
*/
inline static const icu4x::Locale& tr();
inline const icu4x::capi::CaseMapLocales* AsFFI() const;
inline icu4x::capi::CaseMapLocales* AsFFI();
inline static const icu4x::CaseMapLocales* FromFFI(const icu4x::capi::CaseMapLocales* ptr);
inline static icu4x::CaseMapLocales* FromFFI(icu4x::capi::CaseMapLocales* ptr);
inline static void operator delete(void* ptr);
private:
CaseMapLocales() = delete;
CaseMapLocales(const icu4x::CaseMapLocales&) = delete;
CaseMapLocales(icu4x::CaseMapLocales&&) noexcept = delete;
CaseMapLocales operator=(const icu4x::CaseMapLocales&) = delete;
CaseMapLocales operator=(icu4x::CaseMapLocales&&) noexcept = delete;
static void operator delete[](void*, size_t) = delete;
};
} // namespace
#endif // ICU4X_CaseMapLocales_D_HPP