umachine.h File Reference


Detailed Description

Basic types and constants for UTF.

Basic types and constants for UTF

This file defines basic types and constants for utf.h to be platform-independent. umachine.h and utf.h are included into utypes.h to provide all the general definitions for ICU. All of these definitions used to be in utypes.h before the UTF-handling macros made this unmaintainable.

Definition in file umachine.h.

#include "unicode/platform.h"
#include <stddef.h>
#include "unicode/urename.h"

Go to the source code of this file.

Defines

#define U_CFUNC   extern
 This is used in a declaration of a library private ICU C function.

#define U_CDECL_BEGIN
 This is used to begin a declaration of a library private ICU C API.

#define U_CDECL_END
 This is used to end a declaration of a library private ICU C API.

#define U_NAMESPACE_BEGIN
 This is used to begin a declaration of a public ICU C++ API.

#define U_NAMESPACE_END
 This is used to end a declaration of a public ICU C++ API If the compiler doesn't support namespaces, this does nothing.

#define U_NAMESPACE_USE
 This is used to specify that the rest of the code uses the public ICU C++ API namespace.

#define U_NAMESPACE_QUALIFIER
 This is used to qualify that a function or class is part of the public ICU C++ API namespace.

#define U_CAPI   U_CFUNC U_EXPORT
 This is used to declare a function as a public ICU C API.

#define U_STABLE   U_CAPI
#define U_DRAFT   U_CAPI
#define U_DEPRECATED   U_CAPI
#define U_OBSOLETE   U_CAPI
#define U_INTERNAL   U_CAPI
#define INT8_MIN   ((int8_t)(-128))
 The smallest value an 8 bit signed integer can hold.

#define INT16_MIN   ((int16_t)(-32767-1))
 The smallest value a 16 bit signed integer can hold.

#define INT32_MIN   ((int32_t)(-2147483647-1))
 The smallest value a 32 bit signed integer can hold.

#define INT8_MAX   ((int8_t)(127))
 The largest value an 8 bit signed integer can hold.

#define INT16_MAX   ((int16_t)(32767))
 The largest value a 16 bit signed integer can hold.

#define INT32_MAX   ((int32_t)(2147483647))
 The largest value a 32 bit signed integer can hold.

#define UINT8_MAX   ((uint8_t)(255U))
 The largest value an 8 bit unsigned integer can hold.

#define UINT16_MAX   ((uint16_t)(65535U))
 The largest value a 16 bit unsigned integer can hold.

#define UINT32_MAX   ((uint32_t)(4294967295U))
 The largest value a 32 bit unsigned integer can hold.

#define INT64_C(c)   c ## LL
 Provides a platform independent way to specify a signed 64-bit integer constant.

#define UINT64_C(c)   c ## ULL
 Provides a platform independent way to specify an unsigned 64-bit integer constant.

#define U_INT64_MIN   ((int64_t)(INT64_C(-9223372036854775807)-1))
 The smallest value a 64 bit signed integer can hold.

#define U_INT64_MAX   ((int64_t)(INT64_C(9223372036854775807)))
 The largest value a 64 bit signed integer can hold.

#define U_UINT64_MAX   ((uint64_t)(UINT64_C(18446744073709551615)))
 The largest value a 64 bit unsigned integer can hold.

#define TRUE   1
 The TRUE value of a UBool.

#define FALSE   0
 The FALSE value of a UBool.

#define U_HAVE_WCHAR_H   1
 Indicates whether <wchar.h> is available (1) or not (0).

#define U_SIZEOF_WCHAR_T   4
 U_SIZEOF_WCHAR_T==sizeof(wchar_t) (0 means it is not defined or autoconf could not set it).

#define U_SIZEOF_UCHAR   2
 Number of bytes in a UChar.

#define U_ALIGN_CODE(n)
 This is used to align code fragments to a specific byte boundary.


Typedefs

typedef int8_t UBool
 The ICU boolean type.

typedef uint16_t UChar
 Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.

typedef int32_t UChar32
 Define UChar32 as a type for single Unicode code points.


Define Documentation

