#include "unicode/umachine.h"
#include "unicode/utf.h"
#include "unicode/uversion.h"
#include "unicode/uconfig.h"
#include "unicode/putil.h"
Go to the source code of this file.
This file defines basic types, constants, and enumerations directly or indirectly by including other header files, especially utf.h for the basic character and string definitions and umachine.h for consistent integer and other types.
Definition in file utypes.h.
|
Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.
|
|
U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform.
|
|
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to make sure that the calling convention is compatible. This is only used for non-ICU-API functions. When a function is a public ICU API, you must use the U_CAPI and U_EXPORT2 qualifiers.
|
|
<. p>These definitions allow to specify the encoding of text in the char data type as defined by the platform and the compiler. It is enough to determine the code point values of "invariant characters", which are the ones shared by all encodings that are in use on a given platform.
Those "invariant characters" should be all the uppercase and lowercase latin letters, the digits, the space, and "basic punctuation". Also, '
The list of "invariant characters" is: A-Z a-z 0-9 SPACE " % & ' ( ) * + , - . / : ; < = > ? _ (52 letters + 10 numbers + 20 punc/sym/space = 82 total)
This matches the IBM Syntactic Character Set (CS 640).
In other words, all the graphic characters in 7-bit ASCII should be safely accessible except the following:
'\' <backslash> '[' <left bracket> ']' <right bracket> '{' <left brace> '}' <right brace> '^' <circumflex> '~' <tilde> '!' <exclamation mark> '#' <number sign> '|' <vertical line> '$' <dollar sign> '@' <commercial at> '`' <grave accent>
|
|
Set to export library symbols from inside the common library, and to import them from outside.
|
|
|
|
|
|
U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform.
|
|
Set to export library symbols from inside the i18n library, and to import them from outside.
|
|
U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data library. Defined as a literal, not a string. Tricky Preprocessor use - ## operator replaces macro paramters with the literal string from the corresponding macro invocation, _before_ other macro substitutions. Need a nested defines to get the actual version numbers rather than the literal text U_ICU_VERSION_MAJOR_NUM into the name. The net result will be something of the form define U_ICU_ENTRY_POINT icudt19_dat
|
|
A single string literal containing the icudata stub name. i.e. 'icudt18e' for ICU 1.8.x on EBCDIC, etc..
|
|
This is a platform-dependent string containing one letter: b for big-endian, ASCII-family platforms l for little-endian, ASCII-family platforms e for big-endian, EBCDIC-family platforms This letter is part of the common data file name.
|
|
The non-string form of U_ICUDATA_TYPE_LETTER.
|
|
Set to export library symbols from inside the layout extensions library, and to import them from outside.
|
|
Set to export library symbols from inside the layout engine library, and to import them from outside.
|
|
The number of milliseconds per day.
|
|
The number of milliseconds per hour.
|
|
The number of milliseconds per minute.
|
|
The number of milliseconds per second.
|
|
Control of C++ Namespace.
|
|
Set to export library symbols from inside the ustdio library, and to import them from outside.
|
|
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ compilers. Each class hierarchy which needs to implement polymorphic clone() or operator==() defines two methods, described in detail below. UClassID values can be compared using operator==(). Nothing else should be done with them. getDynamicClassID() is declared in the base class of the hierarchy as a pure virtual. Each concrete subclass implements it in the same way:
class Base { public: virtual UClassID getDynamicClassID() const = 0; } class Derived { public: virtual UClassID getDynamicClassID() const { return Derived::getStaticClassID(); } } Each concrete class implements getStaticClassID() as well, which allows clients to test for a specific type.
class Derived { public: static UClassID getStaticClassID(); private: static char fgClassID; } // In Derived.cpp: UClassID Derived::getStaticClassID() { return (UClassID)&Derived::fgClassID; } char Derived::fgClassID = 0; // Value is irrelevant
|
|
Date and Time data type. This is a primitive data type that holds the date and time as the number of milliseconds since 1970-jan-01, 00:00 UTC. UTC leap seconds are ignored.
|
|
Error code to replace exception handling, so that the code is compatible with all C++ compilers, and to use the same mechanism for C and C++.
ICU functions that take a reference (C++) or a pointer (C) to a UErrorCode first test if(U_FAILURE(errorCode)) { return immediately; } so that in a chain of such functions the first one that sets an error code causes the following ones to not perform any operations. Error codes should be tested using U_FAILURE() and U_SUCCESS().
|
|
Error code to replace exception handling, so that the code is compatible with all C++ compilers, and to use the same mechanism for C and C++.
ICU functions that take a reference (C++) or a pointer (C) to a UErrorCode first test if(U_FAILURE(errorCode)) { return immediately; } so that in a chain of such functions the first one that sets an error code causes the following ones to not perform any operations. Error codes should be tested using U_FAILURE() and U_SUCCESS().
|
|
Does the error code indicate a failure?
Definition at line 689 of file utypes.h. Referenced by Normalizer::isNormalized(), and Normalizer::quickCheck().
|
|
Does the error code indicate success?
Definition at line 683 of file utypes.h. Referenced by Formattable::getDate(), and SimpleNumberFormatFactory::getSupportedIDs().
|
|
Return a string for a UErrorCode value. The string will be the same as the name of the error code constant in the UErrorCode enum above.
|