uversion.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2000-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*
* file name: uversion.h
* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
* Created by: Vladimir Weinstein
*
* Gets included by utypes.h and Windows .rc files
*/
/*===========================================================================*/
/* Main ICU version information */
/*===========================================================================*/
#ifndef UVERSION_H
#define UVERSION_H
#include "unicode/umachine.h"
/* Actual version info lives in uvernum.h */
#include "unicode/uvernum.h"
#define U_COPYRIGHT_STRING_LENGTH 128
#define U_MAX_VERSION_LENGTH 4
#define U_VERSION_DELIMITER '.'
#define U_MAX_VERSION_STRING_LENGTH 20
typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
/*===========================================================================*/
/* C++ namespace if supported. Versioned unless versioning is disabled. */
/*===========================================================================*/
/* Define C++ namespace symbols. */
#ifdef __cplusplus
# if U_DISABLE_RENAMING
# define U_ICU_NAMESPACE icu
namespace U_ICU_NAMESPACE { }
# else
# define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
namespace U_ICU_NAMESPACE { }
namespace icu = U_ICU_NAMESPACE;
# endif
# define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
# define U_NAMESPACE_END }
# define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
# define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
# ifndef U_USING_ICU_NAMESPACE
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
# define U_USING_ICU_NAMESPACE 0
# else
# define U_USING_ICU_NAMESPACE 0
# endif
# endif
# if U_USING_ICU_NAMESPACE
U_NAMESPACE_USE
# endif
#ifndef U_HIDE_DRAFT_API
// The first test is the same as for defining U_EXPORT for Windows.
#if defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
# define U_HEADER_NESTED_NAMESPACE header
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
# define U_HEADER_NESTED_NAMESPACE internal
#else
# define U_HEADER_NESTED_NAMESPACE header
#endif
#define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
namespace U_HEADER_ONLY_NAMESPACE {}
#endif // U_HIDE_DRAFT_API
#endif /* __cplusplus */
/*===========================================================================*/
/* General version helper functions. Definitions in putil.c */
/*===========================================================================*/
U_CAPI void U_EXPORT2
u_versionFromString(UVersionInfo versionArray, const char *versionString);
U_CAPI void U_EXPORT2
u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
U_CAPI void U_EXPORT2
u_versionToString(const UVersionInfo versionArray, char *versionString);
U_CAPI void U_EXPORT2
u_getVersion(UVersionInfo versionArray);
#endif
icu
File coll.h.
Definition: appendable.h:31
umachine.h
Basic types and constants for UTF.
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:378
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