BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt_formatterunicodedata.h
Go to the documentation of this file.
1/// @file bslfmt_formatterunicodedata.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslfmt_formatterunicodedata.h -*-C++-*-
8#ifndef INCLUDED_BSLFMT_FORMATTERUNICODEDATA
9#define INCLUDED_BSLFMT_FORMATTERUNICODEDATA
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bslfmt_formatterunicodedata bslfmt_formatterunicodedata
15/// @brief Private unicode data tables for use by `bsl::format`.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslfmt
19/// @{
20/// @addtogroup bslfmt_formatterunicodedata
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslfmt_formatterunicodedata-purpose"> Purpose</a>
25/// * <a href="#bslfmt_formatterunicodedata-classes"> Classes </a>
26/// * <a href="#bslfmt_formatterunicodedata-description"> Description </a>
27///
28/// # Purpose {#bslfmt_formatterunicodedata-purpose}
29/// Private unicode data tables for use by `bsl::format`.
30///
31/// # Classes {#bslfmt_formatterunicodedata-classes}
32///
33/// - bslfmt::FormatterUnicodeData: namespace for generated unicode data tables
34///
35/// # Description {#bslfmt_formatterunicodedata-description}
36/// This component is a namespace struct to provide access to
37/// script-generated tables of unicode character data as required by
38/// `bslfmt::format` and associated utilities.
39///
40/// This component is for use within `bslfmt` only.
41/// @}
42/** @} */
43/** @} */
44
45/** @addtogroup bsl
46 * @{
47 */
48/** @addtogroup bslfmt
49 * @{
50 */
51/** @addtogroup bslfmt_formatterunicodedata
52 * @{
53 */
54
55#include <bslscm_version.h>
56
57
58namespace bslfmt {
59
60 // ===========================
61 // struct FormatterUnicodeData
62 // ===========================
63
64/// [**PRIVATE**] This private implementation `struct` contains data for
65/// correct processing of Unicode characters. These data are private to this
66/// package and should not be used by clients.
67///
68/// See @ref bslfmt_formatterunicodedata
70 public:
71 // TYPES
72
73 /// These constants define a general type for a unicode character set.
74 /// Although they do not match BDE naming conventions, the names chosen
75 /// were those defined by the unicode standard.
92
93 /// This nested `struct` provides a container for storing a pair of
94 /// codepoints that allows to specify a certain range within a list of
95 /// codepoints.
96 ///
97 /// See @ref bslfmt_formatterunicodedata
98 struct BooleanRange {
99 public:
100 // PUBLIC DATA
101 unsigned long int d_start; // first codepoint in range
102 unsigned long int d_end; // last codepoint in range
103 };
104
105 /// This nested `struct` provides a container for storing a pair of
106 /// codepoints that allows to specify a certain range within a list of
107 /// codepoints and assign it a category.
108 ///
109 /// See @ref bslfmt_formatterunicodedata
111 public:
112 // PUBLIC DATA
113 unsigned long int d_start; // first codepoint in range
114 unsigned long int d_end; // last codepoint in range
115 GraphemeBreakCategory d_category; // category of all points in range
116 };
117
118 // PUBLIC CLASS DATA
120 // grapheme break category for all unicode code points
121
123 // all unicode code points with the `Extended_Pictographic` property
124
126 // all unicode code points representing printable characters
127
129 // all unicode code points with derived `Grapheme_Extend` property
130
132 // all unicode code points that are double-width per the C++ standard
133 // [format.string.std]
134
136 // length of `s_graphemeBreakCategoryRanges` array
137
139 // length of `s_extendedPictographicRanges` array
140
141 static const int s_printableRangeCount;
142 // length of `s_printableRanges` array
143
145 // length of `s_graphemeExtendRanges` array
146
148 // length of `s_doubleFieldWidthRanges` array
149};
150
151} // close package namespace
152
153
154#endif // INCLUDED_BSLFMT_FORMATTERUNICODEDATA
155
156// ----------------------------------------------------------------------------
157// The data herein is generated from Unicode Data Files which are
158// Copyright 1991-2024 Unicode, Inc. and subject to the
159// following license agreement:
160//
161// UNICODE, INC. LICENSE AGREEMENT V3 - DATA FILES AND SOFTWARE
162//
163// See Terms of Use <https://www.unicode.org/copyright.html>
164// for definitions of Unicode Inc.'s Data Files and Software.
165//
166// Disclaimer
167//
168// The Unicode Character Database is provided as is by Unicode, Inc. No
169// claims are made as to fitness for any particular purpose. No warranties
170// of any kind are expressed or implied. The recipient agrees to determine
171// applicability of information provided. If this file has been purchased
172// on magnetic or optical media from Unicode, Inc., the sole remedy for any
173// claim will be exchange of defective media within 90 days of receipt.
174//
175// This disclaimer is applicable for all other data files accompanying the
176// Unicode Character Database, some of which have been compiled by the
177// Unicode Consortium, and some of which have been supplied by other sources.
178//
179// Limitations on Rights to Redistribute This Data
180//
181// Recipient is granted the right to make copies in any form for internal
182// distribution and to freely use the information supplied in the creation
183// of products supporting the UnicodeTM Standard. The files in the Unicode
184// Character Database can be redistributed to third parties or other
185// organizations (whether for profit or not) as long as this notice and the
186// disclaimer notice are retained. Information can be extracted from these
187// files and used in documentation or programs, as long as there is an
188// accompanying notice indicating the source.
189//
190// ----------------------------------------------------------------------------
191// Copyright 2024 Bloomberg Finance L.P.
192//
193// Licensed under the Apache License, Version 2.0 (the "License");
194// you may not use this file except in compliance with the License.
195// You may obtain a copy of the License at
196//
197// http://www.apache.org/licenses/LICENSE-2.0
198//
199// Unless required by applicable law or agreed to in writing, software
200// distributed under the License is distributed on an "AS IS" BASIS,
201// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202// See the License for the specific language governing permissions and
203// limitations under the License.
204// ----------------------------- END-OF-FILE ----------------------------------
205
206/** @} */
207/** @} */
208/** @} */
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bslfmt_enablestreamedformatter.h:130
Definition bslfmt_formatterunicodedata.h:98
unsigned long int d_end
Definition bslfmt_formatterunicodedata.h:102
unsigned long int d_start
Definition bslfmt_formatterunicodedata.h:101
Definition bslfmt_formatterunicodedata.h:110
unsigned long int d_end
Definition bslfmt_formatterunicodedata.h:114
GraphemeBreakCategory d_category
Definition bslfmt_formatterunicodedata.h:115
unsigned long int d_start
Definition bslfmt_formatterunicodedata.h:113
Definition bslfmt_formatterunicodedata.h:69
GraphemeBreakCategory
Definition bslfmt_formatterunicodedata.h:76
@ e_ZERO_WIDTH_JOINER
Definition bslfmt_formatterunicodedata.h:90
@ e_HANGUL_LVT
Definition bslfmt_formatterunicodedata.h:89
@ e_SPACING_MARK
Definition bslfmt_formatterunicodedata.h:84
@ e_UNASSIGNED
Definition bslfmt_formatterunicodedata.h:77
@ e_HANGUL_T
Definition bslfmt_formatterunicodedata.h:87
@ e_PREPEND
Definition bslfmt_formatterunicodedata.h:78
@ e_HANGUL_L
Definition bslfmt_formatterunicodedata.h:85
@ e_LF
Definition bslfmt_formatterunicodedata.h:80
@ e_CONTROL
Definition bslfmt_formatterunicodedata.h:81
@ e_HANGUL_V
Definition bslfmt_formatterunicodedata.h:86
@ e_EXTEND
Definition bslfmt_formatterunicodedata.h:82
@ e_REGIONAL_INDICATOR
Definition bslfmt_formatterunicodedata.h:83
@ e_HANGUL_LV
Definition bslfmt_formatterunicodedata.h:88
@ e_CR
Definition bslfmt_formatterunicodedata.h:79
static const BooleanRange s_extendedPictographicRanges[]
Definition bslfmt_formatterunicodedata.h:122
static const BooleanRange s_graphemeExtendRanges[]
Definition bslfmt_formatterunicodedata.h:128
static const GraphemeBreakCategoryRange s_graphemeBreakCategoryRanges[]
Definition bslfmt_formatterunicodedata.h:119
static const BooleanRange s_printableRanges[]
Definition bslfmt_formatterunicodedata.h:125
static const int s_doubleFieldWidthRangeCount
Definition bslfmt_formatterunicodedata.h:147
static const int s_graphemeBreakCategoryRangeCount
Definition bslfmt_formatterunicodedata.h:135
static const int s_extendedPictographicRangeCount
Definition bslfmt_formatterunicodedata.h:138
static const int s_graphemeExtendRangeCount
Definition bslfmt_formatterunicodedata.h:144
static const int s_printableRangeCount
Definition bslfmt_formatterunicodedata.h:141
static const BooleanRange s_doubleFieldWidthRanges[]
Definition bslfmt_formatterunicodedata.h:131