mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-13810 Doxygen warning cleanup.
This commit is contained in:
parent
e21982ce40
commit
35ce5296c1
43 changed files with 2665 additions and 443 deletions
File diff suppressed because it is too large
Load diff
|
@ -28,6 +28,8 @@ U_NAMESPACE_BEGIN
|
|||
// Use the predefined value.
|
||||
#elif (defined(__clang__) || defined(__GNUC__)) && U_PLATFORM != U_PF_BROWSER_NATIVE_CLIENT
|
||||
# define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory")
|
||||
#elif defined(U_IN_DOXYGEN)
|
||||
# define U_ALIASING_BARRIER(ptr)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -103,6 +105,7 @@ private:
|
|||
#endif
|
||||
};
|
||||
|
||||
/// \cond
|
||||
#ifdef U_ALIASING_BARRIER
|
||||
|
||||
Char16Ptr::Char16Ptr(char16_t *p) : p_(p) {}
|
||||
|
@ -134,6 +137,7 @@ Char16Ptr::~Char16Ptr() {}
|
|||
char16_t *Char16Ptr::get() const { return u_.cp; }
|
||||
|
||||
#endif
|
||||
/// \endcond
|
||||
|
||||
/**
|
||||
* const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
|
||||
|
@ -209,6 +213,7 @@ private:
|
|||
#endif
|
||||
};
|
||||
|
||||
/// \cond
|
||||
#ifdef U_ALIASING_BARRIER
|
||||
|
||||
ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {}
|
||||
|
@ -240,6 +245,7 @@ ConstChar16Ptr::~ConstChar16Ptr() {}
|
|||
const char16_t *ConstChar16Ptr::get() const { return u_.cp; }
|
||||
|
||||
#endif
|
||||
/// \endcond
|
||||
|
||||
/**
|
||||
* Converts from const char16_t * to const UChar *.
|
||||
|
|
|
@ -208,9 +208,9 @@
|
|||
* <td>C API</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Layout Engine/Complex Text Layout</td>
|
||||
* <td>loengine.h</td>
|
||||
* <td>icu::LayoutEngine,icu::ParagraphLayout</td>
|
||||
* <td>Paragraph Layout / Complex Text Layout</td>
|
||||
* <td>playout.h</td>
|
||||
* <td>icu::ParagraphLayout</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>ICU I/O</td>
|
||||
|
|
|
@ -24,8 +24,8 @@ class UnicodeString;
|
|||
* in linear progression. Does not support moving/reordering of text.
|
||||
*
|
||||
* There are two types of edits: <em>change edits</em> and <em>no-change edits</em>. Add edits to
|
||||
* instances of this class using {@link #addReplace(int, int)} (for change edits) and
|
||||
* {@link #addUnchanged(int)} (for no-change edits). Change edits are retained with full granularity,
|
||||
* instances of this class using {@link #addReplace(int32_t, int32_t)} (for change edits) and
|
||||
* {@link #addUnchanged(int32_t)} (for no-change edits). Change edits are retained with full granularity,
|
||||
* whereas adjacent no-change edits are always merged together. In no-change edits, there is a one-to-one
|
||||
* mapping between code points in the source and destination strings.
|
||||
*
|
||||
|
@ -62,11 +62,11 @@ class UnicodeString;
|
|||
* </ul>
|
||||
*
|
||||
* The "fine changes" and "coarse changes" iterators will step through only the change edits when their
|
||||
* {@link Edits::Iterator#next()} methods are called. They are identical to the non-change iterators when
|
||||
* their {@link Edits::Iterator#findSourceIndex(int)} or {@link Edits::Iterator#findDestinationIndex(int)}
|
||||
* `Edits::Iterator::next()` methods are called. They are identical to the non-change iterators when
|
||||
* their `Edits::Iterator::findSourceIndex()` or `Edits::Iterator::findDestinationIndex()`
|
||||
* methods are used to walk through the string.
|
||||
*
|
||||
* For examples of how to use this class, see the test <code>TestCaseMapEditsIteratorDocs</code> in
|
||||
* For examples of how to use this class, see the test `TestCaseMapEditsIteratorDocs` in
|
||||
* UCharacterCaseTest.java.
|
||||
*
|
||||
* An Edits object tracks a separate UErrorCode, but ICU string transformation functions
|
||||
|
@ -189,9 +189,9 @@ public:
|
|||
* starts at {@link #sourceIndex()} and runs for {@link #oldLength()} chars; the destination string
|
||||
* span starts at {@link #destinationIndex()} and runs for {@link #newLength()} chars.
|
||||
*
|
||||
* The iterator can be moved between edits using the {@link #next()}, {@link #findSourceIndex(int)},
|
||||
* and {@link #findDestinationIndex(int)} methods. Calling any of these methods mutates the iterator
|
||||
* to make it point to the corresponding edit.
|
||||
* The iterator can be moved between edits using the `next()`, `findSourceIndex(int32_t, UErrorCode &)`,
|
||||
* and `findDestinationIndex(int32_t, UErrorCode &)` methods.
|
||||
* Calling any of these methods mutates the iterator to make it point to the corresponding edit.
|
||||
*
|
||||
* For more information, see the documentation for {@link Edits}.
|
||||
*
|
||||
|
@ -366,13 +366,13 @@ public:
|
|||
/**
|
||||
* The start index of the current span in the replacement string; the span has length
|
||||
* {@link #newLength}. Well-defined only if the current edit is a change edit.
|
||||
* <p>
|
||||
* The <em>replacement string</em> is the concatenation of all substrings of the destination
|
||||
*
|
||||
* The *replacement string* is the concatenation of all substrings of the destination
|
||||
* string corresponding to change edits.
|
||||
* <p>
|
||||
*
|
||||
* This method is intended to be used together with operations that write only replacement
|
||||
* characters (e.g., {@link CaseMap#omitUnchangedText()}). The source string can then be modified
|
||||
* in-place.
|
||||
* characters (e.g. operations specifying the \ref U_OMIT_UNCHANGED_TEXT option).
|
||||
* The source string can then be modified in-place.
|
||||
*
|
||||
* @return the current index into the replacement-characters-only string,
|
||||
* not counting unchanged spans
|
||||
|
|
|
@ -28,6 +28,7 @@ U_NAMESPACE_BEGIN
|
|||
* enum bitset for boolean fields. Similar to Java EnumSet<>.
|
||||
* Needs to range check. Used for private instance variables.
|
||||
* @internal
|
||||
* \cond
|
||||
*/
|
||||
template<typename T, uint32_t minValue, uint32_t limitValue>
|
||||
class EnumSet {
|
||||
|
@ -60,6 +61,8 @@ private:
|
|||
uint32_t fBools;
|
||||
};
|
||||
|
||||
/** \endcond */
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* U_SHOW_CPLUSPLUS_API */
|
||||
|
|
|
@ -95,7 +95,7 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
|
|||
* This function does not create any new segment boundaries, but only serves to un-do
|
||||
* the effect of earlier calls to suppressBreakAfter, or to un-do the effect of
|
||||
* locale data which may be suppressing certain strings.
|
||||
* @param exception the exception to remove
|
||||
* @param string the exception to remove
|
||||
* @param status error code
|
||||
* @return returns TRUE if the string was present and now removed,
|
||||
* FALSE if the call was a no-op because the string was not being suppressed.
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
#include "unicode/utypes.h"
|
||||
|
||||
|
||||
#if UCONFIG_ENABLE_PLUGINS
|
||||
#if UCONFIG_ENABLE_PLUGINS || defined(U_IN_DOXYGEN)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,10 @@ class Hashtable;
|
|||
struct ListFormatInternal;
|
||||
|
||||
/* The following can't be #ifndef U_HIDE_INTERNAL_API, needed for other .h file declarations */
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* \cond
|
||||
*/
|
||||
struct ListFormatData : public UMemory {
|
||||
UnicodeString twoPattern;
|
||||
UnicodeString startPattern;
|
||||
|
@ -43,6 +46,7 @@ struct ListFormatData : public UMemory {
|
|||
ListFormatData(const UnicodeString& two, const UnicodeString& start, const UnicodeString& middle, const UnicodeString& end) :
|
||||
twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end) {}
|
||||
};
|
||||
/** \endcond */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* and/or from other macros that are predefined by the compiler
|
||||
* or defined in standard (POSIX or platform or compiler) headers.
|
||||
*
|
||||
* As a temporary workaround, you can add an explicit <code>#define</code> for some macros
|
||||
* As a temporary workaround, you can add an explicit \#define for some macros
|
||||
* before it is first tested, or add an equivalent -D macro definition
|
||||
* to the compiler's command line.
|
||||
*
|
||||
|
@ -207,6 +207,9 @@
|
|||
# define CYGWINMSVC
|
||||
#endif
|
||||
*/
|
||||
#ifdef U_IN_DOXYGEN
|
||||
# define CYGWINMSVC
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def U_PLATFORM_USES_ONLY_WIN32_API
|
||||
|
@ -493,13 +496,8 @@ namespace std {
|
|||
*/
|
||||
#ifdef U_NOEXCEPT
|
||||
/* Use the predefined value. */
|
||||
#elif defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS /* Visual Studio */
|
||||
# define U_NOEXCEPT
|
||||
#elif U_CPLUSPLUS_VERSION >= 11 || __has_feature(cxx_noexcept) || __has_extension(cxx_noexcept) \
|
||||
|| (defined(_MSC_VER) && _MSC_VER >= 1900) /* Visual Studio 2015 */
|
||||
# define U_NOEXCEPT noexcept
|
||||
#else
|
||||
# define U_NOEXCEPT
|
||||
# define U_NOEXCEPT noexcept
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -763,7 +761,8 @@ namespace std {
|
|||
#elif U_HAVE_CHAR16_T \
|
||||
|| (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
|
||||
|| (defined(__HP_aCC) && __HP_aCC >= 035000) \
|
||||
|| (defined(__HP_cc) && __HP_cc >= 111106)
|
||||
|| (defined(__HP_cc) && __HP_cc >= 111106) \
|
||||
|| (defined(U_IN_DOXYGEN))
|
||||
# define U_DECLARE_UTF16(string) u ## string
|
||||
#elif U_SIZEOF_WCHAR_T == 2 \
|
||||
&& (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__)))
|
||||
|
|
|
@ -83,6 +83,7 @@ typedef unsigned char uint8_t;
|
|||
|
||||
#else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */
|
||||
|
||||
/// \cond
|
||||
#if ! U_HAVE_INT8_T
|
||||
typedef signed char int8_t;
|
||||
#endif
|
||||
|
@ -122,6 +123,7 @@ typedef unsigned int uint32_t;
|
|||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
/// \endcond
|
||||
|
||||
#endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
*/
|
||||
|
||||
// Forward declaration.
|
||||
/// \cond
|
||||
struct UHashtable;
|
||||
typedef struct UHashtable UHashtable;
|
||||
/// \endcond
|
||||
|
||||
/**
|
||||
* Build options for BytesTrieBuilder and CharsTrieBuilder.
|
||||
|
@ -188,7 +190,10 @@ protected:
|
|||
|
||||
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
|
||||
// it is needed for layout of other objects.
|
||||
/** @internal */
|
||||
/**
|
||||
* @internal
|
||||
* \cond
|
||||
*/
|
||||
class Node : public UObject {
|
||||
public:
|
||||
Node(int32_t initialHash) : hash(initialHash), offset(0) {}
|
||||
|
@ -391,7 +396,9 @@ protected:
|
|||
int32_t length;
|
||||
Node *next; // A branch sub-node.
|
||||
};
|
||||
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
/// \endcond
|
||||
|
||||
/** @internal */
|
||||
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
|
||||
|
|
|
@ -26,33 +26,38 @@
|
|||
/**
|
||||
* \file
|
||||
* \brief Bidi Transformations
|
||||
*/
|
||||
|
||||
/**
|
||||
* `UBiDiOrder` indicates the order of text.
|
||||
*
|
||||
* <code>UBiDiOrder</code> indicates the order of text.<p>
|
||||
* This bidi transformation engine supports all possible combinations (4 in
|
||||
* total) of input and output text order:
|
||||
* <ul>
|
||||
* <li><logical input, visual output>: unless the output direction is RTL, this
|
||||
* corresponds to a normal operation of the Bidi algorithm as described in the
|
||||
* Unicode Technical Report and implemented by <code>UBiDi</code> when the
|
||||
* reordering mode is set to <code>UBIDI_REORDER_DEFAULT</code>. Visual RTL
|
||||
* mode is not supported by <code>UBiDi</code> and is accomplished through
|
||||
* reversing a visual LTR string,</li>
|
||||
* <li><visual input, logical output>: unless the input direction is RTL, this
|
||||
* corresponds to an "inverse bidi algorithm" in <code>UBiDi</code> with the
|
||||
* reordering mode set to <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code>.
|
||||
* Visual RTL mode is not not supported by <code>UBiDi</code> and is
|
||||
* accomplished through reversing a visual LTR string,</li>
|
||||
* <li><logical input, logical output>: if the input and output base directions
|
||||
* mismatch, this corresponds to the <code>UBiDi</code> implementation with the
|
||||
* reordering mode set to <code>UBIDI_REORDER_RUNS_ONLY</code>; and if the
|
||||
* input and output base directions are identical, the transformation engine
|
||||
* will only handle character mirroring and Arabic shaping operations without
|
||||
* reordering,</li>
|
||||
* <li><visual input, visual output>: this reordering mode is not supported by
|
||||
* the <code>UBiDi</code> engine; it implies character mirroring, Arabic
|
||||
* shaping, and - if the input/output base directions mismatch - string
|
||||
* reverse operations.</li>
|
||||
* </ul>
|
||||
*
|
||||
* - <logical input, visual output>: unless the output direction is RTL, this
|
||||
* corresponds to a normal operation of the Bidi algorithm as described in the
|
||||
* Unicode Technical Report and implemented by `UBiDi` when the
|
||||
* reordering mode is set to `UBIDI_REORDER_DEFAULT`. Visual RTL
|
||||
* mode is not supported by `UBiDi` and is accomplished through
|
||||
* reversing a visual LTR string,
|
||||
*
|
||||
* - <visual input, logical output>: unless the input direction is RTL, this
|
||||
* corresponds to an "inverse bidi algorithm" in `UBiDi` with the
|
||||
* reordering mode set to `UBIDI_REORDER_INVERSE_LIKE_DIRECT`.
|
||||
* Visual RTL mode is not not supported by `UBiDi` and is
|
||||
* accomplished through reversing a visual LTR string,
|
||||
*
|
||||
* - <logical input, logical output>: if the input and output base directions
|
||||
* mismatch, this corresponds to the `UBiDi` implementation with the
|
||||
* reordering mode set to `UBIDI_REORDER_RUNS_ONLY`; and if the
|
||||
* input and output base directions are identical, the transformation engine
|
||||
* will only handle character mirroring and Arabic shaping operations without
|
||||
* reordering,
|
||||
*
|
||||
* - <visual input, visual output>: this reordering mode is not supported by
|
||||
* the `UBiDi` engine; it implies character mirroring, Arabic
|
||||
* shaping, and - if the input/output base directions mismatch - string
|
||||
* reverse operations.
|
||||
* @see ubidi_setInverse
|
||||
* @see ubidi_setReorderingMode
|
||||
* @see UBIDI_REORDER_DEFAULT
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
*/
|
||||
#ifdef U_HAVE_LIB_SUFFIX
|
||||
/* Use the predefined value. */
|
||||
#elif defined(U_LIB_SUFFIX_C_NAME)
|
||||
#elif defined(U_LIB_SUFFIX_C_NAME) || defined(U_IN_DOXYGEN)
|
||||
# define U_HAVE_LIB_SUFFIX 1
|
||||
#endif
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ enum UCurrencyUsage {
|
|||
UCURR_USAGE_COUNT=2
|
||||
#endif // U_HIDE_DEPRECATED_API
|
||||
};
|
||||
/** Currency Usage used for Decimal Format */
|
||||
typedef enum UCurrencyUsage UCurrencyUsage;
|
||||
|
||||
/**
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
* May result in an error if it applied to something not an override.
|
||||
* @internal
|
||||
*/
|
||||
#ifndef U_OVERRIDE
|
||||
#define U_OVERRIDE override
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def U_FINAL
|
||||
|
@ -133,24 +136,10 @@
|
|||
* May result in an error if subclasses attempt to override.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
#if U_CPLUSPLUS_VERSION >= 11
|
||||
/* C++11 */
|
||||
#ifndef U_OVERRIDE
|
||||
#define U_OVERRIDE override
|
||||
#endif
|
||||
#ifndef U_FINAL
|
||||
#if !defined(U_FINAL) || defined(U_IN_DOXYGEN)
|
||||
#define U_FINAL final
|
||||
#endif
|
||||
#else
|
||||
/* not C++11 - define to nothing */
|
||||
#ifndef U_OVERRIDE
|
||||
#define U_OVERRIDE
|
||||
#endif
|
||||
#ifndef U_FINAL
|
||||
#define U_FINAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*==========================================================================*/
|
||||
/* limits for int32_t etc., like in POSIX inttypes.h */
|
||||
|
@ -318,7 +307,7 @@ typedef int8_t UBool;
|
|||
* UChar is configurable by defining the macro UCHAR_TYPE
|
||||
* on the preprocessor or compiler command line:
|
||||
* -DUCHAR_TYPE=uint16_t or -DUCHAR_TYPE=wchar_t (if U_SIZEOF_WCHAR_T==2) etc.
|
||||
* (The UCHAR_TYPE can also be #defined earlier in this file, for outside the ICU library code.)
|
||||
* (The UCHAR_TYPE can also be \#defined earlier in this file, for outside the ICU library code.)
|
||||
* This is for transitional use from application code that uses uint16_t or wchar_t for UTF-16.
|
||||
*
|
||||
* The default is UChar=char16_t.
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @{
|
||||
* \def U_NO_THROW
|
||||
* Define this to define the throw() specification so
|
||||
* certain functions do not throw any exceptions
|
||||
|
@ -44,8 +43,6 @@
|
|||
#define U_NO_THROW throw()
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* UClassID-based RTTI */
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -895,35 +895,32 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count);
|
|||
* parameters.
|
||||
* The string parameter must be a C string literal.
|
||||
* The length of the string, not including the terminating
|
||||
* <code>NUL</code>, must be specified as a constant.
|
||||
* `NUL`, must be specified as a constant.
|
||||
* The U_STRING_DECL macro should be invoked exactly once for one
|
||||
* such string variable before it is used.
|
||||
*
|
||||
* Usage:
|
||||
* <pre>
|
||||
* U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11);
|
||||
* U_STRING_DECL(ustringVar2, "jumps 5%", 8);
|
||||
* static UBool didInit=FALSE;
|
||||
*
|
||||
* U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11);
|
||||
* U_STRING_DECL(ustringVar2, "jumps 5%", 8);
|
||||
* static UBool didInit=FALSE;
|
||||
*
|
||||
* int32_t function() {
|
||||
* if(!didInit) {
|
||||
* U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11);
|
||||
* U_STRING_INIT(ustringVar2, "jumps 5%", 8);
|
||||
* didInit=TRUE;
|
||||
* }
|
||||
* return u_strcmp(ustringVar1, ustringVar2);
|
||||
* }
|
||||
*
|
||||
* int32_t function() {
|
||||
* if(!didInit) {
|
||||
* U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11);
|
||||
* U_STRING_INIT(ustringVar2, "jumps 5%", 8);
|
||||
* didInit=TRUE;
|
||||
* }
|
||||
* return u_strcmp(ustringVar1, ustringVar2);
|
||||
* }
|
||||
* </pre>
|
||||
* Note that the macros will NOT consistently work if their argument is another #`define`.
|
||||
* The following will not work on all platforms, don't use it.
|
||||
*
|
||||
* Note that the macros will NOT consistently work if their argument is another <code>#define</code>.
|
||||
* The following will not work on all platforms, don't use it.
|
||||
*
|
||||
* <pre>
|
||||
* #define GLUCK "Mr. Gluck"
|
||||
* U_STRING_DECL(var, GLUCK, 9)
|
||||
* U_STRING_INIT(var, GLUCK, 9)
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* Instead, use the string literal "Mr. Gluck" as the argument to both macro
|
||||
* calls.
|
||||
*
|
||||
|
|
|
@ -290,6 +290,11 @@ typedef double UDate;
|
|||
* @stable ICU 3.4
|
||||
*/
|
||||
|
||||
#ifdef U_IN_DOXYGEN
|
||||
// This definition is required when generating the API docs.
|
||||
#define U_COMBINED_IMPLEMENTATION 1
|
||||
#endif
|
||||
|
||||
#if defined(U_COMBINED_IMPLEMENTATION)
|
||||
#define U_DATA_API U_EXPORT
|
||||
#define U_COMMON_API U_EXPORT
|
||||
|
|
|
@ -266,6 +266,8 @@ public:
|
|||
* Use getBucket() to get the bucket's properties.
|
||||
*
|
||||
* @param name the string to be sorted into an index bucket
|
||||
* @param errorCode Error code, will be set with the reason if the
|
||||
* operation fails.
|
||||
* @return the bucket number for the name
|
||||
* @stable ICU 51
|
||||
*/
|
||||
|
@ -377,9 +379,10 @@ public:
|
|||
|
||||
|
||||
/**
|
||||
* Get the default label used for abbreviated buckets <i>between</i> other index characters.
|
||||
* For example, consider the labels when Latin and Greek are used:
|
||||
* X Y Z ... Α Β Γ.
|
||||
* Get the default label used for abbreviated buckets *between* other index characters.
|
||||
* For example, consider the labels when Latin (X Y Z) and Greek (Α Β Γ) are used:
|
||||
*
|
||||
* X Y Z ... Α Β Γ.
|
||||
*
|
||||
* @return inflow label
|
||||
* @stable ICU 4.8
|
||||
|
@ -700,6 +703,7 @@ public:
|
|||
/**
|
||||
* A (name, data) pair, to be sorted by name into one of the index buckets.
|
||||
* The user data is not used by the index implementation.
|
||||
* \cond
|
||||
* @internal
|
||||
*/
|
||||
struct Record: public UMemory {
|
||||
|
@ -708,6 +712,7 @@ public:
|
|||
Record(const UnicodeString &name, const void *data);
|
||||
~Record();
|
||||
};
|
||||
/** \endcond */
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
private:
|
||||
|
|
|
@ -52,83 +52,64 @@ typedef int32_t UFieldResolutionTable[12][8];
|
|||
|
||||
class BasicTimeZone;
|
||||
/**
|
||||
* <code>Calendar</code> is an abstract base class for converting between
|
||||
* a <code>UDate</code> object and a set of integer fields such as
|
||||
* <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</code>,
|
||||
* and so on. (A <code>UDate</code> object represents a specific instant in
|
||||
* `Calendar` is an abstract base class for converting between
|
||||
* a `UDate` object and a set of integer fields such as
|
||||
* `YEAR`, `MONTH`, `DAY`, `HOUR`, and so on.
|
||||
* (A `UDate` object represents a specific instant in
|
||||
* time with millisecond precision. See UDate
|
||||
* for information about the <code>UDate</code> class.)
|
||||
* for information about the `UDate` class.)
|
||||
*
|
||||
* <p>
|
||||
* Subclasses of <code>Calendar</code> interpret a <code>UDate</code>
|
||||
* Subclasses of `Calendar` interpret a `UDate`
|
||||
* according to the rules of a specific calendar system.
|
||||
* The most commonly used subclass of <code>Calendar</code> is
|
||||
* <code>GregorianCalendar</code>. Other subclasses could represent
|
||||
* The most commonly used subclass of `Calendar` is
|
||||
* `GregorianCalendar`. Other subclasses could represent
|
||||
* the various types of lunar calendars in use in many parts of the world.
|
||||
*
|
||||
* <p>
|
||||
* <b>NOTE</b>: (ICU 2.6) The subclass interface should be considered unstable
|
||||
* - it WILL change.
|
||||
* **NOTE**: (ICU 2.6) The subclass interface should be considered unstable -
|
||||
* it WILL change.
|
||||
*
|
||||
* <p>
|
||||
* Like other locale-sensitive classes, <code>Calendar</code> provides a
|
||||
* static method, <code>createInstance</code>, for getting a generally useful
|
||||
* object of this type. <code>Calendar</code>'s <code>createInstance</code> method
|
||||
* returns the appropriate <code>Calendar</code> subclass whose
|
||||
* Like other locale-sensitive classes, `Calendar` provides a
|
||||
* static method, `createInstance`, for getting a generally useful
|
||||
* object of this type. `Calendar`'s `createInstance` method
|
||||
* returns the appropriate `Calendar` subclass whose
|
||||
* time fields have been initialized with the current date and time:
|
||||
* \htmlonly<blockquote>\endhtmlonly
|
||||
* <pre>
|
||||
* Calendar *rightNow = Calendar::createInstance(errCode);
|
||||
* </pre>
|
||||
* \htmlonly</blockquote>\endhtmlonly
|
||||
*
|
||||
* <p>
|
||||
* A <code>Calendar</code> object can produce all the time field values
|
||||
* Calendar *rightNow = Calendar::createInstance(errCode);
|
||||
*
|
||||
* A `Calendar` object can produce all the time field values
|
||||
* needed to implement the date-time formatting for a particular language
|
||||
* and calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
|
||||
*
|
||||
* <p>
|
||||
* When computing a <code>UDate</code> from time fields, some special circumstances
|
||||
* When computing a `UDate` from time fields, some special circumstances
|
||||
* may arise: there may be insufficient information to compute the
|
||||
* <code>UDate</code> (such as only year and month but no day in the month),
|
||||
* `UDate` (such as only year and month but no day in the month),
|
||||
* there may be inconsistent information (such as "Tuesday, July 15, 1996"
|
||||
* -- July 15, 1996 is actually a Monday), or the input time might be ambiguous
|
||||
* because of time zone transition.
|
||||
*
|
||||
* <p>
|
||||
* <strong>Insufficient information.</strong> The calendar will use default
|
||||
* **Insufficient information.** The calendar will use default
|
||||
* information to specify the missing fields. This may vary by calendar; for
|
||||
* the Gregorian calendar, the default for a field is the same as that of the
|
||||
* start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc.
|
||||
*
|
||||
* <p>
|
||||
* <strong>Inconsistent information.</strong> If fields conflict, the calendar
|
||||
* **Inconsistent information.** If fields conflict, the calendar
|
||||
* will give preference to fields set more recently. For example, when
|
||||
* determining the day, the calendar will look for one of the following
|
||||
* combinations of fields. The most recent combination, as determined by the
|
||||
* most recently set single field, will be used.
|
||||
*
|
||||
* \htmlonly<blockquote>\endhtmlonly
|
||||
* <pre>
|
||||
* MONTH + DAY_OF_MONTH
|
||||
* MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
|
||||
* MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
|
||||
* DAY_OF_YEAR
|
||||
* DAY_OF_WEEK + WEEK_OF_YEAR
|
||||
* </pre>
|
||||
* \htmlonly</blockquote>\endhtmlonly
|
||||
* MONTH + DAY_OF_MONTH
|
||||
* MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
|
||||
* MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
|
||||
* DAY_OF_YEAR
|
||||
* DAY_OF_WEEK + WEEK_OF_YEAR
|
||||
*
|
||||
* For the time of day:
|
||||
*
|
||||
* \htmlonly<blockquote>\endhtmlonly
|
||||
* <pre>
|
||||
* HOUR_OF_DAY
|
||||
* AM_PM + HOUR
|
||||
* </pre>
|
||||
* \htmlonly</blockquote>\endhtmlonly
|
||||
* HOUR_OF_DAY
|
||||
* AM_PM + HOUR
|
||||
*
|
||||
* <p>
|
||||
* <strong>Ambiguous Wall Clock Time.</strong> When time offset from UTC has
|
||||
* **Ambiguous Wall Clock Time.** When time offset from UTC has
|
||||
* changed, it produces an ambiguous time slot around the transition. For example,
|
||||
* many US locations observe daylight saving time. On the date switching to daylight
|
||||
* saving time in US, wall clock time jumps from 12:59 AM (standard) to 2:00 AM
|
||||
|
@ -138,64 +119,53 @@ class BasicTimeZone;
|
|||
* In this example, 1:30 AM is interpreted as 1:30 AM standard time (non-exist),
|
||||
* so the final result will be 2:30 AM daylight time.
|
||||
*
|
||||
* <p>On the date switching back to standard time, wall clock time is moved back one
|
||||
* On the date switching back to standard time, wall clock time is moved back one
|
||||
* hour at 2:00 AM. So wall clock time from 1:00 AM to 1:59 AM occur twice. In this
|
||||
* case, the ICU Calendar resolves the time using the UTC offset after the transition
|
||||
* by default. For example, 1:30 AM on the date is resolved as 1:30 AM standard time.
|
||||
*
|
||||
* <p>Ambiguous wall clock time resolution behaviors can be customized by Calendar APIs
|
||||
* Ambiguous wall clock time resolution behaviors can be customized by Calendar APIs
|
||||
* {@link #setRepeatedWallTimeOption} and {@link #setSkippedWallTimeOption}.
|
||||
* These methods are available in ICU 49 or later versions.
|
||||
*
|
||||
* <p>
|
||||
* <strong>Note:</strong> for some non-Gregorian calendars, different
|
||||
* **Note:** for some non-Gregorian calendars, different
|
||||
* fields may be necessary for complete disambiguation. For example, a full
|
||||
* specification of the historial Arabic astronomical calendar requires year,
|
||||
* month, day-of-month <em>and</em> day-of-week in some cases.
|
||||
* month, day-of-month *and* day-of-week in some cases.
|
||||
*
|
||||
* <p>
|
||||
* <strong>Note:</strong> There are certain possible ambiguities in
|
||||
* **Note:** There are certain possible ambiguities in
|
||||
* interpretation of certain singular times, which are resolved in the
|
||||
* following ways:
|
||||
* <ol>
|
||||
* <li> 24:00:00 "belongs" to the following day. That is,
|
||||
* 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970
|
||||
*
|
||||
* <li> Although historically not precise, midnight also belongs to "am",
|
||||
* and noon belongs to "pm", so on the same day,
|
||||
* 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm
|
||||
* </ol>
|
||||
* 1. 24:00:00 "belongs" to the following day. That is,
|
||||
* 23:59 on Dec 31, 1969 < 24:00 on Jan 1, 1970 < 24:01:00 on Jan 1, 1970
|
||||
* 2. Although historically not precise, midnight also belongs to "am",
|
||||
* and noon belongs to "pm", so on the same day,
|
||||
* 12:00 am (midnight) < 12:01 am, and 12:00 pm (noon) < 12:01 pm
|
||||
*
|
||||
* <p>
|
||||
* The date or time format strings are not part of the definition of a
|
||||
* calendar, as those must be modifiable or overridable by the user at
|
||||
* runtime. Use {@link DateFormat}
|
||||
* to format dates.
|
||||
* runtime. Use `DateFormat` to format dates.
|
||||
*
|
||||
* <p>
|
||||
* <code>Calendar</code> provides an API for field "rolling", where fields
|
||||
* `Calendar` provides an API for field "rolling", where fields
|
||||
* can be incremented or decremented, but wrap around. For example, rolling the
|
||||
* month up in the date <code>December 12, <b>1996</b></code> results in
|
||||
* <code>January 12, <b>1996</b></code>.
|
||||
* month up in the date December 12, **1996** results in
|
||||
* January 12, **1996**.
|
||||
*
|
||||
* <p>
|
||||
* <code>Calendar</code> also provides a date arithmetic function for
|
||||
* `Calendar` also provides a date arithmetic function for
|
||||
* adding the specified (signed) amount of time to a particular time field.
|
||||
* For example, subtracting 5 days from the date <code>September 12, 1996</code>
|
||||
* results in <code>September 7, 1996</code>.
|
||||
* For example, subtracting 5 days from the date `September 12, 1996`
|
||||
* results in `September 7, 1996`.
|
||||
*
|
||||
* <p><big><b>Supported range</b></big>
|
||||
* ***Supported range***
|
||||
*
|
||||
* <p>The allowable range of <code>Calendar</code> has been
|
||||
* narrowed. <code>GregorianCalendar</code> used to attempt to support
|
||||
* the range of dates with millisecond values from
|
||||
* <code>Long.MIN_VALUE</code> to <code>Long.MAX_VALUE</code>.
|
||||
* The new <code>Calendar</code> protocol specifies the
|
||||
* The allowable range of `Calendar` has been narrowed. `GregorianCalendar` used
|
||||
* to attempt to support the range of dates with millisecond values from
|
||||
* `Long.MIN_VALUE` to `Long.MAX_VALUE`. The new `Calendar` protocol specifies the
|
||||
* maximum range of supportable dates as those having Julian day numbers
|
||||
* of <code>-0x7F000000</code> to <code>+0x7F000000</code>. This
|
||||
* corresponds to years from ~5,800,000 BCE to ~5,800,000 CE. Programmers
|
||||
* should use the protected constants in <code>Calendar</code> to
|
||||
* specify an extremely early or extremely late date.</p>
|
||||
* of `-0x7F000000` to `+0x7F000000`. This corresponds to years from ~5,800,000 BCE
|
||||
* to ~5,800,000 CE. Programmers should use the protected constants in `Calendar` to
|
||||
* specify an extremely early or extremely late date.
|
||||
*
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
|
@ -1718,9 +1688,7 @@ protected:
|
|||
/**
|
||||
* Validate a single field of this calendar. Subclasses should
|
||||
* override this method to validate any calendar-specific fields.
|
||||
* Generic fields can be handled by
|
||||
* <code>Calendar::validateField()</code>.
|
||||
* @see #validateField(int, int, int, int&)
|
||||
* Generic fields can be handled by `Calendar::validateField()`.
|
||||
* @internal
|
||||
*/
|
||||
virtual void validateField(UCalendarDateFields field, UErrorCode &status);
|
||||
|
|
|
@ -235,16 +235,16 @@ public:
|
|||
* Returns TRUE if "other" is the same as "this".
|
||||
*
|
||||
* The base class implementation returns TRUE if "other" has the same type/class as "this":
|
||||
* <code>typeid(*this) == typeid(other)</code>.
|
||||
* `typeid(*this) == typeid(other)`.
|
||||
*
|
||||
* Subclass implementations should do something like the following:
|
||||
* <pre>
|
||||
* if (this == &other) { return TRUE; }
|
||||
* if (!Collator::operator==(other)) { return FALSE; } // not the same class
|
||||
*
|
||||
* const MyCollator &o = (const MyCollator&)other;
|
||||
* (compare this vs. o's subclass fields)
|
||||
* </pre>
|
||||
* if (this == &other) { return TRUE; }
|
||||
* if (!Collator::operator==(other)) { return FALSE; } // not the same class
|
||||
*
|
||||
* const MyCollator &o = (const MyCollator&)other;
|
||||
* (compare this vs. o's subclass fields)
|
||||
*
|
||||
* @param other Collator object to be compared
|
||||
* @return TRUE if other is the same as this.
|
||||
* @stable ICU 2.0
|
||||
|
|
|
@ -30,30 +30,31 @@ U_NAMESPACE_BEGIN
|
|||
class PluralRules;
|
||||
|
||||
/**
|
||||
* <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if
|
||||
* **IMPORTANT:** New users are strongly encouraged to see if
|
||||
* numberformatter.h fits their use case. Although not deprecated, this header
|
||||
* is provided for backwards compatibility only.
|
||||
* <hr/>
|
||||
*
|
||||
* -----------------------------------------------------------------------------
|
||||
*
|
||||
* The CompactDecimalFormat produces abbreviated numbers, suitable for display in
|
||||
* environments will limited real estate. For example, 'Hits: 1.2B' instead of
|
||||
* 'Hits: 1,200,000,000'. The format will be appropriate for the given language,
|
||||
* such as "1,2 Mrd." for German.
|
||||
* <p>
|
||||
*
|
||||
* For numbers under 1000 trillion (under 10^15, such as 123,456,789,012,345),
|
||||
* the result will be short for supported languages. However, the result may
|
||||
* sometimes exceed 7 characters, such as when there are combining marks or thin
|
||||
* characters. In such cases, the visual width in fonts should still be short.
|
||||
* <p>
|
||||
*
|
||||
* By default, there are 3 significant digits. After creation, if more than
|
||||
* three significant digits are set (with setMaximumSignificantDigits), or if a
|
||||
* fixed number of digits are set (with setMaximumIntegerDigits or
|
||||
* setMaximumFractionDigits), then result may be wider.
|
||||
* <p>
|
||||
*
|
||||
* At this time, parsing is not supported, and will produce a U_UNSUPPORTED_ERROR.
|
||||
* Resetting the pattern prefixes or suffixes is not supported; the method calls
|
||||
* are ignored.
|
||||
* <p>
|
||||
*
|
||||
* @stable ICU 51
|
||||
*/
|
||||
class U_I18N_API CompactDecimalFormat : public DecimalFormat {
|
||||
|
@ -61,9 +62,9 @@ public:
|
|||
|
||||
/**
|
||||
* Returns a compact decimal instance for specified locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
*
|
||||
* **NOTE:** New users are strongly encouraged to use
|
||||
* `number::NumberFormatter` instead of NumberFormat.
|
||||
* @param inLocale the given locale.
|
||||
* @param style whether to use short or long style.
|
||||
* @param status error code returned here.
|
||||
|
|
|
@ -43,13 +43,17 @@ U_NAMESPACE_BEGIN
|
|||
class TimeZone;
|
||||
class DateTimePatternGenerator;
|
||||
|
||||
// explicit template instantiation. see digitlst.h
|
||||
// (When building DLLs for Windows this is required.)
|
||||
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
|
||||
/**
|
||||
* \cond
|
||||
* explicit template instantiation. see digitlst.h
|
||||
* (When building DLLs for Windows this is required.)
|
||||
*/
|
||||
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN && not defined(U_IN_DOXYGEN)
|
||||
template class U_I18N_API EnumSet<UDateFormatBooleanAttribute,
|
||||
0,
|
||||
UDAT_BOOLEAN_ATTRIBUTE_COUNT>;
|
||||
#endif
|
||||
/** \endcond */
|
||||
|
||||
/**
|
||||
* DateFormat is an abstract class for a family of classes that convert dates and
|
||||
|
|
|
@ -406,7 +406,7 @@ public:
|
|||
* returning a const reference to one of the symbol strings.
|
||||
* The returned reference becomes invalid when the symbol is changed
|
||||
* or when the DecimalFormatSymbols are destroyed.
|
||||
* Note: moved #ifndef U_HIDE_INTERNAL_API after this, since this is needed for inline in DecimalFormat
|
||||
* Note: moved \#ifndef U_HIDE_INTERNAL_API after this, since this is needed for inline in DecimalFormat
|
||||
*
|
||||
* This is not currently stable API, but if you think it should be stable,
|
||||
* post a comment on the following ticket and the ICU team will take a look:
|
||||
|
|
|
@ -63,19 +63,22 @@ class NumberParserImpl;
|
|||
}
|
||||
}
|
||||
|
||||
// explicit template instantiation. see digitlst.h
|
||||
// (When building DLLs for Windows this is required.)
|
||||
/**
|
||||
* \cond
|
||||
* explicit template instantiation. see digitlst.h
|
||||
* (When building DLLs for Windows this is required.)
|
||||
*/
|
||||
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
|
||||
template class U_I18N_API EnumSet<UNumberFormatAttribute,
|
||||
UNUM_MAX_NONBOOLEAN_ATTRIBUTE+1,
|
||||
UNUM_LIMIT_BOOLEAN_ATTRIBUTE>;
|
||||
#endif
|
||||
/** \endcond */
|
||||
|
||||
/**
|
||||
* <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if
|
||||
* **IMPORTANT:** New users are strongly encouraged to see if
|
||||
* numberformatter.h fits their use case. Although not deprecated, this header
|
||||
* is provided for backwards compatibility only.
|
||||
* <hr/>
|
||||
*
|
||||
* DecimalFormat is a concrete subclass of NumberFormat that formats decimal
|
||||
* numbers. It has a variety of features designed to make it possible to parse
|
||||
|
@ -85,13 +88,13 @@ template class U_I18N_API EnumSet<UNumberFormatAttribute,
|
|||
* ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123",
|
||||
* "123 US dollars"). All of these flavors can be easily localized.
|
||||
*
|
||||
* <p>To obtain a NumberFormat for a specific locale (including the default
|
||||
* To obtain a NumberFormat for a specific locale (including the default
|
||||
* locale) call one of NumberFormat's factory methods such as
|
||||
* createInstance(). Do not call the DecimalFormat constructors directly, unless
|
||||
* you know what you are doing, since the NumberFormat factory methods may
|
||||
* return subclasses other than DecimalFormat.
|
||||
*
|
||||
* <p><strong>Example Usage</strong>
|
||||
* **Example Usage**
|
||||
*
|
||||
* \code
|
||||
* // Normally we would have a GUI with a menu for this
|
||||
|
@ -135,11 +138,11 @@ template class U_I18N_API EnumSet<UNumberFormatAttribute,
|
|||
* }
|
||||
* }
|
||||
* \endcode
|
||||
* <P>
|
||||
* Another example use createInstance(style)
|
||||
* <P>
|
||||
* <pre>
|
||||
* <strong>// Print out a number using the localized number, currency,
|
||||
*
|
||||
* **Another example use createInstance(style)**
|
||||
*
|
||||
* \code
|
||||
* // Print out a number using the localized number, currency,
|
||||
* // percent, scientific, integer, iso currency, and plural currency
|
||||
* // format for each locale</strong>
|
||||
* Locale* locale = new Locale("en", "US");
|
||||
|
@ -150,11 +153,13 @@ template class U_I18N_API EnumSet<UNumberFormatAttribute,
|
|||
* for (int j=NumberFormat::kNumberStyle;
|
||||
* j<=NumberFormat::kPluralCurrencyStyle;
|
||||
* ++j) {
|
||||
* NumberFormat* format = NumberFormat::createInstance(locale, j, success);
|
||||
* NumberFormat* form = NumberFormat::createInstance(locale, j, success);
|
||||
* str.remove();
|
||||
* cout << "format result " << form->format(myNumber, str) << endl;
|
||||
* format->parse(form->format(myNumber, str), fmtable, success);
|
||||
* }</pre>
|
||||
* delete form;
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* <p><strong>Patterns</strong>
|
||||
|
@ -690,7 +695,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of DecimalFormat.
|
||||
* #icu::number::NumberFormatter instead of DecimalFormat.
|
||||
* @param status Output param set to success/failure code. If the
|
||||
* pattern is invalid this will be set to a failure code.
|
||||
* @stable ICU 2.0
|
||||
|
@ -708,7 +713,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of DecimalFormat.
|
||||
* #icu::number::NumberFormatter instead of DecimalFormat.
|
||||
* @param pattern A non-localized pattern string.
|
||||
* @param status Output param set to success/failure code. If the
|
||||
* pattern is invalid this will be set to a failure code.
|
||||
|
@ -728,7 +733,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* a NumberFormat factory method.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of DecimalFormat.
|
||||
* #icu::number::NumberFormatter instead of DecimalFormat.
|
||||
*
|
||||
* @param pattern a non-localized pattern string
|
||||
* @param symbolsToAdopt the set of symbols to be used. The caller should not
|
||||
|
@ -782,7 +787,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* May return U_UNSUPPORTED_ERROR if this instance does not support
|
||||
* the specified attribute.
|
||||
* @param attr the attribute to set
|
||||
* @param newvalue new value
|
||||
* @param newValue new value
|
||||
* @param status the error type
|
||||
* @return *this - for chaining (example: format.setAttribute(...).setAttribute(...) )
|
||||
* @stable ICU 51
|
||||
|
@ -839,7 +844,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* a NumberFormat factory method.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of DecimalFormat.
|
||||
* #icu::number::NumberFormatter instead of DecimalFormat.
|
||||
*
|
||||
* @param pattern a non-localized pattern string
|
||||
* @param symbolsToAdopt the set of symbols to be used. The caller should not
|
||||
|
@ -864,7 +869,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* a NumberFormat factory method.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of DecimalFormat.
|
||||
* #icu::number::NumberFormatter instead of DecimalFormat.
|
||||
*
|
||||
* @param pattern a non-localized pattern string
|
||||
* @param symbols the set of symbols to be used
|
||||
|
@ -986,6 +991,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* Result is appended to existing contents.
|
||||
* @param pos On input: an alignment field, if desired.
|
||||
* On output: the offsets of the alignment field.
|
||||
* @param status Output param filled with success/failure status.
|
||||
* @return Reference to 'appendTo' parameter.
|
||||
* @internal
|
||||
*/
|
||||
|
@ -1031,6 +1037,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* Result is appended to existing contents.
|
||||
* @param pos On input: an alignment field, if desired.
|
||||
* On output: the offsets of the alignment field.
|
||||
* @param status Output param filled with success/failure status.
|
||||
* @return Reference to 'appendTo' parameter.
|
||||
* @internal
|
||||
*/
|
||||
|
@ -1726,7 +1733,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual void setDecimalPatternMatchRequired(UBool newValue);
|
||||
|
||||
/**
|
||||
* {@icu} Returns whether to ignore exponents when parsing.
|
||||
* Returns whether to ignore exponents when parsing.
|
||||
*
|
||||
* @see #setParseNoExponent
|
||||
* @internal This API is a technical preview. It may change in an upcoming release.
|
||||
|
@ -1734,7 +1741,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual UBool isParseNoExponent() const;
|
||||
|
||||
/**
|
||||
* {@icu} Specifies whether to stop parsing when an exponent separator is encountered. For
|
||||
* Specifies whether to stop parsing when an exponent separator is encountered. For
|
||||
* example, parses "123E4" to 123 (with parse position 3) instead of 1230000 (with parse position
|
||||
* 5).
|
||||
*
|
||||
|
@ -1744,7 +1751,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual void setParseNoExponent(UBool value);
|
||||
|
||||
/**
|
||||
* {@icu} Returns whether parsing is sensitive to case (lowercase/uppercase).
|
||||
* Returns whether parsing is sensitive to case (lowercase/uppercase).
|
||||
*
|
||||
* @see #setParseCaseSensitive
|
||||
* @internal This API is a technical preview. It may change in an upcoming release.
|
||||
|
@ -1752,7 +1759,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual UBool isParseCaseSensitive() const;
|
||||
|
||||
/**
|
||||
* {@icu} Whether to pay attention to case when parsing; default is to ignore case (perform
|
||||
* Whether to pay attention to case when parsing; default is to ignore case (perform
|
||||
* case-folding). For example, "A" == "a" in case-insensitive but not case-sensitive mode.
|
||||
*
|
||||
* Currency symbols are never case-folded. For example, "us$1.00" will not parse in case-insensitive
|
||||
|
@ -1763,7 +1770,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual void setParseCaseSensitive(UBool value);
|
||||
|
||||
/**
|
||||
* {@icu} Returns whether truncation of high-order integer digits should result in an error.
|
||||
* Returns whether truncation of high-order integer digits should result in an error.
|
||||
* By default, setMaximumIntegerDigits truncates high-order digits silently.
|
||||
*
|
||||
* @see setFormatFailIfMoreThanMaxDigits
|
||||
|
@ -1772,7 +1779,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual UBool isFormatFailIfMoreThanMaxDigits() const;
|
||||
|
||||
/**
|
||||
* {@icu} Sets whether truncation of high-order integer digits should result in an error.
|
||||
* Sets whether truncation of high-order integer digits should result in an error.
|
||||
* By default, setMaximumIntegerDigits truncates high-order digits silently.
|
||||
*
|
||||
* @internal This API is a technical preview. It may change in an upcoming release.
|
||||
|
@ -2017,16 +2024,17 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
virtual void setCurrency(const char16_t* theCurrency);
|
||||
|
||||
/**
|
||||
* Sets the <tt>Currency Context</tt> object used to display currency.
|
||||
* Sets the `Currency Usage` object used to display currency.
|
||||
* This takes effect immediately, if this format is a
|
||||
* currency format.
|
||||
* @param currencyContext new currency context object to use.
|
||||
* @param newUsage new currency usage object to use.
|
||||
* @param ec input-output error code
|
||||
* @stable ICU 54
|
||||
*/
|
||||
void setCurrencyUsage(UCurrencyUsage newUsage, UErrorCode* ec);
|
||||
|
||||
/**
|
||||
* Returns the <tt>Currency Context</tt> object used to display currency
|
||||
* Returns the `Currency Usage` object used to display currency
|
||||
* @stable ICU 54
|
||||
*/
|
||||
UCurrencyUsage getCurrencyUsage() const;
|
||||
|
@ -2072,7 +2080,6 @@ class U_I18N_API DecimalFormat : public NumberFormat {
|
|||
* FormattedNumber result = df->toNumberFormatter().formatDouble(123, status);
|
||||
* </pre>
|
||||
*
|
||||
* @param output The variable into which to store the LocalizedNumberFormatter.
|
||||
* @return The output variable, for chaining.
|
||||
* @draft ICU 62
|
||||
*/
|
||||
|
|
|
@ -658,7 +658,7 @@ public:
|
|||
/**
|
||||
* Adopt, and set value from, a DecimalQuantity
|
||||
* Internal Function, do not use.
|
||||
* @param dl the DecimalQuantity to be adopted
|
||||
* @param dq the DecimalQuantity to be adopted
|
||||
* @internal
|
||||
*/
|
||||
void adoptDecimalQuantity(number::impl::DecimalQuantity *dq);
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
#ifndef _GENDER
|
||||
#define _GENDER
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief C++ API: GenderInfo computes the gender of a list.
|
||||
*/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
@ -30,7 +35,7 @@ class GenderInfoTest;
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
// Forward Declaration
|
||||
/** \internal Forward Declaration */
|
||||
void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
|
||||
|
||||
/**
|
||||
|
|
|
@ -104,7 +104,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* Constructor.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MeasureFormat(
|
||||
|
@ -114,7 +114,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* Constructor.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MeasureFormat(
|
||||
|
@ -202,7 +202,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* formatted string is 3.5 meters per second.
|
||||
* @param measure The measure object. In above example, 3.5 meters.
|
||||
* @param perUnit The per unit. In above example, it is
|
||||
* *MeasureUnit::createSecond(status).
|
||||
* `*%MeasureUnit::createSecond(status)`.
|
||||
* @param appendTo formatted string appended here.
|
||||
* @param pos the field position.
|
||||
* @param status the error.
|
||||
|
@ -223,7 +223,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* @param unit The unit for which to get a display name.
|
||||
* @param status the error.
|
||||
* @return The display name in the locale and width specified in
|
||||
* {@link MeasureFormat#getInstance}, or null if there is no display name available
|
||||
* the MeasureFormat constructor, or null if there is no display name available
|
||||
* for the specified unit.
|
||||
*
|
||||
* @stable ICU 58
|
||||
|
@ -236,7 +236,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param locale desired locale
|
||||
* @param ec input-output error code
|
||||
* @return a formatter object, or NULL upon error
|
||||
|
@ -250,7 +250,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
* locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param ec input-output error code
|
||||
* @return a formatter object, or NULL upon error
|
||||
* @stable ICU 3.0
|
||||
|
|
|
@ -199,7 +199,7 @@ class NumberFormat;
|
|||
* <td><code>DateFormat.createDateInstance(kFull, getLocale(), status)</code>
|
||||
* <tr>
|
||||
* <td><i>argStyleText</i>
|
||||
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
|
||||
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)</code>
|
||||
* <tr>
|
||||
* <td rowspan=6><code>time</code>
|
||||
* <td><i>(none)</i>
|
||||
|
@ -218,7 +218,7 @@ class NumberFormat;
|
|||
* <td><code>DateFormat.createTimeInstance(kFull, getLocale(), status)</code>
|
||||
* <tr>
|
||||
* <td><i>argStyleText</i>
|
||||
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)
|
||||
* <td><code>new SimpleDateFormat(argStyleText, getLocale(), status)</code>
|
||||
* <tr>
|
||||
* <td><code>spellout</code>
|
||||
* <td><i>argStyleText (optional)</i>
|
||||
|
|
|
@ -56,7 +56,6 @@ class StringEnumeration;
|
|||
* <p><strong>IMPORTANT:</strong> New users are strongly encouraged to see if
|
||||
* numberformatter.h fits their use case. Although not deprecated, this header
|
||||
* is provided for backwards compatibility only.
|
||||
* <hr/>
|
||||
*
|
||||
* Abstract base class for all number formats. Provides interface for
|
||||
* formatting and parsing a number. Also provides methods for
|
||||
|
@ -710,7 +709,7 @@ public:
|
|||
* The default formatting style is locale dependent.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
static NumberFormat* U_EXPORT2 createInstance(UErrorCode&);
|
||||
|
@ -721,7 +720,7 @@ public:
|
|||
* @param inLocale the given locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale,
|
||||
|
@ -731,7 +730,7 @@ public:
|
|||
* Create a specific style NumberFormat for the specified locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param desiredLocale the given locale.
|
||||
* @param style the given style.
|
||||
* @param errorCode Output param filled with success/failure status.
|
||||
|
@ -770,7 +769,7 @@ public:
|
|||
* Returns a currency format for the current default locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&);
|
||||
|
@ -779,7 +778,7 @@ public:
|
|||
* Returns a currency format for the specified locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param inLocale the given locale.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
|
@ -790,7 +789,7 @@ public:
|
|||
* Returns a percentage format for the current default locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
static NumberFormat* U_EXPORT2 createPercentInstance(UErrorCode&);
|
||||
|
@ -799,7 +798,7 @@ public:
|
|||
* Returns a percentage format for the specified locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param inLocale the given locale.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
|
@ -810,7 +809,7 @@ public:
|
|||
* Returns a scientific format for the current default locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
static NumberFormat* U_EXPORT2 createScientificInstance(UErrorCode&);
|
||||
|
@ -819,7 +818,7 @@ public:
|
|||
* Returns a scientific format for the specified locale.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> New users are strongly encouraged to use
|
||||
* {@link NumberFormatter} instead of NumberFormat.
|
||||
* {@link icu::number::NumberFormatter} instead of NumberFormat.
|
||||
* @param inLocale the given locale.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
|
|
|
@ -520,15 +520,7 @@ public:
|
|||
*/
|
||||
virtual UClassID getDynamicClassID() const;
|
||||
|
||||
#if (defined(__xlC__) && (__xlC__ < 0x0C00)) || (U_PLATFORM == U_PF_OS390) || (U_PLATFORM ==U_PF_OS400)
|
||||
// Work around a compiler bug on xlC 11.1 on AIX 7.1 that would
|
||||
// prevent PluralSelectorAdapter from implementing private PluralSelector.
|
||||
// xlC error message:
|
||||
// 1540-0300 (S) The "private" member "class icu_49::PluralFormat::PluralSelector" cannot be accessed.
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -564,10 +556,6 @@ private:
|
|||
PluralRules* pluralRules;
|
||||
};
|
||||
|
||||
#if defined(__xlC__)
|
||||
// End of xlC bug workaround, keep remaining definitions private.
|
||||
private:
|
||||
#endif
|
||||
Locale locale;
|
||||
MessagePattern msgPattern;
|
||||
NumberFormat* numberFormat;
|
||||
|
|
|
@ -118,7 +118,6 @@ class SharedPluralRules;
|
|||
* Examples are in the following table:
|
||||
* </p>
|
||||
* <table border='1' style="border-collapse:collapse">
|
||||
* <tbody>
|
||||
* <tr>
|
||||
* <th>n</th>
|
||||
* <th>i</th>
|
||||
|
@ -155,7 +154,6 @@ class SharedPluralRules;
|
|||
* <td align="right">23</td>
|
||||
* <td>2</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* <p>
|
||||
* The difference between 'in' and 'within' is that 'in' only includes integers in the specified range, while 'within'
|
||||
|
|
|
@ -313,7 +313,6 @@ enum URBNFRuleSetTag {
|
|||
* <td>The rule for an IEEE 754 NaN (not a number).</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <tr>
|
||||
* <td><em>nothing</em></td>
|
||||
* <td>If the rule's rule descriptor is left out, the base value is one plus the
|
||||
* preceding rule's base value (or zero if this is the first rule in the list) in a normal
|
||||
|
|
|
@ -328,7 +328,7 @@ public:
|
|||
* @param nfToAdopt Constructed object takes ownership of this pointer.
|
||||
* It is an error for caller to delete this pointer or change its
|
||||
* contents after calling this constructor.
|
||||
* @status Any error is returned here.
|
||||
* @param status Any error is returned here.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
RelativeDateTimeFormatter(
|
||||
|
@ -346,7 +346,7 @@ public:
|
|||
* @param style the format style. The UDAT_RELATIVE bit field has no effect.
|
||||
* @param capitalizationContext A value from UDisplayContext that pertains to
|
||||
* capitalization.
|
||||
* @status Any error is returned here.
|
||||
* @param status Any error is returned here.
|
||||
* @stable ICU 54
|
||||
*/
|
||||
RelativeDateTimeFormatter(
|
||||
|
|
|
@ -1147,7 +1147,7 @@ public:
|
|||
* Overrides base class method and
|
||||
* This method clears per field NumberFormat instances
|
||||
* previously set by {@see adoptNumberFormat(const UnicodeString&, NumberFormat*, UErrorCode)}
|
||||
* @param adoptNF the NumbeferFormat used
|
||||
* @param formatToAdopt the NumbeferFormat used
|
||||
* @stable ICU 54
|
||||
*/
|
||||
void adoptNumberFormat(NumberFormat *formatToAdopt);
|
||||
|
@ -1162,7 +1162,7 @@ public:
|
|||
* Per field NumberFormat can also be cleared in {@see DateFormat::setNumberFormat(const NumberFormat& newNumberFormat)}
|
||||
*
|
||||
* @param fields the fields to override(like y)
|
||||
* @param adoptNF the NumbeferFormat used
|
||||
* @param formatToAdopt the NumbeferFormat used
|
||||
* @param status Receives a status code, which will be U_ZERO_ERROR
|
||||
* if the operation succeeds.
|
||||
* @stable ICU 54
|
||||
|
|
|
@ -77,8 +77,7 @@ class TransliteratorIDParser;
|
|||
* transliteration. For example, given a string <code>input</code>
|
||||
* and a transliterator <code>t</code>, the call
|
||||
*
|
||||
* \htmlonly<blockquote>\endhtmlonly<code>String result = t.transliterate(input);
|
||||
* </code>\htmlonly</blockquote>\endhtmlonly
|
||||
* String result = t.transliterate(input);
|
||||
*
|
||||
* will transliterate it and return the result. Other methods allow
|
||||
* the client to specify a substring to be transliterated and to use
|
||||
|
@ -98,22 +97,18 @@ class TransliteratorIDParser;
|
|||
* contents of the buffer may show text being modified as each new
|
||||
* character arrives.
|
||||
*
|
||||
* <p>Consider the simple <code>RuleBasedTransliterator</code>:
|
||||
* <p>Consider the simple `RuleBasedTransliterator`:
|
||||
*
|
||||
* \htmlonly<blockquote>\endhtmlonly<code>
|
||||
* th>{theta}<br>
|
||||
* t>{tau}
|
||||
* </code>\htmlonly</blockquote>\endhtmlonly
|
||||
* th>{theta}
|
||||
* t>{tau}
|
||||
*
|
||||
* When the user types 't', nothing will happen, since the
|
||||
* transliterator is waiting to see if the next character is 'h'. To
|
||||
* remedy this, we introduce the notion of a cursor, marked by a '|'
|
||||
* in the output string:
|
||||
*
|
||||
* \htmlonly<blockquote>\endhtmlonly<code>
|
||||
* t>|{tau}<br>
|
||||
* {tau}h>{theta}
|
||||
* </code>\htmlonly</blockquote>\endhtmlonly
|
||||
* t>|{tau}
|
||||
* {tau}h>{theta}
|
||||
*
|
||||
* Now when the user types 't', tau appears, and if the next character
|
||||
* is 'h', the tau changes to a theta. This is accomplished by
|
||||
|
@ -499,9 +494,9 @@ public:
|
|||
* for details.
|
||||
* @param text the buffer holding transliterated and
|
||||
* untransliterated text
|
||||
* @param index an array of three integers. See {@link #transliterate(Replaceable&, UTransPosition&, const UnicodeString*, UErrorCode&) const }.
|
||||
* @param index an array of three integers.
|
||||
* @param status Output param to filled in with a success or an error.
|
||||
* @see #transliterate(Replaceable, int[], String)
|
||||
* @see #transliterate(Replaceable&, UTransPosition&, const UnicodeString&, UErrorCode &) const
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual void transliterate(Replaceable& text, UTransPosition& index,
|
||||
|
|
|
@ -237,10 +237,10 @@ typedef enum UTimeZoneFormatParseOption {
|
|||
*/
|
||||
UTZFMT_PARSE_OPTION_ALL_STYLES = 0x01,
|
||||
/**
|
||||
* When parsing a time zone display name in UTZFMT_STYLE_SPECIFIC_SHORT,
|
||||
* When parsing a time zone display name in \link UTZFMT_STYLE_SPECIFIC_SHORT \endlink,
|
||||
* look for the IANA tz database compatible zone abbreviations in addition
|
||||
* to the localized names coming from the {@link TimeZoneNames} currently
|
||||
* used by the {@link TimeZoneFormat}.
|
||||
* to the localized names coming from the icu::TimeZoneNames currently
|
||||
* used by the icu::TimeZoneFormat.
|
||||
* @stable ICU 54
|
||||
*/
|
||||
UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS = 0x02
|
||||
|
|
|
@ -1149,7 +1149,7 @@ ucol_getUCAVersion(const UCollator* coll, UVersionInfo info);
|
|||
* The recommended way to achieve "merged" sorting is by
|
||||
* concatenating strings with U+FFFE between them.
|
||||
* The concatenation has the same sort order as the merged sort keys,
|
||||
* but merge(getSortKey(str1), getSortKey(str2)) may differ from getSortKey(str1 + '\uFFFE' + str2).
|
||||
* but merge(getSortKey(str1), getSortKey(str2)) may differ from getSortKey(str1 + '\\uFFFE' + str2).
|
||||
* Using strings with U+FFFE may yield shorter sort keys.
|
||||
*
|
||||
* For details about Sort Key Features see
|
||||
|
@ -1294,6 +1294,7 @@ U_STABLE uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCod
|
|||
* the top of one of the supported reordering groups,
|
||||
* and it must not be beyond the last of those groups.
|
||||
* See ucol_setMaxVariable().
|
||||
* @param coll collator to be set
|
||||
* @param varTop primary weight, as returned by ucol_setVariableTop or ucol_getVariableTop
|
||||
* @param status error code
|
||||
* @see ucol_getVariableTop
|
||||
|
|
|
@ -49,11 +49,11 @@ enum UGender {
|
|||
*/
|
||||
typedef enum UGender UGender;
|
||||
|
||||
struct UGenderInfo;
|
||||
/**
|
||||
* Opaque UGenderInfo object for use in C programs.
|
||||
* @stable ICU 50
|
||||
*/
|
||||
struct UGenderInfo;
|
||||
typedef struct UGenderInfo UGenderInfo;
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ ugender_getInstance(const char *locale, UErrorCode *status);
|
|||
* @stable ICU 50
|
||||
*/
|
||||
U_STABLE UGender U_EXPORT2
|
||||
ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status);
|
||||
ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status);
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
|
|
@ -559,7 +559,8 @@ unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t buf
|
|||
*
|
||||
* NOTE: All fields of the UFieldPosition must be initialized before calling this method.
|
||||
*
|
||||
* @param fieldPosition
|
||||
* @param uresult The object containing the formatted number.
|
||||
* @param ufpos
|
||||
* Input+output variable. On input, the "field" property determines which field to look up,
|
||||
* and the "endIndex" property determines where to begin the search. On output, the
|
||||
* "beginIndex" field is set to the beginning of the first occurrence of the field after the
|
||||
|
@ -580,7 +581,7 @@ unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* u
|
|||
* If you need information on only one field, use unumf_resultNextFieldPosition().
|
||||
*
|
||||
* @param uresult The object containing the formatted number.
|
||||
* @param fpositer
|
||||
* @param ufpositer
|
||||
* A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open}. Iteration
|
||||
* information already present in the UFieldPositionIterator is deleted, and the iterator is reset
|
||||
* to apply to the fields in the formatted string created by this function call. The field values
|
||||
|
|
|
@ -257,10 +257,9 @@ typedef enum {
|
|||
* match an e with the same diacritic or a plain e in the searched text.
|
||||
*
|
||||
* This option is similar to "asymmetric search" as described in
|
||||
* <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">
|
||||
* UTS #10 Unicode Collation Algorithm</a, but also allows unmarked
|
||||
* characters in the searched text to match marked or unmarked versions of
|
||||
* that character in the pattern.
|
||||
* [UTS #10 Unicode Collation Algorithm](http://www.unicode.org/reports/tr10/#Asymmetric_Search),
|
||||
* but also allows unmarked characters in the searched text to match
|
||||
* marked or unmarked versions of that character in the pattern.
|
||||
*
|
||||
* @stable ICU 4.4
|
||||
*/
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
* // ...
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* UTS 39 defines two strings to be <em>confusable</em> if they map to the same <em>skeleton string</em>. A skeleton can
|
||||
* be thought of as a "hash code". {@link uspoof_getSkeleton} computes the skeleton for a particular string, so
|
||||
* the following snippet is equivalent to the example above:
|
||||
|
@ -128,7 +127,6 @@
|
|||
* free(skel2);
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* If you need to check if a string is confusable with any string in a dictionary of many strings, rather than calling
|
||||
* {@link uspoof_areConfusable} many times in a loop, {@link uspoof_getSkeleton} can be used instead, as shown below:
|
||||
*
|
||||
|
@ -172,14 +170,12 @@
|
|||
* uspoof_close(sc);
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* <b>Note:</b> Since the Unicode confusables mapping table is frequently updated, confusable skeletons are <em>not</em>
|
||||
* guaranteed to be the same between ICU releases. We therefore recommend that you always compute confusable skeletons
|
||||
* at runtime and do not rely on creating a permanent, or difficult to update, database of skeletons.
|
||||
*
|
||||
* <h2>Spoof Detection</h2>
|
||||
*
|
||||
* <p>
|
||||
* The following snippet shows a minimal example of using <code>USpoofChecker</code> to perform spoof detection on a
|
||||
* string:
|
||||
*
|
||||
|
@ -204,16 +200,13 @@
|
|||
* uset_close(allowed);
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* As in the case for confusability checking, it is good practice to create one <code>USpoofChecker</code> instance at
|
||||
* startup, and call the cheaper {@link uspoof_check} online. We specify the set of
|
||||
* allowed characters to be those with type RECOMMENDED or INCLUSION, according to the recommendation in UTS 39.
|
||||
*
|
||||
* <p>
|
||||
* In addition to {@link uspoof_check}, the function {@link uspoof_checkUTF8} is exposed for UTF8-encoded char* strings,
|
||||
* and {@link uspoof_checkUnicodeString} is exposed for C++ programmers.
|
||||
*
|
||||
* <p>
|
||||
* If the {@link USPOOF_AUX_INFO} check is enabled, a limited amount of information on why a string failed the checks
|
||||
* is available in the returned bitmask. For complete information, use the {@link uspoof_check2} class of functions
|
||||
* with a {@link USpoofCheckResult} parameter:
|
||||
|
@ -274,7 +267,6 @@
|
|||
* // Explicit cleanup not necessary.
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* The return value is a bitmask of the checks that failed. In this case, there was one check that failed:
|
||||
* {@link USPOOF_RESTRICTION_LEVEL}, corresponding to the fifth bit (16). The possible checks are:
|
||||
*
|
||||
|
@ -307,7 +299,6 @@
|
|||
* uspoof_close(sc);
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* Here is an example in C++ showing how to compute the restriction level of a string:
|
||||
*
|
||||
* \code{.cpp}
|
||||
|
@ -334,11 +325,9 @@
|
|||
* printf("Restriction level: %#010x (status: %s)\n", restrictionLevel, u_errorName(status));
|
||||
* \endcode
|
||||
*
|
||||
* <p>
|
||||
* The code '0x50000000' corresponds to the restriction level USPOOF_MINIMALLY_RESTRICTIVE. Since
|
||||
* USPOOF_MINIMALLY_RESTRICTIVE is weaker than USPOOF_MODERATELY_RESTRICTIVE, the string fails the check.
|
||||
*
|
||||
* <p>
|
||||
* <b>Note:</b> The Restriction Level is the most powerful of the checks. The full logic is documented in
|
||||
* <a href="http://unicode.org/reports/tr39/#Restriction_Level_Detection">UTS 39</a>, but the basic idea is that strings
|
||||
* are restricted to contain characters from only a single script, <em>except</em> that most scripts are allowed to have
|
||||
|
@ -352,15 +341,12 @@
|
|||
*
|
||||
* <h2>Additional Information</h2>
|
||||
*
|
||||
* <p>
|
||||
* A <code>USpoofChecker</code> instance may be used repeatedly to perform checks on any number of identifiers.
|
||||
*
|
||||
* <p>
|
||||
* <b>Thread Safety:</b> The test functions for checking a single identifier, or for testing whether
|
||||
* two identifiers are possible confusable, are thread safe. They may called concurrently, from multiple threads,
|
||||
* using the same USpoofChecker instance.
|
||||
*
|
||||
* <p>
|
||||
* More generally, the standard ICU thread safety rules apply: functions that take a const USpoofChecker parameter are
|
||||
* thread safe. Those that take a non-const USpoofChecker are not thread safe..
|
||||
*
|
||||
|
@ -1219,14 +1205,21 @@ U_NAMESPACE_BEGIN
|
|||
|
||||
/**
|
||||
* \class LocalUSpoofCheckResultPointer
|
||||
* "Smart pointer" class, closes a USpoofCheckResult via {@link uspoof_closeCheckResult}.
|
||||
* "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`.
|
||||
* For most methods see the LocalPointerBase base class.
|
||||
*
|
||||
* @see LocalPointerBase
|
||||
* @see LocalPointer
|
||||
* @stable ICU 58
|
||||
*/
|
||||
|
||||
/**
|
||||
* \cond
|
||||
* Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER.
|
||||
* For now, suppress with a Doxygen cond
|
||||
*/
|
||||
U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult);
|
||||
/** \endcond */
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
|
|
|
@ -42,13 +42,11 @@ U_NAMESPACE_BEGIN
|
|||
*
|
||||
* Clients can use this to break a paragraph into lines, and to display the glyphs in each line.
|
||||
*
|
||||
* Note that {@link icu::LayoutEngine} is deprecated, but this class is not.
|
||||
* Note that the ICU layout engine has been deprecated and removed.
|
||||
* You may use this class with the HarfBuzz icu-le-hb wrapper,
|
||||
* see http://www.freedesktop.org/wiki/Software/HarfBuzz/
|
||||
*
|
||||
* See http://userguide.icu-project.org/layoutengine for special build instructions.
|
||||
*
|
||||
* @see icu::LayoutEngine
|
||||
*/
|
||||
class U_LAYOUTEX_API ParagraphLayout : public UObject
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue