ICU 57.1 57.1
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
58
59/*===========================================================================*/
60/* C++ namespace if supported. Versioned unless versioning is disabled. */
61/*===========================================================================*/
62
74
85
95
105
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
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
150U_STABLE void U_EXPORT2
151u_versionFromString(UVersionInfo versionArray, const char *versionString);
152
164U_STABLE void U_EXPORT2
165u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
166
167
180U_STABLE void U_EXPORT2
181u_versionToString(const UVersionInfo versionArray, char *versionString);
182
191U_STABLE void U_EXPORT2
193#endif
Basic types and constants for UTF.
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
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition umachine.h:109
C API: definitions of ICU version numbers.
void u_versionFromString(UVersionInfo versionArray, const char *versionString)
Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the ...
void u_versionToString(const UVersionInfo versionArray, char *versionString)
Write a string with dotted-decimal version information according to the input 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
#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
#define U_MAX_VERSION_LENGTH
An ICU version consists of up to 4 numbers from 0..255.
Definition uversion.h:41
void u_getVersion(UVersionInfo versionArray)
Gets the ICU release version.
void u_versionFromUString(UVersionInfo versionArray, const UChar *versionString)
Parse a Unicode string with dotted-decimal version information and fill in a UVersionInfo structure w...