ICU 73.2  73.2
uversion.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 *******************************************************************************
00005 *   Copyright (C) 2000-2011, International Business Machines
00006 *   Corporation and others.  All Rights Reserved.
00007 *******************************************************************************
00008 *
00009 *   file name:  uversion.h
00010 *   encoding:   UTF-8
00011 *   tab size:   8 (not used)
00012 *   indentation:4
00013 *
00014 *   Created by: Vladimir Weinstein
00015 *
00016 *  Gets included by utypes.h and Windows .rc files
00017 */
00018 
00023 /*===========================================================================*/
00024 /* Main ICU version information                                              */
00025 /*===========================================================================*/
00026 
00027 #ifndef UVERSION_H
00028 #define UVERSION_H
00029 
00030 #include "unicode/umachine.h"
00031 
00032 /* Actual version info lives in uvernum.h */
00033 #include "unicode/uvernum.h"
00034 
00038 #define U_COPYRIGHT_STRING_LENGTH  128
00039 
00043 #define U_MAX_VERSION_LENGTH 4
00044 
00048 #define U_VERSION_DELIMITER '.'
00049 
00053 #define U_MAX_VERSION_STRING_LENGTH 20
00054 
00059 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
00060 
00061 /*===========================================================================*/
00062 /* C++ namespace if supported. Versioned unless versioning is disabled.      */
00063 /*===========================================================================*/
00064 
00065 /* Define C++ namespace symbols. */
00066 #ifdef __cplusplus
00067 
00101 #   if U_DISABLE_RENAMING
00102 #       define U_ICU_NAMESPACE icu
00103         namespace U_ICU_NAMESPACE { }
00104 #   else
00105 #       define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
00106         namespace U_ICU_NAMESPACE { }
00107         namespace icu = U_ICU_NAMESPACE;
00108 #   endif
00109 
00110 #   define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
00111 #   define U_NAMESPACE_END }
00112 #   define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
00113 #   define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
00114 
00115 #   ifndef U_USING_ICU_NAMESPACE
00116 #       if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
00117                 defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
00118                 defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
00119 #           define U_USING_ICU_NAMESPACE 0
00120 #       else
00121 #           define U_USING_ICU_NAMESPACE 0
00122 #       endif
00123 #   endif
00124 #   if U_USING_ICU_NAMESPACE
00125         U_NAMESPACE_USE
00126 #   endif
00127 #endif /* __cplusplus */
00128 
00129 /*===========================================================================*/
00130 /* General version helper functions. Definitions in putil.c                  */
00131 /*===========================================================================*/
00132 
00144 U_CAPI void U_EXPORT2
00145 u_versionFromString(UVersionInfo versionArray, const char *versionString);
00146 
00158 U_CAPI void U_EXPORT2
00159 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
00160 
00161 
00174 U_CAPI void U_EXPORT2
00175 u_versionToString(const UVersionInfo versionArray, char *versionString);
00176 
00185 U_CAPI void U_EXPORT2
00186 u_getVersion(UVersionInfo versionArray);
00187 #endif