ICU 56.1: uversion.h Source File

ICU 56.1 56.1

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

- File List
- Globals

uversion.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2000-2011, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *******************************************************************************
6 *
7 * file name: uversion.h
8 * encoding: US-ASCII
9 * tab size: 8 (not used)
10 * indentation:4
11 *
12 * Created by: Vladimir Weinstein
13 *
14 * Gets included by utypes.h and Windows .rc files
15 */
16
21 /*===========================================================================*/
22 /* Main ICU version information */
23 /*===========================================================================*/
24
25 #ifndef UVERSION_H
26 #define UVERSION_H
27
28 #include "unicode/umachine.h"
29
30 /* Actual version info lives in uvernum.h */
31 #include "unicode/uvernum.h"
32
36 #define U_COPYRIGHT_STRING_LENGTH 128
37
41 #define U_MAX_VERSION_LENGTH 4
42
46 #define U_VERSION_DELIMITER '.'
47
51 #define U_MAX_VERSION_STRING_LENGTH 20
52
57 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
58
59 /*===========================================================================*/
60 /* C++ namespace if supported. Versioned unless versioning is disabled. */
61 /*===========================================================================*/
62
106 /* Define namespace symbols if the compiler supports it. */
107 #ifdef __cplusplus
108 # if U_DISABLE_RENAMING
109 # define U_ICU_NAMESPACE icu
110 namespace U_ICU_NAMESPACE { }
111 # else
112 # define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
113 namespace U_ICU_NAMESPACE { }
114 namespace icu = U_ICU_NAMESPACE;
115 # endif
116
117 # define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE {
118 # define U_NAMESPACE_END } }
119 # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
120 # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
121
122 # ifndef U_USING_ICU_NAMESPACE
123 # define U_USING_ICU_NAMESPACE 1
124 # endif
125 # if U_USING_ICU_NAMESPACE
126 U_NAMESPACE_USE
127 # endif
128 #else
129 # define U_NAMESPACE_BEGIN
130 # define U_NAMESPACE_END
131 # define U_NAMESPACE_USE
132 # define U_NAMESPACE_QUALIFIER
133 #endif
134
135 /*===========================================================================*/
136 /* General version helper functions. Definitions in putil.c */
137 /*===========================================================================*/
138
150 U_STABLE void U_EXPORT2
151 u_versionFromString(UVersionInfo versionArray, const char *versionString);
152
164 U_STABLE void U_EXPORT2
165 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
166
167
180 U_STABLE void U_EXPORT2
181 u_versionToString(const UVersionInfo versionArray, char *versionString);
182
191 U_STABLE void U_EXPORT2
192 u_getVersion(UVersionInfo versionArray);
193 #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:57
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:41
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:26
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:131
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
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:109