#define FALSE   0
 

The FALSE value of a UBool.

Stable:
ICU 2.0

Definition at line 274 of file umachine.h.

Referenced by UnicodeString::extractBetween(), UnicodeString::lastIndexOf(), and Normalizer::operator!=().

#define INT16_MAX   ((int16_t)(32767))
 

The largest value a 16 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 194 of file umachine.h.

#define INT16_MIN   ((int16_t)(-32767-1))
 

The smallest value a 16 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 178 of file umachine.h.

#define INT32_MAX   ((int32_t)(2147483647))
 

The largest value a 32 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 199 of file umachine.h.

Referenced by UnicodeString::isEmpty().

#define INT32_MIN   ((int32_t)(-2147483647-1))
 

The smallest value a 32 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 183 of file umachine.h.

#define INT64_C  )     c ## LL
 

Provides a platform independent way to specify a signed 64-bit integer constant.

note: may be wrong for some 64 bit platforms - ensure your compiler provides INT64_C

Draft:
This API may be changed in the future versions and was introduced in ICU 2.8

Definition at line 229 of file umachine.h.

#define INT8_MAX   ((int8_t)(127))
 

The largest value an 8 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 189 of file umachine.h.

#define INT8_MIN   ((int8_t)(-128))
 

The smallest value an 8 bit signed integer can hold.

Stable:
ICU 2.0

Definition at line 173 of file umachine.h.

#define TRUE   1
 

The TRUE value of a UBool.

Stable:
ICU 2.0

Definition at line 269 of file umachine.h.

Referenced by UnicodeString::operator=().

#define U_ALIGN_CODE  ) 
 

This is used to align code fragments to a specific byte boundary.

This is useful for getting consistent performance test results.

Internal:
Do not use. This API is for interal use only.

Definition at line 402 of file umachine.h.

#define U_CAPI   U_CFUNC U_EXPORT
 

This is used to declare a function as a public ICU C API.

Stable:
ICU 2.0

Definition at line 159 of file umachine.h.

#define U_CDECL_BEGIN
 

This is used to begin a declaration of a library private ICU C API.

Stable:
ICU 2.4

Definition at line 106 of file umachine.h.

#define U_CDECL_END
 

This is used to end a declaration of a library private ICU C API.

Stable:
ICU 2.4

Definition at line 107 of file umachine.h.

#define U_CFUNC   extern
 

This is used in a declaration of a library private ICU C function.

Stable:
ICU 2.4

Definition at line 105 of file umachine.h.

#define U_DEPRECATED   U_CAPI
 

Definition at line 162 of file umachine.h.

#define U_DRAFT   U_CAPI
 

Definition at line 161 of file umachine.h.

#define U_HAVE_WCHAR_H   1
 

Indicates whether <wchar.h> is available (1) or not (0).

Set to 1 by default.

Stable:
ICU 2.0

Definition at line 292 of file umachine.h.

#define U_INT64_MAX   ((int64_t)(INT64_C(9223372036854775807)))
 

The largest value a 64 bit signed integer can hold.

Stable:
ICU 2.8

Definition at line 249 of file umachine.h.

#define U_INT64_MIN   ((int64_t)(INT64_C(-9223372036854775807)-1))
 

The smallest value a 64 bit signed integer can hold.

Stable:
ICU 2.8

Definition at line 244 of file umachine.h.

#define U_INTERNAL   U_CAPI
 

Definition at line 164 of file umachine.h.

#define U_NAMESPACE_BEGIN
 

This is used to begin a declaration of a public ICU C++ API.

If the compiler doesn't support namespaces, this does nothing.

Stable:
ICU 2.4

Definition at line 151 of file umachine.h.

#define U_NAMESPACE_END
 

This is used to end a declaration of a public ICU C++ API If the compiler doesn't support namespaces, this does nothing.

Stable:
ICU 2.4

Definition at line 152 of file umachine.h.

Referenced by ICULayoutEngine::createInstance(), Replaceable::length(), and CollationElementIterator::secondaryOrder().

#define U_NAMESPACE_QUALIFIER
 

