ICU 78.3
78.3
Toggle main menu visibility
Loading...
Searching...
No Matches
common
unicode
uversion.h
Go to the documentation of this file.
1
// © 2016 and later: Unicode, Inc. and others.
2
// License & terms of use: http://www.unicode.org/copyright.html
3
/*
4
*******************************************************************************
5
* Copyright (C) 2000-2011, International Business Machines
6
* Corporation and others. All Rights Reserved.
7
*******************************************************************************
8
*
9
* file name: uversion.h
10
* encoding: UTF-8
11
* tab size: 8 (not used)
12
* indentation:4
13
*
14
* Created by: Vladimir Weinstein
15
*
16
* Gets included by utypes.h and Windows .rc files
17
*/
18
23
/*===========================================================================*/
24
/* Main ICU version information */
25
/*===========================================================================*/
26
27
#ifndef UVERSION_H
28
#define UVERSION_H
29
30
#include "
unicode/umachine.h
"
31
32
/* Actual version info lives in uvernum.h */
33
#include "
unicode/uvernum.h
"
34
38
#define U_COPYRIGHT_STRING_LENGTH 128
39
43
#define U_MAX_VERSION_LENGTH 4
44
48
#define U_VERSION_DELIMITER '.'
49
53
#define U_MAX_VERSION_STRING_LENGTH 20
54
59
typedef
uint8_t
UVersionInfo
[
U_MAX_VERSION_LENGTH
];
60
61
/*===========================================================================*/
62
/* C++ namespace if supported. Versioned unless versioning is disabled. */
63
/*===========================================================================*/
64
65
/* Define C++ namespace symbols. */
66
#ifdef __cplusplus
67
75
83
90
100
101
# if U_DISABLE_RENAMING
102
# define U_ICU_NAMESPACE icu
103
namespace
U_ICU_NAMESPACE { }
104
# else
105
# define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
106
namespace
U_ICU_NAMESPACE { }
107
namespace
icu
= U_ICU_NAMESPACE;
108
# endif
109
110
# define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
111
# define U_NAMESPACE_END }
112
# define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
113
# define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
114
115
# ifndef U_USING_ICU_NAMESPACE
116
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
117
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
118
defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
119
# define U_USING_ICU_NAMESPACE 0
120
# else
121
# define U_USING_ICU_NAMESPACE 0
122
# endif
123
# endif
124
# if U_USING_ICU_NAMESPACE
125
U_NAMESPACE_USE
126
# endif
127
141
151
152
#ifndef U_FORCE_HIDE_DRAFT_API
162
#endif
// U_FORCE_HIDE_DRAFT_API
163
164
// The first test is the same as for defining U_EXPORT for Windows.
165
#if defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
166
UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
167
# define U_HEADER_NESTED_NAMESPACE header
168
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE
169
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
170
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
171
defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
172
# define U_HEADER_NESTED_NAMESPACE internal
173
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE::internal
174
namespace
U_ICU_NAMESPACE_OR_INTERNAL {}
175
using namespace
U_ICU_NAMESPACE_OR_INTERNAL;
176
#else
177
# define U_HEADER_NESTED_NAMESPACE header
178
# define U_ICU_NAMESPACE_OR_INTERNAL U_ICU_NAMESPACE
179
#endif
180
181
#define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
182
183
namespace
U_HEADER_ONLY_NAMESPACE {}
184
185
#endif
/* __cplusplus */
186
187
/*===========================================================================*/
188
/* General version helper functions. Definitions in putil.c */
189
/*===========================================================================*/
190
202
U_CAPI
void
U_EXPORT2
203
u_versionFromString
(
UVersionInfo
versionArray,
const
char
*versionString);
204
216
U_CAPI
void
U_EXPORT2
217
u_versionFromUString
(
UVersionInfo
versionArray,
const
UChar
*versionString);
218
219
232
U_CAPI
void
U_EXPORT2
233
u_versionToString
(
const
UVersionInfo
versionArray,
char
*versionString);
234
243
U_CAPI
void
U_EXPORT2
244
u_getVersion
(
UVersionInfo
versionArray);
245
#endif
icu
File coll.h.
Definition
brkiter.h:59
umachine.h
Basic types and constants for UTF.
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition
umachine.h:400
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition
umachine.h:110
uvernum.h
C API: definitions of ICU version numbers.
u_versionFromUString
U_CAPI void u_versionFromUString(UVersionInfo versionArray, const UChar *versionString)
Parse a Unicode string with dotted-decimal version information and fill in a UVersionInfo structure w...
u_versionToString
U_CAPI void u_versionToString(const UVersionInfo versionArray, char *versionString)
Write a string with dotted-decimal version information according to the input UVersionInfo.
u_getVersion
U_CAPI void u_getVersion(UVersionInfo versionArray)
Gets the ICU release version.
UVersionInfo
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
Definition
uversion.h:59
u_versionFromString
U_CAPI void u_versionFromString(UVersionInfo versionArray, const char *versionString)
Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the ...
U_MAX_VERSION_LENGTH
#define U_MAX_VERSION_LENGTH
An ICU version consists of up to 4 numbers from 0..255.
Definition
uversion.h:43
Generated by
1.17.0