ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
108 /* Define namespace symbols if the compiler supports it. */
109 #ifdef __cplusplus
110 # if U_DISABLE_RENAMING
111 # define U_ICU_NAMESPACE icu
112 namespace U_ICU_NAMESPACE { }
113 # else
114 # define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
115 namespace U_ICU_NAMESPACE { }
116 namespace icu = U_ICU_NAMESPACE;
117 # endif
118
119 # define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE {
120 # define U_NAMESPACE_END } }
121 # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
122 # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
123
124 # ifndef U_USING_ICU_NAMESPACE
125 # define U_USING_ICU_NAMESPACE 1
126 # endif
127 # if U_USING_ICU_NAMESPACE
128 U_NAMESPACE_USE
129 # endif
130 #else
131 # define U_NAMESPACE_BEGIN
132 # define U_NAMESPACE_END
133 # define U_NAMESPACE_USE
134 # define U_NAMESPACE_QUALIFIER
135 #endif
136
137 /*===========================================================================*/
138 /* General version helper functions. Definitions in putil.c */
139 /*===========================================================================*/
140
152 U_STABLE void U_EXPORT2
153 u_versionFromString(UVersionInfo versionArray, const char *versionString);
154
166 U_STABLE void U_EXPORT2
167 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
168
169
182 U_STABLE void U_EXPORT2
183 u_versionToString(const UVersionInfo versionArray, char *versionString);
184
193 U_STABLE void U_EXPORT2
194 u_getVersion(UVersionInfo versionArray);
195 #endif
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
uvernum.h
C API: definitions of ICU version numbers.
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
u_getVersion
void u_getVersion(UVersionInfo versionArray)
Gets the ICU release version.
u_versionFromString
void u_versionFromString(UVersionInfo versionArray, const char *versionString)
Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the ...
umachine.h
Basic types and constants for UTF.
icu
File coll.h.
Definition: appendable.h:28
U_NAMESPACE_USE
#define U_NAMESPACE_USE
This is used to specify that the rest of the code uses the public ICU C++ API namespace.
Definition: uversion.h:133
UChar
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:349
u_versionToString
void u_versionToString(const UVersionInfo versionArray, char *versionString)
Write a string with dotted-decimal version information according to the input UVersionInfo.
u_versionFromUString
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_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111