This is used to qualify that a function or class is part of the public ICU C++ API namespace.

If the compiler doesn't support namespaces, this does nothing.

Stable:
ICU 2.4

Definition at line 154 of file umachine.h.

#define U_NAMESPACE_USE
 

This is used to specify that the rest of the code uses the public ICU C++ API namespace.

If the compiler doesn't support namespaces, this does nothing.

Stable:
ICU 2.4

Definition at line 153 of file umachine.h.

#define U_OBSOLETE   U_CAPI
 

Definition at line 163 of file umachine.h.

#define U_SIZEOF_UCHAR   2
 

Number of bytes in a UChar.

Stable:
ICU 2.0

Definition at line 345 of file umachine.h.

#define U_SIZEOF_WCHAR_T   4
 

U_SIZEOF_WCHAR_T==sizeof(wchar_t) (0 means it is not defined or autoconf could not set it).

Stable:
ICU 2.0

Definition at line 304 of file umachine.h.

#define U_STABLE   U_CAPI
 

Definition at line 160 of file umachine.h.

#define U_UINT64_MAX   ((uint64_t)(UINT64_C(18446744073709551615)))
 

The largest value a 64 bit unsigned integer can hold.

Stable:
ICU 2.8

Definition at line 254 of file umachine.h.

#define UINT16_MAX   ((uint16_t)(65535U))
 

The largest value a 16 bit unsigned integer can hold.

Stable:
ICU 2.0

Definition at line 210 of file umachine.h.

#define UINT32_MAX   ((uint32_t)(4294967295U))
 

The largest value a 32 bit unsigned integer can hold.

Stable:
ICU 2.0

Definition at line 215 of file umachine.h.

#define UINT64_C  )     c ## ULL
 

Provides a platform independent way to specify an unsigned 64-bit integer constant.

note: may be wrong for some 64 bit platforms - ensure your compiler provides UINT64_C

Draft:
This API may be changed in the future versions and was introduced in ICU 2.8

Definition at line 239 of file umachine.h.

#define UINT8_MAX   ((uint8_t)(255U))
 

The largest value an 8 bit unsigned integer can hold.

Stable:
ICU 2.0

Definition at line 205 of file umachine.h.


Typedef Documentation

typedef int8_t UBool
 

The ICU boolean type.

Stable:
ICU 2.0

Definition at line 264 of file umachine.h.

Referenced by UnicodeString::caseCompareBetween(), UnicodeString::endsWith(), UnicodeString::extractBetween(), ForwardCharacterIterator::ForwardCharacterIterator(), Calendar::getGregorianDayOfMonth(), UnicodeString::indexOf(), Calendar::internalGetTime(), UnicodeString::lastIndexOf(), RegexPattern::operator!=(), and ParsePosition::operator=().

UChar
 

Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.

If wchar_t is not 16 bits wide, then define UChar to be uint16_t. This makes the definition of UChar platform-dependent but allows direct string type compatibility with platforms with 16-bit wchar_t types.

Stable:
ICU 2.0

Definition at line 363 of file umachine.h.

Referenced by UnicodeString::extractBetween(), ForwardCharacterIterator::ForwardCharacterIterator(), UnicodeString::lastIndexOf(), and UnicodeString::startsWith().

typedef int32_t UChar32
 

Define UChar32 as a type for single Unicode code points.

UChar32 is a signed 32-bit integer (same as int32_t).

The Unicode code point range is 0..0x10ffff. All other values (negative or >=0x110000) are illegal as Unicode code points. They may be used as sentinel values to indicate "done", "error" or similar non-code point conditions.

Before ICU 2.4 (Jitterbug 2146), UChar32 was defined to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned) or else to be uint32_t. That is, the definition of UChar32 was platform-dependent.

See also:
U_SENTINEL
Stable:
ICU 2.4

Definition at line 384 of file umachine.h.

Referenced by ForwardCharacterIterator::ForwardCharacterIterator(), and UnicodeString::startsWith().


Generated on Fri Jun 18 12:36:11 2004 for ICU by doxygen 1.3.7