| alphaindex.h | | alphaindex.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * | | * | |
|
| * Copyright (C) 2011 International Business Machines | | * Copyright (C) 2011-2012 International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| * | | * | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| */ | | */ | |
| | | | |
| #ifndef INDEXCHARS_H | | #ifndef INDEXCHARS_H | |
| #define INDEXCHARS_H | | #define INDEXCHARS_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| #include "unicode/uobject.h" | | #include "unicode/uobject.h" | |
| #include "unicode/locid.h" | | #include "unicode/locid.h" | |
| | | | |
|
| | | #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C++ API: Index Characters | | * \brief C++ API: Index Characters | |
| */ | | */ | |
| | | | |
| U_CDECL_BEGIN | | U_CDECL_BEGIN | |
| | | | |
| /** | | /** | |
| * Constants for Alphabetic Index Label Types. | | * Constants for Alphabetic Index Label Types. | |
| * The form of these enum constants anticipates having a plain C API | | * The form of these enum constants anticipates having a plain C API | |
| * for Alphabetic Indexes that will also use them. | | * for Alphabetic Indexes that will also use them. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| typedef enum UAlphabeticIndexLabelType { | | typedef enum UAlphabeticIndexLabelType { | |
|
| /** | | /** | |
| * Normal Label, typically the starting letter of the names | | * Normal Label, typically the starting letter of the names | |
| * in the bucket with this label. | | * in the bucket with this label. | |
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| U_ALPHAINDEX_NORMAL = 0, | | U_ALPHAINDEX_NORMAL = 0, | |
| | | | |
|
| /** | | /** | |
| * Undeflow Label. The bucket with this label contains names | | * Undeflow Label. The bucket with this label contains names | |
| * in scripts that sort before any of the bucket labels in this in | | * in scripts that sort before any of the bucket labels in this index. | |
| dex. | | * @stable ICU 4.8 | |
| * @draft ICU 4.8 | | */ | |
| */ | | U_ALPHAINDEX_UNDERFLOW = 1, | |
| U_ALPHAINDEX_UNDERFLOW = 1, | | | |
| | | | |
|
| /** | | /** | |
| * Inflow Label. The bucket with this label contains names | | * Inflow Label. The bucket with this label contains names | |
| * in scripts that sort between two of the bucket labels in this i | | * in scripts that sort between two of the bucket labels in this index. | |
| ndex. | | * Inflow labels are created when an index contains normal labels for | |
| * Inflow labels are created when an index contains normal labels | | * multiple scripts, and skips other scripts that sort between some of | |
| for | | the | |
| * multiple scripts, and skips other scripts that sort between som | | * included scripts. | |
| e of the | | * @stable ICU 4.8 | |
| * included scripts. | | */ | |
| * @draft ICU 4.8 | | U_ALPHAINDEX_INFLOW = 2, | |
| */ | | | |
| U_ALPHAINDEX_INFLOW = 2, | | | |
| | | | |
|
| /** | | /** | |
| * Overflow Label. Te bucket with this label contains names in scr | | * Overflow Label. Te bucket with this label contains names in scripts | |
| ipts | | * that sort after all of the bucket labels in this index. | |
| * that sort after all of the bucket labels in this index. | | * @stable ICU 4.8 | |
| * @draft ICU 4.8 | | */ | |
| */ | | U_ALPHAINDEX_OVERFLOW = 3 | |
| U_ALPHAINDEX_OVERFLOW = 3 | | } UAlphabeticIndexLabelType; | |
| } UAlphabeticIndexLabelType; | | | |
| | | | |
| struct UHashtable; | | struct UHashtable; | |
| U_CDECL_END | | U_CDECL_END | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| // Forward Declarations | | // Forward Declarations | |
| | | | |
| class Collator; | | class Collator; | |
| class RuleBasedCollator; | | class RuleBasedCollator; | |
| | | | |
| skipping to change at line 155 | | skipping to change at line 157 | |
| * </pre> | | * </pre> | |
| * | | * | |
| * <p> | | * <p> | |
| * <b>Notes:</b> | | * <b>Notes:</b> | |
| * <ul> | | * <ul> | |
| * <li>Additional collation parameters can be passed in as part of the loca
le name. | | * <li>Additional collation parameters can be passed in as part of the loca
le name. | |
| * For example, German plus numeric | | * For example, German plus numeric | |
| * sorting would be "de@kn-true". | | * sorting would be "de@kn-true". | |
| * </ul> | | * </ul> | |
| * | | * | |
|
| * @draft ICU 4.8 This API might change or be removed in a future release. | | * @stable ICU 4.8 | |
| */ | | */ | |
| | | | |
| class U_I18N_API AlphabeticIndex: public UObject { | | class U_I18N_API AlphabeticIndex: public UObject { | |
| | | | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * Construct an AlphabeticIndex object for the specified locale. If th
e locale's | | * Construct an AlphabeticIndex object for the specified locale. If th
e locale's | |
| * data does not include index characters, a set of them will be | | * data does not include index characters, a set of them will be | |
| * synthesized based on the locale's exemplar characters. The locale | | * synthesized based on the locale's exemplar characters. The locale | |
| * determines the sorting order for both the index characters and the | | * determines the sorting order for both the index characters and the | |
| * user item names appearing under each Index character. | | * user item names appearing under each Index character. | |
| * | | * | |
| * @param locale the desired locale. | | * @param locale the desired locale. | |
| * @param status Error code, will be set with the reason if the constru
ction | | * @param status Error code, will be set with the reason if the constru
ction | |
| * of the AlphabeticIndex object fails. | | * of the AlphabeticIndex object fails. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| AlphabeticIndex(const Locale &locale, UErrorCode &status); | | AlphabeticIndex(const Locale &locale, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Add Labels to this Index. The labels are additions to those | | * Add Labels to this Index. The labels are additions to those | |
| * that are already in the index; they do not replace the existing | | * that are already in the index; they do not replace the existing | |
| * ones. | | * ones. | |
| * @param additions The additional characters to add to the index, such
as A-Z. | | * @param additions The additional characters to add to the index, such
as A-Z. | |
| * @param status Error code, will be set with the reason if the | | * @param status Error code, will be set with the reason if the | |
| * operation fails. | | * operation fails. | |
| * @return this, for chaining | | * @return this, for chaining | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UError
Code &status); | | virtual AlphabeticIndex &addLabels(const UnicodeSet &additions, UError
Code &status); | |
| | | | |
| /** | | /** | |
| * Add the index characters from a Locale to the index. The labels | | * Add the index characters from a Locale to the index. The labels | |
| * are added to those that are already in the index; they do not replac
e the | | * are added to those that are already in the index; they do not replac
e the | |
| * existing index characters. The collation order for this index is no
t | | * existing index characters. The collation order for this index is no
t | |
| * changed; it remains that of the locale that was originally specified | | * changed; it remains that of the locale that was originally specified | |
| * when creating this Index. | | * when creating this Index. | |
| * | | * | |
| * @param locale The locale whose index characters are to be added. | | * @param locale The locale whose index characters are to be added. | |
| * @param status Error code, will be set with the reason if the | | * @param status Error code, will be set with the reason if the | |
| * operation fails. | | * operation fails. | |
| * @return this, for chaining | | * @return this, for chaining | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &s
tatus); | | virtual AlphabeticIndex &addLabels(const Locale &locale, UErrorCode &s
tatus); | |
| | | | |
| /** | | /** | |
| * Destructor | | * Destructor | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual ~AlphabeticIndex(); | | virtual ~AlphabeticIndex(); | |
| | | | |
| /** | | /** | |
| * Get the Collator that establishes the ordering of the items in this
index. | | * Get the Collator that establishes the ordering of the items in this
index. | |
| * Ownership of the collator remains with the AlphabeticIndex instance. | | * Ownership of the collator remains with the AlphabeticIndex instance. | |
| * | | * | |
| * The returned collator is a reference to the internal collator used b
y this | | * The returned collator is a reference to the internal collator used b
y this | |
| * index. It may be safely used to compare the names of items or to ge
t | | * index. It may be safely used to compare the names of items or to ge
t | |
| * sort keys for names. However if any settings need to be changed, | | * sort keys for names. However if any settings need to be changed, | |
| * or other non-const methods called, a cloned copy must be made first. | | * or other non-const methods called, a cloned copy must be made first. | |
| * | | * | |
| * @return The collator | | * @return The collator | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const RuleBasedCollator &getCollator() const; | | virtual const RuleBasedCollator &getCollator() const; | |
| | | | |
| /** | | /** | |
| * Get the default label used for abbreviated buckets <i>between</i> ot
her index characters. | | * Get the default label used for abbreviated buckets <i>between</i> ot
her index characters. | |
| * For example, consider the labels when Latin and Greek are used: | | * For example, consider the labels when Latin and Greek are used: | |
| * X Y Z ... Α Β Γ. | | * X Y Z ... Α Β Γ. | |
| * | | * | |
| * @return inflow label | | * @return inflow label | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const UnicodeString &getInflowLabel() const; | | virtual const UnicodeString &getInflowLabel() const; | |
| | | | |
| /** | | /** | |
| * Set the default label used for abbreviated buckets <i>between</i> ot
her index characters. | | * Set the default label used for abbreviated buckets <i>between</i> ot
her index characters. | |
| * An inflow label will be automatically inserted if two otherwise-adja
cent label characters | | * An inflow label will be automatically inserted if two otherwise-adja
cent label characters | |
| * are from different scripts, e.g. Latin and Cyrillic, and a third scr
ipt, e.g. Greek, | | * are from different scripts, e.g. Latin and Cyrillic, and a third scr
ipt, e.g. Greek, | |
| * sorts between the two. The default inflow character is an ellipsis
(...) | | * sorts between the two. The default inflow character is an ellipsis
(...) | |
| * | | * | |
| * @param inflowLabel the new Inflow label. | | * @param inflowLabel the new Inflow label. | |
| * @param status Error code, will be set with the reason if the operati
on fails. | | * @param status Error code, will be set with the reason if the operati
on fails. | |
| * @return this | | * @return this | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &setInflowLabel(const UnicodeString &inflowLabe
l, UErrorCode &status); | | virtual AlphabeticIndex &setInflowLabel(const UnicodeString &inflowLabe
l, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the special label used for items that sort after the last normal
label, | | * Get the special label used for items that sort after the last normal
label, | |
| * and that would not otherwise have an appropriate label. | | * and that would not otherwise have an appropriate label. | |
| * | | * | |
| * @return the overflow label | | * @return the overflow label | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const UnicodeString &getOverflowLabel() const; | | virtual const UnicodeString &getOverflowLabel() const; | |
| | | | |
| /** | | /** | |
| * Set the label used for items that sort after the last normal label, | | * Set the label used for items that sort after the last normal label, | |
| * and that would not otherwise have an appropriate label. | | * and that would not otherwise have an appropriate label. | |
| * | | * | |
| * @param overflowLabel the new overflow label. | | * @param overflowLabel the new overflow label. | |
| * @param status Error code, will be set with the reason if the operati
on fails. | | * @param status Error code, will be set with the reason if the operati
on fails. | |
| * @return this | | * @return this | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &setOverflowLabel(const UnicodeString &overflow
Label, UErrorCode &status); | | virtual AlphabeticIndex &setOverflowLabel(const UnicodeString &overflow
Label, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the special label used for items that sort before the first norm
al label, | | * Get the special label used for items that sort before the first norm
al label, | |
| * and that would not otherwise have an appropriate label. | | * and that would not otherwise have an appropriate label. | |
| * | | * | |
| * @return underflow label | | * @return underflow label | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const UnicodeString &getUnderflowLabel() const; | | virtual const UnicodeString &getUnderflowLabel() const; | |
| | | | |
| /** | | /** | |
| * Set the label used for items that sort before the first normal label
, | | * Set the label used for items that sort before the first normal label
, | |
| * and that would not otherwise have an appropriate label. | | * and that would not otherwise have an appropriate label. | |
| * | | * | |
| * @param underflowLabel the new underflow label. | | * @param underflowLabel the new underflow label. | |
| * @param status Error code, will be set with the reason if the operati
on fails. | | * @param status Error code, will be set with the reason if the operati
on fails. | |
| * @return this | | * @return this | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &setUnderflowLabel(const UnicodeString &underfl
owLabel, UErrorCode &status); | | virtual AlphabeticIndex &setUnderflowLabel(const UnicodeString &underfl
owLabel, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the limit on the number of labels permitted in the index. | | * Get the limit on the number of labels permitted in the index. | |
| * The number does not include over, under and inflow labels. | | * The number does not include over, under and inflow labels. | |
| * | | * | |
| * @return maxLabelCount maximum number of labels. | | * @return maxLabelCount maximum number of labels. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual int32_t getMaxLabelCount() const; | | virtual int32_t getMaxLabelCount() const; | |
| | | | |
| /** | | /** | |
| * Set a limit on the number of labels permitted in the index. | | * Set a limit on the number of labels permitted in the index. | |
| * The number does not include over, under and inflow labels. | | * The number does not include over, under and inflow labels. | |
| * Currently, if the number is exceeded, then every | | * Currently, if the number is exceeded, then every | |
| * nth item is removed to bring the count down. | | * nth item is removed to bring the count down. | |
| * A more sophisticated mechanism may be available in the future. | | * A more sophisticated mechanism may be available in the future. | |
| * | | * | |
| * @param maxLabelCount the maximum number of labels. | | * @param maxLabelCount the maximum number of labels. | |
| * @param status error code | | * @param status error code | |
| * @return This, for chaining | | * @return This, for chaining | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &setMaxLabelCount(int32_t maxLabelCount, UError
Code &status); | | virtual AlphabeticIndex &setMaxLabelCount(int32_t maxLabelCount, UError
Code &status); | |
| | | | |
| /** | | /** | |
| * Get the Unicode character (or tailored string) that defines an overf
low bucket; | | * Get the Unicode character (or tailored string) that defines an overf
low bucket; | |
| * that is anything greater than or equal to that string should go in t
hat bucket, | | * that is anything greater than or equal to that string should go in t
hat bucket, | |
| * instead of with the last character. Normally that is the first chara
cter of the script | | * instead of with the last character. Normally that is the first chara
cter of the script | |
| * after lowerLimit. Thus in X Y Z ... <i>Devanagari-ka</i>, the overfl
ow character for Z | | * after lowerLimit. Thus in X Y Z ... <i>Devanagari-ka</i>, the overfl
ow character for Z | |
| * would be the <i>Greek-alpha</i>. | | * would be the <i>Greek-alpha</i>. | |
| * | | * | |
| | | | |
| skipping to change at line 338 | | skipping to change at line 340 | |
| * Records with duplicate names are permitted; they will be kept in th
e order | | * Records with duplicate names are permitted; they will be kept in th
e order | |
| * that they were added. | | * that they were added. | |
| * | | * | |
| * @param name The display name for the Record. The Record will be pla
ced in | | * @param name The display name for the Record. The Record will be pla
ced in | |
| * a bucket based on this name. | | * a bucket based on this name. | |
| * @param data An optional pointer to user data associated with this | | * @param data An optional pointer to user data associated with this | |
| * item. When iterating the contents of a bucket, both the | | * item. When iterating the contents of a bucket, both the | |
| * data pointer the name will be available for each Record. | | * data pointer the name will be available for each Record. | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return This, for chaining. | | * @return This, for chaining. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &addRecord(const UnicodeString &name, const voi
d *data, UErrorCode &status); | | virtual AlphabeticIndex &addRecord(const UnicodeString &name, const voi
d *data, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Remove all Records from the Index. The set of Buckets, which define
the headings under | | * Remove all Records from the Index. The set of Buckets, which define
the headings under | |
| * which records are classified, is not altered. | | * which records are classified, is not altered. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return This, for chaining. | | * @return This, for chaining. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &clearRecords(UErrorCode &status); | | virtual AlphabeticIndex &clearRecords(UErrorCode &status); | |
| | | | |
| /** Get the number of labels in this index. | | /** Get the number of labels in this index. | |
| * Note: may trigger lazy index construction. | | * Note: may trigger lazy index construction. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return The number of labels in this index, including any und
er, over or | | * @return The number of labels in this index, including any und
er, over or | |
| * in-flow labels. | | * in-flow labels. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual int32_t getBucketCount(UErrorCode &status); | | virtual int32_t getBucketCount(UErrorCode &status); | |
| | | | |
| /** Get the total number of Records in this index, that is, the number | | /** Get the total number of Records in this index, that is, the number | |
| * of <name, data> pairs added. | | * of <name, data> pairs added. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return The number of records in this index, that is, the tot
al number | | * @return The number of records in this index, that is, the tot
al number | |
| * of (name, data) items added with addRecord(). | | * of (name, data) items added with addRecord(). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual int32_t getRecordCount(UErrorCode &status); | | virtual int32_t getRecordCount(UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Given the name of a record, return the zero-based index of the Buc
ket | | * Given the name of a record, return the zero-based index of the Buc
ket | |
| * in which the item should appear. The name need not be in the inde
x. | | * in which the item should appear. The name need not be in the inde
x. | |
| * A Record will not be added to the index by this function. | | * A Record will not be added to the index by this function. | |
| * Bucket numbers are zero-based, in Bucket iteration order. | | * Bucket numbers are zero-based, in Bucket iteration order. | |
| * | | * | |
| * @param itemName The name whose bucket position in the index is to b
e determined. | | * @param itemName The name whose bucket position in the index is to b
e determined. | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return The bucket number for this name. | | * @return The bucket number for this name. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| * | | * | |
| */ | | */ | |
| virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCo
de &status); | | virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCo
de &status); | |
| | | | |
| /** | | /** | |
| * Get the zero based index of the current Bucket from an iteration | | * Get the zero based index of the current Bucket from an iteration | |
| * over the Buckets of this index. Return -1 if no iteration is in p
rocess. | | * over the Buckets of this index. Return -1 if no iteration is in p
rocess. | |
| * @return the index of the current Bucket | | * @return the index of the current Bucket | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual int32_t getBucketIndex() const; | | virtual int32_t getBucketIndex() const; | |
| | | | |
| /** | | /** | |
| * Advance the iteration over the Buckets of this index. Return FALS
E if | | * Advance the iteration over the Buckets of this index. Return FALS
E if | |
| * there are no more Buckets. | | * there are no more Buckets. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the oper
ation fails. | | * @param status Error code, will be set with the reason if the oper
ation fails. | |
| * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified
while | | * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified
while | |
| * an enumeration of its contents are in process. | | * an enumeration of its contents are in process. | |
| * | | * | |
| * @return TRUE if success, FALSE if at end of iteration | | * @return TRUE if success, FALSE if at end of iteration | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual UBool nextBucket(UErrorCode &status); | | virtual UBool nextBucket(UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Return the name of the Label of the current bucket from an iterati
on over the buckets. | | * Return the name of the Label of the current bucket from an iterati
on over the buckets. | |
| * If the iteration is before the first Bucket (nextBucket() has not
been called), | | * If the iteration is before the first Bucket (nextBucket() has not
been called), | |
| * or after the last, return an empty string. | | * or after the last, return an empty string. | |
| * | | * | |
| * @return the bucket label. | | * @return the bucket label. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const UnicodeString &getBucketLabel() const; | | virtual const UnicodeString &getBucketLabel() const; | |
| | | | |
| /** | | /** | |
| * Return the type of the label for the current Bucket (selected by th
e | | * Return the type of the label for the current Bucket (selected by th
e | |
| * iteration over Buckets.) | | * iteration over Buckets.) | |
| * | | * | |
| * @return the label type. | | * @return the label type. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual UAlphabeticIndexLabelType getBucketLabelType() const; | | virtual UAlphabeticIndexLabelType getBucketLabelType() const; | |
| | | | |
| /** | | /** | |
| * Get the number of <name, data> Records in the current Bucket. | | * Get the number of <name, data> Records in the current Bucket. | |
| * If the current bucket iteration position is before the first label
or after the | | * If the current bucket iteration position is before the first label
or after the | |
| * last, return 0. | | * last, return 0. | |
| * | | * | |
| * @return the number of Records. | | * @return the number of Records. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual int32_t getBucketRecordCount() const; | | virtual int32_t getBucketRecordCount() const; | |
| | | | |
| /** | | /** | |
| * Reset the Bucket iteration for this index. The next call to nextBu
cket() | | * Reset the Bucket iteration for this index. The next call to nextBu
cket() | |
| * will restart the iteration at the first label. | | * will restart the iteration at the first label. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the operat
ion fails. | | * @param status Error code, will be set with the reason if the operat
ion fails. | |
| * @return this, for chaining. | | * @return this, for chaining. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &resetBucketIterator(UErrorCode &status); | | virtual AlphabeticIndex &resetBucketIterator(UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Advance to the next record in the current Bucket. | | * Advance to the next record in the current Bucket. | |
| * When nextBucket() is called, Record iteration is reset to just befor
e the | | * When nextBucket() is called, Record iteration is reset to just befor
e the | |
| * first Record in the new Bucket. | | * first Record in the new Bucket. | |
| * | | * | |
| * @param status Error code, will be set with the reason if the oper
ation fails. | | * @param status Error code, will be set with the reason if the oper
ation fails. | |
| * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified
while | | * U_ENUM_OUT_OF_SYNC_ERROR will be reported if the index is modified
while | |
| * an enumeration of its contents are in process. | | * an enumeration of its contents are in process. | |
| * @return TRUE if successful, FALSE when the iteration advances past
the last item. | | * @return TRUE if successful, FALSE when the iteration advances past
the last item. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual UBool nextRecord(UErrorCode &status); | | virtual UBool nextRecord(UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the name of the current Record. | | * Get the name of the current Record. | |
| * Return an empty string if the Record iteration position is before fi
rst | | * Return an empty string if the Record iteration position is before fi
rst | |
| * or after the last. | | * or after the last. | |
| * | | * | |
| * @return The name of the current index item. | | * @return The name of the current index item. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const UnicodeString &getRecordName() const; | | virtual const UnicodeString &getRecordName() const; | |
| | | | |
| /** | | /** | |
| * Return the data pointer of the Record currently being iterated over. | | * Return the data pointer of the Record currently being iterated over. | |
| * Return NULL if the current iteration position before the first item
in this Bucket, | | * Return NULL if the current iteration position before the first item
in this Bucket, | |
| * or after the last. | | * or after the last. | |
| * | | * | |
| * @return The current Record's data pointer. | | * @return The current Record's data pointer. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual const void *getRecordData() const; | | virtual const void *getRecordData() const; | |
| | | | |
| /** | | /** | |
| * Reset the Record iterator position to before the first Record in the
current Bucket. | | * Reset the Record iterator position to before the first Record in the
current Bucket. | |
| * | | * | |
| * @return This, for chaining. | | * @return This, for chaining. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual AlphabeticIndex &resetRecordIterator(); | | virtual AlphabeticIndex &resetRecordIterator(); | |
| | | | |
| private: | | private: | |
| // No ICU "poor man's RTTI" for this class nor its subclasses. | | // No ICU "poor man's RTTI" for this class nor its subclasses. | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| | | | |
| /** | | /** | |
| * No Copy constructor. | | * No Copy constructor. | |
| * @internal | | * @internal | |
| | | | |
| skipping to change at line 525 | | skipping to change at line 527 | |
| void init(UErrorCode &status); | | void init(UErrorCode &status); | |
| | | | |
| // Initialize & destruct static constants used by this class. | | // Initialize & destruct static constants used by this class. | |
| static void staticInit(UErrorCode &status); | | static void staticInit(UErrorCode &status); | |
| | | | |
| // Pinyin stuff. If the input name is Chinese, add the Pinyin prefix
to the dest string. | | // Pinyin stuff. If the input name is Chinese, add the Pinyin prefix
to the dest string. | |
| void hackName(UnicodeString &dest, const UnicodeString &name, const Co
llator *coll); | | void hackName(UnicodeString &dest, const UnicodeString &name, const Co
llator *coll); | |
| void initPinyinBounds(const Collator *coll, UErrorCode &status); | | void initPinyinBounds(const Collator *coll, UErrorCode &status); | |
| | | | |
| public: | | public: | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Delete all shared (static) data associated with an AlphabeticInde
x. | | * Delete all shared (static) data associated with an AlphabeticInde
x. | |
| * Internal function, not intended for direct use. | | * Internal function, not intended for direct use. | |
| * @internal. | | * @internal. | |
| */ | | */ | |
| static void staticCleanup(); | | static void staticCleanup(); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| private: | | private: | |
| | | | |
| // Add index characters from the specified locale to the dest set. | | // Add index characters from the specified locale to the dest set. | |
| // Does not remove any previous contents from dest. | | // Does not remove any previous contents from dest. | |
| static void getIndexExemplars(UnicodeSet &dest, const Locale &locale,
UErrorCode &status); | | static void getIndexExemplars(UnicodeSet &dest, const Locale &locale,
UErrorCode &status); | |
| | | | |
| UVector *firstStringsInScript(UErrorCode &status); | | UVector *firstStringsInScript(UErrorCode &status); | |
| | | | |
| static UnicodeString separated(const UnicodeString &item); | | static UnicodeString separated(const UnicodeString &item); | |
| | | | |
| | | | |
| skipping to change at line 553 | | skipping to change at line 557 | |
| void buildIndex(UErrorCode &status); | | void buildIndex(UErrorCode &status); | |
| void buildBucketList(UErrorCode &status); | | void buildBucketList(UErrorCode &status); | |
| void bucketRecords(UErrorCode &status); | | void bucketRecords(UErrorCode &status); | |
| | | | |
| public: | | public: | |
| | | | |
| // The following internal items are declared public only to allow acce
ss from | | // The following internal items are declared public only to allow acce
ss from | |
| // implementation code written in plain C. They are not intended for | | // implementation code written in plain C. They are not intended for | |
| // public use. | | // public use. | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * A record, or item, in the index. | | * A record, or item, in the index. | |
| * @internal | | * @internal | |
| */ | | */ | |
| struct Record: public UMemory { | | struct Record: public UMemory { | |
| AlphabeticIndex *alphaIndex_; | | AlphabeticIndex *alphaIndex_; | |
| const UnicodeString name_; | | const UnicodeString name_; | |
| UnicodeString sortingName_; // Usually the same as name_;
different for Pinyin. | | UnicodeString sortingName_; // Usually the same as name_;
different for Pinyin. | |
| const void *data_; | | const void *data_; | |
| int32_t serialNumber_; // Defines sorting order for
names that compare equal. | | int32_t serialNumber_; // Defines sorting order for
names that compare equal. | |
| Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, con
st void *data); | | Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, con
st void *data); | |
| ~Record(); | | ~Record(); | |
| }; | | }; | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * Holds all user records before they are distributed into buckets. | | * Holds all user records before they are distributed into buckets. | |
| * Type of contents is (Record *) | | * Type of contents is (Record *) | |
| * @internal | | * @internal | |
| */ | | */ | |
| UVector *inputRecords_; | | UVector *inputRecords_; | |
| | | | |
| /** | | /** | |
| * A Bucket holds an index label and references to everything belongin
g to that label. | | * A Bucket holds an index label and references to everything belongin
g to that label. | |
| | | | |
| skipping to change at line 595 | | skipping to change at line 601 | |
| Bucket(const UnicodeString &label, // Parameter strings are copi
ed. | | Bucket(const UnicodeString &label, // Parameter strings are copi
ed. | |
| const UnicodeString &lowerBoundary, | | const UnicodeString &lowerBoundary, | |
| UAlphabeticIndexLabelType type, UErrorCode &status); | | UAlphabeticIndexLabelType type, UErrorCode &status); | |
| ~Bucket(); | | ~Bucket(); | |
| }; | | }; | |
| | | | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * Language Types. For internal ICU use only. | | * Language Types. For internal ICU use only. | |
|
| * @internal | | * @internal (but not hidden with U_HIDE_INTERNAL_API because it is us
ed in public API) | |
| */ | | */ | |
| enum ELangType { | | enum ELangType { | |
| /** @internal */ | | /** @internal */ | |
| kNormal, | | kNormal, | |
| /** @internal */ | | /** @internal */ | |
| kSimplified, | | kSimplified, | |
| /** @internal */ | | /** @internal */ | |
| kTraditional | | kTraditional | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 690 | | skipping to change at line 696 | |
| static UnicodeSet *ETHIOPIC; | | static UnicodeSet *ETHIOPIC; | |
| static UnicodeSet *HANGUL; | | static UnicodeSet *HANGUL; | |
| static UnicodeSet *IGNORE_SCRIPTS; | | static UnicodeSet *IGNORE_SCRIPTS; | |
| static UnicodeSet *TO_TRY; | | static UnicodeSet *TO_TRY; | |
| static UnicodeSet *UNIHAN; | | static UnicodeSet *UNIHAN; | |
| static const UnicodeString *EMPTY_STRING; | | static const UnicodeString *EMPTY_STRING; | |
| | | | |
| }; | | }; | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
|
| | | | |
| | | #endif /* UCONFIG_NO_COLLATION / UCONFIG_NO_NORMALIZATION */ | |
| #endif | | #endif | |
| | | | |
End of changes. 42 change blocks. |
| 65 lines changed or deleted | | 69 lines changed or added | |
|
| calendar.h | | calendar.h | |
| /* | | /* | |
| ***************************************************************************
***** | | ***************************************************************************
***** | |
|
| * Copyright (C) 1997-2011, International Business Machines | | * Copyright (C) 1997-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
***** | | ***************************************************************************
***** | |
| * | | * | |
| * File CALENDAR.H | | * File CALENDAR.H | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 04/22/97 aliu Expanded and corrected comments and other heade
r | | * 04/22/97 aliu Expanded and corrected comments and other heade
r | |
| * contents. | | * contents. | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class ICUServiceFactory; | | class ICUServiceFactory; | |
| | | | |
| /** | | /** | |
| * @internal | | * @internal | |
| */ | | */ | |
| typedef int32_t UFieldResolutionTable[12][8]; | | typedef int32_t UFieldResolutionTable[12][8]; | |
| | | | |
|
| | | class BasicTimeZone; | |
| /** | | /** | |
| * <code>Calendar</code> is an abstract base class for converting between | | * <code>Calendar</code> is an abstract base class for converting between | |
| * a <code>UDate</code> object and a set of integer fields such as | | * a <code>UDate</code> object and a set of integer fields such as | |
| * <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</cod
e>, | | * <code>YEAR</code>, <code>MONTH</code>, <code>DAY</code>, <code>HOUR</cod
e>, | |
| * and so on. (A <code>UDate</code> object represents a specific instant in | | * and so on. (A <code>UDate</code> object represents a specific instant in | |
| * time with millisecond precision. See UDate | | * time with millisecond precision. See UDate | |
| * for information about the <code>UDate</code> class.) | | * for information about the <code>UDate</code> class.) | |
| * | | * | |
| * <p> | | * <p> | |
| * Subclasses of <code>Calendar</code> interpret a <code>UDate</code> | | * Subclasses of <code>Calendar</code> interpret a <code>UDate</code> | |
| | | | |
| skipping to change at line 211 | | skipping to change at line 212 | |
| | | | |
| EXTENDED_YEAR, | | EXTENDED_YEAR, | |
| JULIAN_DAY, | | JULIAN_DAY, | |
| MILLISECONDS_IN_DAY, | | MILLISECONDS_IN_DAY, | |
| IS_LEAP_MONTH, | | IS_LEAP_MONTH, | |
| | | | |
| FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields. | | FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields. | |
| #endif /* U_HIDE_DEPRECATED_API */ | | #endif /* U_HIDE_DEPRECATED_API */ | |
| }; | | }; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Useful constant for days of week. Note: Calendar day-of-week is 1-ba
sed. Clients | | * Useful constant for days of week. Note: Calendar day-of-week is 1-ba
sed. Clients | |
| * who create locale resources for the field of first-day-of-week shoul
d be aware of | | * who create locale resources for the field of first-day-of-week shoul
d be aware of | |
| * this. For instance, in US locale, first-day-of-week is set to 1, i.e
., SUNDAY. | | * this. For instance, in US locale, first-day-of-week is set to 1, i.e
., SUNDAY. | |
| * @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal.
h | | * @deprecated ICU 2.6. Use C enum UCalendarDaysOfWeek defined in ucal.
h | |
| */ | | */ | |
| enum EDaysOfWeek { | | enum EDaysOfWeek { | |
|
| #ifndef U_HIDE_DEPRECATED_API | | | |
| SUNDAY = 1, | | SUNDAY = 1, | |
| MONDAY, | | MONDAY, | |
| TUESDAY, | | TUESDAY, | |
| WEDNESDAY, | | WEDNESDAY, | |
| THURSDAY, | | THURSDAY, | |
| FRIDAY, | | FRIDAY, | |
| SATURDAY | | SATURDAY | |
|
| #endif /* U_HIDE_DEPRECATED_API */ | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Useful constants for month. Note: Calendar month is 0-based. | | * Useful constants for month. Note: Calendar month is 0-based. | |
| * @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h | | * @deprecated ICU 2.6. Use C enum UCalendarMonths defined in ucal.h | |
| */ | | */ | |
| enum EMonths { | | enum EMonths { | |
|
| #ifndef U_HIDE_DEPRECATED_API | | | |
| JANUARY, | | JANUARY, | |
| FEBRUARY, | | FEBRUARY, | |
| MARCH, | | MARCH, | |
| APRIL, | | APRIL, | |
| MAY, | | MAY, | |
| JUNE, | | JUNE, | |
| JULY, | | JULY, | |
| AUGUST, | | AUGUST, | |
| SEPTEMBER, | | SEPTEMBER, | |
| OCTOBER, | | OCTOBER, | |
| NOVEMBER, | | NOVEMBER, | |
| DECEMBER, | | DECEMBER, | |
| UNDECIMBER | | UNDECIMBER | |
|
| #endif /* U_HIDE_DEPRECATED_API */ | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Useful constants for hour in 12-hour clock. Used in GregorianCalenda
r. | | * Useful constants for hour in 12-hour clock. Used in GregorianCalenda
r. | |
| * @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h | | * @deprecated ICU 2.6. Use C enum UCalendarAMPMs defined in ucal.h | |
| */ | | */ | |
| enum EAmpm { | | enum EAmpm { | |
|
| #ifndef U_HIDE_DEPRECATED_API | | | |
| AM, | | AM, | |
| PM | | PM | |
|
| #endif /* U_HIDE_DEPRECATED_API */ | | | |
| }; | | }; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * destructor | | * destructor | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual ~Calendar(); | | virtual ~Calendar(); | |
| | | | |
| /** | | /** | |
| * Create and return a polymorphic copy of this calendar. | | * Create and return a polymorphic copy of this calendar. | |
| * | | * | |
| | | | |
| skipping to change at line 542 | | skipping to change at line 539 | |
| * @param amount The amount of time to be added to the field, in the n
atural unit | | * @param amount The amount of time to be added to the field, in the n
atural unit | |
| * for that field (e.g., days for the day fields, hours
for the hour | | * for that field (e.g., days for the day fields, hours
for the hour | |
| * field.) | | * field.) | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode&
status); | | virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode&
status); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | | * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | | * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | |
| * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | | * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | |
| * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | | * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
| * 02/29/96. Rolling up always means rolling forward in time; e.g., rol
ling the year | | * 02/29/96. Rolling up always means rolling forward in time; e.g., rol
ling the year | |
| * up on "100 BC" will result in "99 BC", for Gregorian calendar. When
rolling on the | | * up on "100 BC" will result in "99 BC", for Gregorian calendar. When
rolling on the | |
| | | | |
| skipping to change at line 566 | | skipping to change at line 564 | |
| * | | * | |
| * @param field The time field. | | * @param field The time field. | |
| * @param up Indicates if the value of the specified time field is
to be rolled | | * @param up Indicates if the value of the specified time field is
to be rolled | |
| * up or rolled down. Use true if rolling up, false othe
rwise. | | * up or rolled down. Use true if rolling up, false othe
rwise. | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U
ErrorCode& status) instead. | | * @deprecated ICU 2.6. Use roll(UCalendarDateFields field, UBool up, U
ErrorCode& status) instead. | |
| */ | | */ | |
| inline void roll(EDateFields field, UBool up, UErrorCode& status); | | inline void roll(EDateFields field, UBool up, UErrorCode& status); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | | * Time Field Rolling function. Rolls (up/down) a single unit of time o
n the given | |
| * time field. For example, to roll the current date up by one day, cal
l | | * time field. For example, to roll the current date up by one day, cal
l | |
| * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | | * roll(Calendar::DATE, true). When rolling on the year or Calendar::YE
AR field, it | |
| * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | | * will roll the year value in the range between getMinimum(Calendar::Y
EAR) and the | |
| * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | | * value returned by getMaximum(Calendar::YEAR). When rolling on the mo
nth or | |
| * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | | * Calendar::MONTH field, other fields like date might conflict and, ne
ed to be | |
| * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | | * changed. For instance, rolling the month up on the date 01/31/96 wil
l result in | |
| * 02/29/96. Rolling up always means rolling forward in time; e.g., rol
ling the year | | * 02/29/96. Rolling up always means rolling forward in time; e.g., rol
ling the year | |
| | | | |
| skipping to change at line 825 | | skipping to change at line 824 | |
| void setLenient(UBool lenient); | | void setLenient(UBool lenient); | |
| | | | |
| /** | | /** | |
| * Tells whether date/time interpretation is to be lenient. | | * Tells whether date/time interpretation is to be lenient. | |
| * | | * | |
| * @return True tells that date/time interpretation is to be lenient. | | * @return True tells that date/time interpretation is to be lenient. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UBool isLenient(void) const; | | UBool isLenient(void) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DRAFT_API | |
| | | /** | |
| | | * Sets the behavior for handling wall time repeating multiple times | |
| | | * at negative time zone offset transitions. For example, 1:30 AM on | |
| | | * November 6, 2011 in US Eastern time (Ameirca/New_York) occurs twice; | |
| | | * 1:30 AM EDT, then 1:30 AM EST one hour later. When <code>UCAL_WALLTI | |
| | | ME_FIRST</code> | |
| | | * is used, the wall time 1:30AM in this example will be interpreted as | |
| | | 1:30 AM EDT | |
| | | * (first occurrence). When <code>UCAL_WALLTIME_LAST</code> is used, it | |
| | | will be | |
| | | * interpreted as 1:30 AM EST (last occurrence). The default value is | |
| | | * <code>UCAL_WALLTIME_LAST</code>. | |
| | | * <p> | |
| | | * <b>Note:</b>When <code>UCAL_WALLTIME_NEXT_VALID</code> is not a vali | |
| | | d | |
| | | * option for this. When the argument is neither <code>UCAL_WALLTIME_FI | |
| | | RST</code> | |
| | | * nor <code>UCAL_WALLTIME_LAST</code>, this method has no effect and w | |
| | | ill keep | |
| | | * the current setting. | |
| | | * | |
| | | * @param option the behavior for handling repeating wall time, either | |
| | | * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. | |
| | | * @see #getRepeatedWallTimeOption | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | void setRepeatedWallTimeOption(UCalendarWallTimeOption option); | |
| | | | |
| | | /** | |
| | | * Gets the behavior for handling wall time repeating multiple times | |
| | | * at negative time zone offset transitions. | |
| | | * | |
| | | * @return the behavior for handling repeating wall time, either | |
| | | * <code>UCAL_WALLTIME_FIRST</code> or <code>UCAL_WALLTIME_LAST</code>. | |
| | | * @see #setRepeatedWallTimeOption | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UCalendarWallTimeOption getRepeatedWallTimeOption(void) const; | |
| | | | |
| | | /** | |
| | | * Sets the behavior for handling skipped wall time at positive time zo | |
| | | ne offset | |
| | | * transitions. For example, 2:30 AM on March 13, 2011 in US Eastern ti | |
| | | me (America/New_York) | |
| | | * does not exist because the wall time jump from 1:59 AM EST to 3:00 A | |
| | | M EDT. When | |
| | | * <code>UCAL_WALLTIME_FIRST</code> is used, 2:30 AM is interpreted as | |
| | | 30 minutes before 3:00 AM | |
| | | * EDT, therefore, it will be resolved as 1:30 AM EST. When <code>UCAL_ | |
| | | WALLTIME_LAST</code> | |
| | | * is used, 2:30 AM is interpreted as 31 minutes after 1:59 AM EST, the | |
| | | refore, it will be | |
| | | * resolved as 3:30 AM EDT. When <code>UCAL_WALLTIME_NEXT_VALID</code> | |
| | | is used, 2:30 AM will | |
| | | * be resolved as next valid wall time, that is 3:00 AM EDT. The defaul | |
| | | t value is | |
| | | * <code>UCAL_WALLTIME_LAST</code>. | |
| | | * <p> | |
| | | * <b>Note:</b>This option is effective only when this calendar is leni | |
| | | ent. | |
| | | * When the calendar is strict, such non-existing wall time will cause | |
| | | an error. | |
| | | * | |
| | | * @param option the behavior for handling skipped wall time at positiv | |
| | | e time zone | |
| | | * offset transitions, one of <code>UCAL_WALLTIME_FIRST</code>, <code>U | |
| | | CAL_WALLTIME_LAST</code> and | |
| | | * <code>UCAL_WALLTIME_NEXT_VALID</code>. | |
| | | * @see #getSkippedWallTimeOption | |
| | | * | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | void setSkippedWallTimeOption(UCalendarWallTimeOption option); | |
| | | | |
| | | /** | |
| | | * Gets the behavior for handling skipped wall time at positive time zo | |
| | | ne offset | |
| | | * transitions. | |
| | | * | |
| | | * @return the behavior for handling skipped wall time, one of | |
| | | * <code>UCAL_WALLTIME_FIRST</code>, <code>UCAL_WALLTIME_LAST</code> | |
| | | * and <code>UCAL_WALLTIME_NEXT_VALID</code>. | |
| | | * @see #setSkippedWallTimeOption | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UCalendarWallTimeOption getSkippedWallTimeOption(void) const; | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Sets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | | * Sets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | |
| * | | * | |
| * @param value The given first day of the week. | | * @param value The given first day of the week. | |
| * @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value
) instead. | | * @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value
) instead. | |
| */ | | */ | |
| void setFirstDayOfWeek(EDaysOfWeek value); | | void setFirstDayOfWeek(EDaysOfWeek value); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Sets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | | * Sets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | |
| * | | * | |
| * @param value The given first day of the week. | | * @param value The given first day of the week. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| void setFirstDayOfWeek(UCalendarDaysOfWeek value); | | void setFirstDayOfWeek(UCalendarDaysOfWeek value); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Gets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | | * Gets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | |
| * | | * | |
| * @return The first day of the week. | | * @return The first day of the week. | |
| * @deprecated ICU 2.6 use the overload with error code | | * @deprecated ICU 2.6 use the overload with error code | |
| */ | | */ | |
| EDaysOfWeek getFirstDayOfWeek(void) const; | | EDaysOfWeek getFirstDayOfWeek(void) const; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Gets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | | * Gets what the first day of the week is; e.g., Sunday in US, Monday i
n France. | |
| * | | * | |
| * @param status error code | | * @param status error code | |
| * @return The first day of the week. | | * @return The first day of the week. | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const; | | UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const; | |
| | | | |
| | | | |
| skipping to change at line 960 | | skipping to change at line 1033 | |
| /** | | /** | |
| * Gets the lowest maximum value for the given field if varies. Otherwi
se same as | | * Gets the lowest maximum value for the given field if varies. Otherwi
se same as | |
| * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28. | | * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @return The lowest maximum value for the given time field. | | * @return The lowest maximum value for the given time field. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| virtual int32_t getLeastMaximum(UCalendarDateFields field) const; | | virtual int32_t getLeastMaximum(UCalendarDateFields field) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Return the minimum value that this field could have, given the curre
nt date. | | * Return the minimum value that this field could have, given the curre
nt date. | |
| * For the Gregorian calendar, this is the same as getMinimum() and get
GreatestMinimum(). | | * For the Gregorian calendar, this is the same as getMinimum() and get
GreatestMinimum(). | |
| * | | * | |
| * The version of this function on Calendar uses an iterative algorithm
to determine the | | * The version of this function on Calendar uses an iterative algorithm
to determine the | |
| * actual minimum value for the field. There is almost always a more e
fficient way to | | * actual minimum value for the field. There is almost always a more e
fficient way to | |
| * accomplish this (in most cases, you can simply return getMinimum()).
GregorianCalendar | | * accomplish this (in most cases, you can simply return getMinimum()).
GregorianCalendar | |
| * overrides this function with a more efficient implementation. | | * overrides this function with a more efficient implementation. | |
| * | | * | |
| * @param field the field to determine the minimum of | | * @param field the field to determine the minimum of | |
| * @param status Fill-in parameter which receives the status of this
operation. | | * @param status Fill-in parameter which receives the status of this
operation. | |
| * @return the minimum of the given field for the current date
of this Calendar | | * @return the minimum of the given field for the current date
of this Calendar | |
| * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field,
UErrorCode& status) instead. | | * @deprecated ICU 2.6. Use getActualMinimum(UCalendarDateFields field,
UErrorCode& status) instead. | |
| */ | | */ | |
| int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; | | int32_t getActualMinimum(EDateFields field, UErrorCode& status) const; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Return the minimum value that this field could have, given the curre
nt date. | | * Return the minimum value that this field could have, given the curre
nt date. | |
| * For the Gregorian calendar, this is the same as getMinimum() and get
GreatestMinimum(). | | * For the Gregorian calendar, this is the same as getMinimum() and get
GreatestMinimum(). | |
| * | | * | |
| * The version of this function on Calendar uses an iterative algorithm
to determine the | | * The version of this function on Calendar uses an iterative algorithm
to determine the | |
| * actual minimum value for the field. There is almost always a more e
fficient way to | | * actual minimum value for the field. There is almost always a more e
fficient way to | |
| * accomplish this (in most cases, you can simply return getMinimum()).
GregorianCalendar | | * accomplish this (in most cases, you can simply return getMinimum()).
GregorianCalendar | |
| * overrides this function with a more efficient implementation. | | * overrides this function with a more efficient implementation. | |
| * | | * | |
| * @param field the field to determine the minimum of | | * @param field the field to determine the minimum of | |
| * @param status Fill-in parameter which receives the status of this
operation. | | * @param status Fill-in parameter which receives the status of this
operation. | |
| * @return the minimum of the given field for the current date
of this Calendar | | * @return the minimum of the given field for the current date
of this Calendar | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode&
status) const; | | virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode&
status) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Return the maximum value that this field could have, given the curre
nt date. | | * Return the maximum value that this field could have, given the curre
nt date. | |
| * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field,
the actual | | * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field,
the actual | |
| * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb
rew calendar, | | * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb
rew calendar, | |
| * for some years the actual maximum for MONTH is 12, and for others 13
. | | * for some years the actual maximum for MONTH is 12, and for others 13
. | |
| * | | * | |
| * The version of this function on Calendar uses an iterative algorithm
to determine the | | * The version of this function on Calendar uses an iterative algorithm
to determine the | |
| * actual maximum value for the field. There is almost always a more e
fficient way to | | * actual maximum value for the field. There is almost always a more e
fficient way to | |
| * accomplish this (in most cases, you can simply return getMaximum()).
GregorianCalendar | | * accomplish this (in most cases, you can simply return getMaximum()).
GregorianCalendar | |
| * overrides this function with a more efficient implementation. | | * overrides this function with a more efficient implementation. | |
| * | | * | |
| * @param field the field to determine the maximum of | | * @param field the field to determine the maximum of | |
| * @param status Fill-in parameter which receives the status of this
operation. | | * @param status Fill-in parameter which receives the status of this
operation. | |
| * @return the maximum of the given field for the current date
of this Calendar | | * @return the maximum of the given field for the current date
of this Calendar | |
| * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field,
UErrorCode& status) instead. | | * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field,
UErrorCode& status) instead. | |
| */ | | */ | |
| int32_t getActualMaximum(EDateFields field, UErrorCode& status) const; | | int32_t getActualMaximum(EDateFields field, UErrorCode& status) const; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Return the maximum value that this field could have, given the curre
nt date. | | * Return the maximum value that this field could have, given the curre
nt date. | |
| * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field,
the actual | | * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field,
the actual | |
| * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb
rew calendar, | | * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Heb
rew calendar, | |
| * for some years the actual maximum for MONTH is 12, and for others 13
. | | * for some years the actual maximum for MONTH is 12, and for others 13
. | |
| * | | * | |
| * The version of this function on Calendar uses an iterative algorithm
to determine the | | * The version of this function on Calendar uses an iterative algorithm
to determine the | |
| * actual maximum value for the field. There is almost always a more e
fficient way to | | * actual maximum value for the field. There is almost always a more e
fficient way to | |
| * accomplish this (in most cases, you can simply return getMaximum()).
GregorianCalendar | | * accomplish this (in most cases, you can simply return getMaximum()).
GregorianCalendar | |
| * overrides this function with a more efficient implementation. | | * overrides this function with a more efficient implementation. | |
| * | | * | |
| * @param field the field to determine the maximum of | | * @param field the field to determine the maximum of | |
| * @param status Fill-in parameter which receives the status of this
operation. | | * @param status Fill-in parameter which receives the status of this
operation. | |
| * @return the maximum of the given field for the current date
of this Calendar | | * @return the maximum of the given field for the current date
of this Calendar | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode&
status) const; | | virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode&
status) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Gets the value for a given time field. Recalculate the current time
field values | | * Gets the value for a given time field. Recalculate the current time
field values | |
| * if the time value has been changed by a call to setTime(). Return ze
ro for unset | | * if the time value has been changed by a call to setTime(). Return ze
ro for unset | |
| * fields if any fields have been explicitly set by a call to set(). To
force a | | * fields if any fields have been explicitly set by a call to set(). To
force a | |
| * recomputation of all fields regardless of the previous state, call c
omplete(). | | * recomputation of all fields regardless of the previous state, call c
omplete(). | |
| * This method is semantically const, but may alter the object in memor
y. | | * This method is semantically const, but may alter the object in memor
y. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param status Fill-in parameter which receives the status of the ope
ration. | | * @param status Fill-in parameter which receives the status of the ope
ration. | |
| * @return The value for the given time field, or zero if the fie
ld is unset, | | * @return The value for the given time field, or zero if the fie
ld is unset, | |
| * and set() has been called for any other field. | | * and set() has been called for any other field. | |
| * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode&
status) instead. | | * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode&
status) instead. | |
| */ | | */ | |
| int32_t get(EDateFields field, UErrorCode& status) const; | | int32_t get(EDateFields field, UErrorCode& status) const; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Gets the value for a given time field. Recalculate the current time
field values | | * Gets the value for a given time field. Recalculate the current time
field values | |
| * if the time value has been changed by a call to setTime(). Return ze
ro for unset | | * if the time value has been changed by a call to setTime(). Return ze
ro for unset | |
| * fields if any fields have been explicitly set by a call to set(). To
force a | | * fields if any fields have been explicitly set by a call to set(). To
force a | |
| * recomputation of all fields regardless of the previous state, call c
omplete(). | | * recomputation of all fields regardless of the previous state, call c
omplete(). | |
| * This method is semantically const, but may alter the object in memor
y. | | * This method is semantically const, but may alter the object in memor
y. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param status Fill-in parameter which receives the status of the ope
ration. | | * @param status Fill-in parameter which receives the status of the ope
ration. | |
| * @return The value for the given time field, or zero if the fie
ld is unset, | | * @return The value for the given time field, or zero if the fie
ld is unset, | |
| * and set() has been called for any other field. | | * and set() has been called for any other field. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| int32_t get(UCalendarDateFields field, UErrorCode& status) const; | | int32_t get(UCalendarDateFields field, UErrorCode& status) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Determines if the given time field has a value set. This can affect
in the | | * Determines if the given time field has a value set. This can affect
in the | |
| * resolving of time in Calendar. Unset fields have a value of zero, by
definition. | | * resolving of time in Calendar. Unset fields have a value of zero, by
definition. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @return True if the given time field has a value set; false otherw
ise. | | * @return True if the given time field has a value set; false otherw
ise. | |
| * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead. | | * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead. | |
| */ | | */ | |
| UBool isSet(EDateFields field) const; | | UBool isSet(EDateFields field) const; | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Determines if the given time field has a value set. This can affect
in the | | * Determines if the given time field has a value set. This can affect
in the | |
| * resolving of time in Calendar. Unset fields have a value of zero, by
definition. | | * resolving of time in Calendar. Unset fields have a value of zero, by
definition. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @return True if the given time field has a value set; false otherw
ise. | | * @return True if the given time field has a value set; false otherw
ise. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| UBool isSet(UCalendarDateFields field) const; | | UBool isSet(UCalendarDateFields field) const; | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Sets the given time field with the given value. | | * Sets the given time field with the given value. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param value The value to be set for the given time field. | | * @param value The value to be set for the given time field. | |
| * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t valu
e) instead. | | * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t valu
e) instead. | |
| */ | | */ | |
| void set(EDateFields field, int32_t value); | | void set(EDateFields field, int32_t value); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Sets the given time field with the given value. | | * Sets the given time field with the given value. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param value The value to be set for the given time field. | | * @param value The value to be set for the given time field. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| void set(UCalendarDateFields field, int32_t value); | | void set(UCalendarDateFields field, int32_t value); | |
| | | | |
| | | | |
| skipping to change at line 1145 | | skipping to change at line 1228 | |
| void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32
_t minute, int32_t second); | | void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32
_t minute, int32_t second); | |
| | | | |
| /** | | /** | |
| * Clears the values of all the time fields, making them both unset and
assigning | | * Clears the values of all the time fields, making them both unset and
assigning | |
| * them a value of zero. The field values will be determined during the
next | | * them a value of zero. The field values will be determined during the
next | |
| * resolving of time into time fields. | | * resolving of time into time fields. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| void clear(void); | | void clear(void); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Clears the value in the given time field, both making it unset and a
ssigning it a | | * Clears the value in the given time field, both making it unset and a
ssigning it a | |
| * value of zero. This field value will be determined during the next r
esolving of | | * value of zero. This field value will be determined during the next r
esolving of | |
| * time into time fields. | | * time into time fields. | |
| * | | * | |
| * @param field The time field to be cleared. | | * @param field The time field to be cleared. | |
| * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead. | | * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead. | |
| */ | | */ | |
| void clear(EDateFields field); | | void clear(EDateFields field); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Clears the value in the given time field, both making it unset and a
ssigning it a | | * Clears the value in the given time field, both making it unset and a
ssigning it a | |
| * value of zero. This field value will be determined during the next r
esolving of | | * value of zero. This field value will be determined during the next r
esolving of | |
| * time into time fields. | | * time into time fields. | |
| * | | * | |
| * @param field The time field to be cleared. | | * @param field The time field to be cleared. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| void clear(UCalendarDateFields field); | | void clear(UCalendarDateFields field); | |
| | | | |
| skipping to change at line 1183 | | skipping to change at line 1268 | |
| * static UClassID getStaticClassID() { return (UClassID)&fgCl
assID; } | | * static UClassID getStaticClassID() { return (UClassID)&fgCl
assID; } | |
| * static char fgClassID; | | * static char fgClassID; | |
| * | | * | |
| * @return The class ID for this object. All objects of a given class
have the | | * @return The class ID for this object. All objects of a given class
have the | |
| * same class ID. Objects of other classes have different cla
ss IDs. | | * same class ID. Objects of other classes have different cla
ss IDs. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UClassID getDynamicClassID(void) const = 0; | | virtual UClassID getDynamicClassID(void) const = 0; | |
| | | | |
| /** | | /** | |
|
| * Returns the resource key string used for this calendar type. | | * Returns the calendar type name string for this Calendar object. | |
| * For example, prepending "Eras_" to this string could return "Eras_ja | | * The returned string is the legacy ICU calendar attribute value, | |
| panese" | | * for example, "gregorian" or "japanese". | |
| * or "Eras_gregorian". | | | |
| * | | * | |
|
| * @returns static string, for example, "gregorian" or "japanese" | | * See type="old type name" for the calendar attribute of locale IDs | |
| * @internal | | * at http://www.unicode.org/reports/tr35/#Key_Type_Definitions | |
| | | * | |
| | | * Sample code for getting the LDML/BCP 47 calendar key value: | |
| | | * \code | |
| | | * const char *calType = cal->getType(); | |
| | | * if (0 == strcmp(calType, "unknown")) { | |
| | | * // deal with unknown calendar type | |
| | | * } else { | |
| | | * string localeID("root@calendar="); | |
| | | * localeID.append(calType); | |
| | | * char langTag[100]; | |
| | | * UErrorCode errorCode = U_ZERO_ERROR; | |
| | | * int32_t length = uloc_toLanguageTag(localeID.c_str(), langTag, ( | |
| | | int32_t)sizeof(langTag), TRUE, &errorCode); | |
| | | * if (U_FAILURE(errorCode)) { | |
| | | * // deal with errors & overflow | |
| | | * } | |
| | | * string lang(langTag, length); | |
| | | * size_t caPos = lang.find("-ca-"); | |
| | | * lang.erase(0, caPos + 4); | |
| | | * // lang now contains the LDML calendar type | |
| | | * } | |
| | | * \endcode | |
| | | * | |
| | | * @return legacy calendar type name string | |
| | | * @draft ICU 49 | |
| */ | | */ | |
| virtual const char * getType() const = 0; | | virtual const char * getType() const = 0; | |
| | | | |
| /** | | /** | |
| * Returns whether the given day of the week is a weekday, a | | * Returns whether the given day of the week is a weekday, a | |
| * weekend day, or a day that transitions from one to the other, | | * weekend day, or a day that transitions from one to the other, | |
| * in this calendar system. If a transition occurs at midnight, | | * in this calendar system. If a transition occurs at midnight, | |
| * then the days before and after the transition will have the | | * then the days before and after the transition will have the | |
| * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time | | * type UCAL_WEEKDAY or UCAL_WEEKEND. If a transition occurs at a time | |
| * other than midnight, then the day of the transition will have | | * other than midnight, then the day of the transition will have | |
| | | | |
| skipping to change at line 1351 | | skipping to change at line 1460 | |
| * Recomputes the current time from currently set fields, and then fill
s in any | | * Recomputes the current time from currently set fields, and then fill
s in any | |
| * unset fields in the time field list. | | * unset fields in the time field list. | |
| * | | * | |
| * @param status Output param set to success/failure code on exit. If
any value | | * @param status Output param set to success/failure code on exit. If
any value | |
| * previously set in the time field is invalid or restri
cted by | | * previously set in the time field is invalid or restri
cted by | |
| * leniency, this will be set to an error status. | | * leniency, this will be set to an error status. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| void complete(UErrorCode& status); | | void complete(UErrorCode& status); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Gets the value for a given time field. Subclasses can use this funct
ion to get | | * Gets the value for a given time field. Subclasses can use this funct
ion to get | |
| * field values without forcing recomputation of time. | | * field values without forcing recomputation of time. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @return The value for the given time field. | | * @return The value for the given time field. | |
| * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) inst
ead. | | * @deprecated ICU 2.6. Use internalGet(UCalendarDateFields field) inst
ead. | |
| */ | | */ | |
| inline int32_t internalGet(EDateFields field) const {return fFields[fie
ld];} | | inline int32_t internalGet(EDateFields field) const {return fFields[fie
ld];} | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Gets the value for a given time field. Subclasses can use this funct
ion to get | | * Gets the value for a given time field. Subclasses can use this funct
ion to get | |
| * field values without forcing recomputation of time. If the field's s
tamp is UNSET, | | * field values without forcing recomputation of time. If the field's s
tamp is UNSET, | |
| * the defaultValue is used. | | * the defaultValue is used. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param defaultValue a default value used if the field is unset. | | * @param defaultValue a default value used if the field is unset. | |
| * @return The value for the given time field. | | * @return The value for the given time field. | |
| * @internal | | * @internal | |
| */ | | */ | |
| | | | |
| skipping to change at line 1382 | | skipping to change at line 1494 | |
| | | | |
| /** | | /** | |
| * Gets the value for a given time field. Subclasses can use this funct
ion to get | | * Gets the value for a given time field. Subclasses can use this funct
ion to get | |
| * field values without forcing recomputation of time. | | * field values without forcing recomputation of time. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @return The value for the given time field. | | * @return The value for the given time field. | |
| * @internal | | * @internal | |
| */ | | */ | |
| inline int32_t internalGet(UCalendarDateFields field) const {return fFi
elds[field];} | | inline int32_t internalGet(UCalendarDateFields field) const {return fFi
elds[field];} | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Sets the value for a given time field. This is a fast internal meth
od for | | * Sets the value for a given time field. This is a fast internal meth
od for | |
| * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a
reAllFieldsSet | | * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a
reAllFieldsSet | |
| * flags. | | * flags. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param value The value for the given time field. | | * @param value The value for the given time field. | |
| * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int3
2_t value) instead. | | * @deprecated ICU 2.6. Use internalSet(UCalendarDateFields field, int3
2_t value) instead. | |
| */ | | */ | |
| void internalSet(EDateFields field, int32_t value); | | void internalSet(EDateFields field, int32_t value); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Sets the value for a given time field. This is a fast internal meth
od for | | * Sets the value for a given time field. This is a fast internal meth
od for | |
| * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a
reAllFieldsSet | | * subclasses. It does not affect the areFieldsInSync, isTimeSet, or a
reAllFieldsSet | |
| * flags. | | * flags. | |
| * | | * | |
| * @param field The given time field. | | * @param field The given time field. | |
| * @param value The value for the given time field. | | * @param value The value for the given time field. | |
| * @stable ICU 2.6. | | * @stable ICU 2.6. | |
| */ | | */ | |
| | | | |
| skipping to change at line 1521 | | skipping to change at line 1636 | |
| /** | | /** | |
| * Subclasses must override this to convert from week fields | | * Subclasses must override this to convert from week fields | |
| * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case | | * (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case | |
| * where YEAR, EXTENDED_YEAR are not set. | | * where YEAR, EXTENDED_YEAR are not set. | |
| * The Calendar implementation assumes yearWoy is in extended gregorian
form | | * The Calendar implementation assumes yearWoy is in extended gregorian
form | |
| * @internal | | * @internal | |
| * @return the extended year, UCAL_EXTENDED_YEAR | | * @return the extended year, UCAL_EXTENDED_YEAR | |
| */ | | */ | |
| virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, in
t32_t woy); | | virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, in
t32_t woy); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Compute the Julian day from fields. Will determine whether to use | | * Compute the Julian day from fields. Will determine whether to use | |
| * the JULIAN_DAY field directly, or other fields. | | * the JULIAN_DAY field directly, or other fields. | |
| * @return the julian day | | * @return the julian day | |
| * @internal | | * @internal | |
| */ | | */ | |
| int32_t computeJulianDay(); | | int32_t computeJulianDay(); | |
| | | | |
| /** | | /** | |
| * Compute the milliseconds in the day from the fields. This is a | | * Compute the milliseconds in the day from the fields. This is a | |
| | | | |
| skipping to change at line 1620 | | skipping to change at line 1736 | |
| * field value. This field will NOT be examined; it only determines | | * field value. This field will NOT be examined; it only determines | |
| * the return value if the other fields in the line are the newest. | | * the return value if the other fields in the line are the newest. | |
| * | | * | |
| * <p>If all lines of a group contain at least one unset field, then no | | * <p>If all lines of a group contain at least one unset field, then no | |
| * line will match, and the group as a whole will fail to match. In | | * line will match, and the group as a whole will fail to match. In | |
| * that case, the next group will be processed. If all groups fail to | | * that case, the next group will be processed. If all groups fail to | |
| * match, then UCAL_FIELD_COUNT is returned. | | * match, then UCAL_FIELD_COUNT is returned. | |
| * @internal | | * @internal | |
| */ | | */ | |
| UCalendarDateFields resolveFields(const UFieldResolutionTable *preceden
ceTable); | | UCalendarDateFields resolveFields(const UFieldResolutionTable *preceden
ceTable); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * @internal | | * @internal | |
| */ | | */ | |
| virtual const UFieldResolutionTable* getFieldResolutionTable() const; | | virtual const UFieldResolutionTable* getFieldResolutionTable() const; | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Return the field that is newer, either defaultField, or | | * Return the field that is newer, either defaultField, or | |
| * alternateField. If neither is newer or neither is set, return defau
ltField. | | * alternateField. If neither is newer or neither is set, return defau
ltField. | |
| * @internal | | * @internal | |
| */ | | */ | |
| UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalen
darDateFields alternateField) const; | | UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalen
darDateFields alternateField) const; | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| private: | | private: | |
| /** | | /** | |
| * Helper function for calculating limits by trial and error | | * Helper function for calculating limits by trial and error | |
| * @param field The field being investigated | | * @param field The field being investigated | |
| * @param startValue starting (least max) value of field | | * @param startValue starting (least max) value of field | |
| * @param endValue ending (greatest max) value of field | | * @param endValue ending (greatest max) value of field | |
| * @param status return type | | * @param status return type | |
| * @internal | | * @internal | |
| */ | | */ | |
| | | | |
| skipping to change at line 1751 | | skipping to change at line 1870 | |
| * <p>In addition, subclasses should compute any subclass-specific | | * <p>In addition, subclasses should compute any subclass-specific | |
| * fields, that is, fields from BASE_FIELD_COUNT to | | * fields, that is, fields from BASE_FIELD_COUNT to | |
| * getFieldCount() - 1. | | * getFieldCount() - 1. | |
| * | | * | |
| * <p>The default implementation in <code>Calendar</code> implements | | * <p>The default implementation in <code>Calendar</code> implements | |
| * a pure proleptic Gregorian calendar. | | * a pure proleptic Gregorian calendar. | |
| * @internal | | * @internal | |
| */ | | */ | |
| virtual void handleComputeFields(int32_t julianDay, UErrorCode &status)
; | | virtual void handleComputeFields(int32_t julianDay, UErrorCode &status)
; | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Return the extended year on the Gregorian calendar as computed by | | * Return the extended year on the Gregorian calendar as computed by | |
| * <code>computeGregorianFields()</code>. | | * <code>computeGregorianFields()</code>. | |
| * @internal | | * @internal | |
| */ | | */ | |
| int32_t getGregorianYear() const { | | int32_t getGregorianYear() const { | |
| return fGregorianYear; | | return fGregorianYear; | |
| } | | } | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1786 | | skipping to change at line 1906 | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Return the day of month (1-based) on the Gregorian calendar as | | * Return the day of month (1-based) on the Gregorian calendar as | |
| * computed by <code>computeGregorianFields()</code>. | | * computed by <code>computeGregorianFields()</code>. | |
| * @internal | | * @internal | |
| */ | | */ | |
| int32_t getGregorianDayOfMonth() const { | | int32_t getGregorianDayOfMonth() const { | |
| return fGregorianDayOfMonth; | | return fGregorianDayOfMonth; | |
| } | | } | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * Called by computeJulianDay. Returns the default month (0-based) for
the year, | | * Called by computeJulianDay. Returns the default month (0-based) for
the year, | |
| * taking year and era into account. Defaults to 0 for Gregorian, whic
h doesn't care. | | * taking year and era into account. Defaults to 0 for Gregorian, whic
h doesn't care. | |
| * @param eyear The extended year | | * @param eyear The extended year | |
| * @internal | | * @internal | |
| */ | | */ | |
| virtual int32_t getDefaultMonthInYear(int32_t eyear) ; | | virtual int32_t getDefaultMonthInYear(int32_t eyear) ; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1885 | | skipping to change at line 2006 | |
| * | | * | |
| * @return The week number (one-based), or zero if the day falls b
efore | | * @return The week number (one-based), or zero if the day falls b
efore | |
| * the first week because | | * the first week because | |
| * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirst
Week} | | * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirst
Week} | |
| * is more than one. | | * is more than one. | |
| * | | * | |
| * @stable ICU 2.8 | | * @stable ICU 2.8 | |
| */ | | */ | |
| int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t day
OfWeek); | | int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t day
OfWeek); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Return the week number of a day, within a period. This may be the we
ek number in | | * Return the week number of a day, within a period. This may be the we
ek number in | |
| * a year, or the week number in a month. Usually this will be a value
>= 1, but if | | * a year, or the week number in a month. Usually this will be a value
>= 1, but if | |
| * some initial days of the period are excluded from week 1, because | | * some initial days of the period are excluded from week 1, because | |
| * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, | | * {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is > 1, | |
| * then the week number will be zero for those | | * then the week number will be zero for those | |
| * initial days. This method requires the day of week for the given dat
e in order to | | * initial days. This method requires the day of week for the given dat
e in order to | |
| * determine the result. | | * determine the result. | |
| * <p> | | * <p> | |
| * <b>Subclassing:</b> | | * <b>Subclassing:</b> | |
| | | | |
| skipping to change at line 1922 | | skipping to change at line 2044 | |
| * is more than one. | | * is more than one. | |
| * @internal | | * @internal | |
| */ | | */ | |
| inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek); | | inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek); | |
| | | | |
| /** | | /** | |
| * returns the local DOW, valid range 0..6 | | * returns the local DOW, valid range 0..6 | |
| * @internal | | * @internal | |
| */ | | */ | |
| int32_t getLocalDOW(); | | int32_t getLocalDOW(); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| private: | | private: | |
| | | | |
| /** | | /** | |
| * The next available value for fStamp[] | | * The next available value for fStamp[] | |
| */ | | */ | |
| int32_t fNextStamp;// = MINIMUM_USER_STAMP; | | int32_t fNextStamp;// = MINIMUM_USER_STAMP; | |
| | | | |
| /** | | /** | |
| * Recalculates the time stamp array (fStamp). | | * Recalculates the time stamp array (fStamp). | |
| | | | |
| skipping to change at line 1953 | | skipping to change at line 2076 | |
| */ | | */ | |
| UBool fLenient; | | UBool fLenient; | |
| | | | |
| /** | | /** | |
| * Time zone affects the time calculation done by Calendar. Calendar su
bclasses use | | * Time zone affects the time calculation done by Calendar. Calendar su
bclasses use | |
| * the time zone data to produce the local time. | | * the time zone data to produce the local time. | |
| */ | | */ | |
| TimeZone* fZone; | | TimeZone* fZone; | |
| | | | |
| /** | | /** | |
|
| | | * Option for rpeated wall time | |
| | | * @see #setRepeatedWallTimeOption | |
| | | */ | |
| | | UCalendarWallTimeOption fRepeatedWallTime; | |
| | | | |
| | | /** | |
| | | * Option for skipped wall time | |
| | | * @see #setSkippedWallTimeOption | |
| | | */ | |
| | | UCalendarWallTimeOption fSkippedWallTime; | |
| | | | |
| | | /** | |
| * Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent.
They are | | * Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent.
They are | |
| * used to figure out the week count for a specific date for a given lo
cale. These | | * used to figure out the week count for a specific date for a given lo
cale. These | |
| * must be set when a Calendar is constructed. For example, in US local
e, | | * must be set when a Calendar is constructed. For example, in US local
e, | |
| * firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used
to figure | | * firstDayOfWeek is SUNDAY; minimalDaysInFirstWeek is 1. They are used
to figure | |
| * out the week count for a specific date for a given locale. These mus
t be set when | | * out the week count for a specific date for a given locale. These mus
t be set when | |
| * a Calendar is constructed. | | * a Calendar is constructed. | |
| */ | | */ | |
| UCalendarDaysOfWeek fFirstDayOfWeek; | | UCalendarDaysOfWeek fFirstDayOfWeek; | |
| uint8_t fMinimalDaysInFirstWeek; | | uint8_t fMinimalDaysInFirstWeek; | |
| UCalendarDaysOfWeek fWeekendOnset; | | UCalendarDaysOfWeek fWeekendOnset; | |
| | | | |
| skipping to change at line 2094 | | skipping to change at line 2229 | |
| * Validate a single field of this calendar given its minimum and | | * Validate a single field of this calendar given its minimum and | |
| * maximum allowed value. If the field is out of range, | | * maximum allowed value. If the field is out of range, | |
| * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may | | * <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may | |
| * use this method in their implementation of {@link | | * use this method in their implementation of {@link | |
| * #validateField(int, int&)}. | | * #validateField(int, int&)}. | |
| * @internal | | * @internal | |
| */ | | */ | |
| void validateField(UCalendarDateFields field, int32_t min, int32_t max,
UErrorCode& status); | | void validateField(UCalendarDateFields field, int32_t min, int32_t max,
UErrorCode& status); | |
| | | | |
| protected: | | protected: | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Convert a quasi Julian date to the day of the week. The Julian date
used here is | | * Convert a quasi Julian date to the day of the week. The Julian date
used here is | |
| * not a true Julian date, since it is measured from midnight, not noon
. Return | | * not a true Julian date, since it is measured from midnight, not noon
. Return | |
| * value is one-based. | | * value is one-based. | |
| * | | * | |
| * @param julian The given Julian date number. | | * @param julian The given Julian date number. | |
| * @return Day number from 1..7 (SUN..SAT). | | * @return Day number from 1..7 (SUN..SAT). | |
| * @internal | | * @internal | |
| */ | | */ | |
| static uint8_t julianDayToDayOfWeek(double julian); | | static uint8_t julianDayToDayOfWeek(double julian); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| private: | | private: | |
| char validLocale[ULOC_FULLNAME_CAPACITY]; | | char validLocale[ULOC_FULLNAME_CAPACITY]; | |
| char actualLocale[ULOC_FULLNAME_CAPACITY]; | | char actualLocale[ULOC_FULLNAME_CAPACITY]; | |
| | | | |
| public: | | public: | |
| #if !UCONFIG_NO_SERVICE | | #if !UCONFIG_NO_SERVICE | |
| /** | | /** | |
| * INTERNAL FOR 2.6 -- Registration. | | * INTERNAL FOR 2.6 -- Registration. | |
| */ | | */ | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Return a StringEnumeration over the locales available at the time of
the call, | | * Return a StringEnumeration over the locales available at the time of
the call, | |
| * including registered locales. | | * including registered locales. | |
| * @return a StringEnumeration over the locales available at the time o
f the call | | * @return a StringEnumeration over the locales available at the time o
f the call | |
| * @internal | | * @internal | |
| */ | | */ | |
| static StringEnumeration* getAvailableLocales(void); | | static StringEnumeration* getAvailableLocales(void); | |
| | | | |
| /** | | /** | |
| * Register a new Calendar factory. The factory will be adopted. | | * Register a new Calendar factory. The factory will be adopted. | |
| | | | |
| skipping to change at line 2144 | | skipping to change at line 2282 | |
| * Unregister a previously-registered CalendarFactory using the key ret
urned from the | | * Unregister a previously-registered CalendarFactory using the key ret
urned from the | |
| * register call. Key becomes invalid after a successful call and shou
ld not be used again. | | * register call. Key becomes invalid after a successful call and shou
ld not be used again. | |
| * The CalendarFactory corresponding to the key will be deleted. | | * The CalendarFactory corresponding to the key will be deleted. | |
| * INTERNAL in 2.6 | | * INTERNAL in 2.6 | |
| * @param key the registry key returned by a previous call to registerF
actory | | * @param key the registry key returned by a previous call to registerF
actory | |
| * @param status the in/out status code, no special meanings are assign
ed | | * @param status the in/out status code, no special meanings are assign
ed | |
| * @return TRUE if the factory for the key was successfully unregistere
d | | * @return TRUE if the factory for the key was successfully unregistere
d | |
| * @internal | | * @internal | |
| */ | | */ | |
| static UBool unregister(URegistryKey key, UErrorCode& status); | | static UBool unregister(URegistryKey key, UErrorCode& status); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * Multiple Calendar Implementation | | * Multiple Calendar Implementation | |
| * @internal | | * @internal | |
| */ | | */ | |
| friend class CalendarFactory; | | friend class CalendarFactory; | |
| | | | |
| /** | | /** | |
| * Multiple Calendar Implementation | | * Multiple Calendar Implementation | |
| * @internal | | * @internal | |
| | | | |
| skipping to change at line 2189 | | skipping to change at line 2328 | |
| virtual int32_t defaultCenturyStartYear() const = 0; | | virtual int32_t defaultCenturyStartYear() const = 0; | |
| | | | |
| /** Get the locale for this calendar object. You can choose between val
id and actual locale. | | /** Get the locale for this calendar object. You can choose between val
id and actual locale. | |
| * @param type type of the locale we're looking for (valid or actual) | | * @param type type of the locale we're looking for (valid or actual) | |
| * @param status error code for the operation | | * @param status error code for the operation | |
| * @return the locale | | * @return the locale | |
| * @stable ICU 2.8 | | * @stable ICU 2.8 | |
| */ | | */ | |
| Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const; | | Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const; | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** Get the locale for this calendar object. You can choose between val
id and actual locale. | | /** Get the locale for this calendar object. You can choose between val
id and actual locale. | |
| * @param type type of the locale we're looking for (valid or actual) | | * @param type type of the locale we're looking for (valid or actual) | |
| * @param status error code for the operation | | * @param status error code for the operation | |
| * @return the locale | | * @return the locale | |
| * @internal | | * @internal | |
| */ | | */ | |
| const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co
nst; | | const char* getLocaleID(ULocDataLocaleType type, UErrorCode &status) co
nst; | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
|
| | | private: | |
| | | /** | |
| | | * Cast TimeZone used by this object to BasicTimeZone, or NULL if the T | |
| | | imeZone | |
| | | * is not an instance of BasicTimeZone. | |
| | | */ | |
| | | BasicTimeZone* getBasicTimeZone() const; | |
| }; | | }; | |
| | | | |
| // ------------------------------------- | | // ------------------------------------- | |
| | | | |
| inline Calendar* | | inline Calendar* | |
| Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode) | | Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode) | |
| { | | { | |
| // since the Locale isn't specified, use the default locale | | // since the Locale isn't specified, use the default locale | |
| return createInstance(zone, Locale::getDefault(), errorCode); | | return createInstance(zone, Locale::getDefault(), errorCode); | |
| } | | } | |
| | | | |
| // ------------------------------------- | | // ------------------------------------- | |
| | | | |
| inline void | | inline void | |
| Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) | | Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) | |
| { | | { | |
| roll(field, (int32_t)(up ? +1 : -1), status); | | roll(field, (int32_t)(up ? +1 : -1), status); | |
| } | | } | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| inline void | | inline void | |
| Calendar::roll(EDateFields field, UBool up, UErrorCode& status) | | Calendar::roll(EDateFields field, UBool up, UErrorCode& status) | |
| { | | { | |
| roll((UCalendarDateFields) field, up, status); | | roll((UCalendarDateFields) field, up, status); | |
| } | | } | |
|
| | | #endif | |
| | | | |
| // ------------------------------------- | | // ------------------------------------- | |
| | | | |
| /** | | /** | |
| * Fast method for subclasses. The caller must maintain fUserSetDSTOffset
and | | * Fast method for subclasses. The caller must maintain fUserSetDSTOffset
and | |
| * fUserSetZoneOffset, as well as the isSet[] array. | | * fUserSetZoneOffset, as well as the isSet[] array. | |
| */ | | */ | |
| | | | |
| inline void | | inline void | |
| Calendar::internalSet(UCalendarDateFields field, int32_t value) | | Calendar::internalSet(UCalendarDateFields field, int32_t value) | |
| { | | { | |
| fFields[field] = value; | | fFields[field] = value; | |
| fStamp[field] = kInternallySet; | | fStamp[field] = kInternallySet; | |
| fIsSet[field] = TRUE; // Remove later | | fIsSet[field] = TRUE; // Remove later | |
| } | | } | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek
) | | inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek
) | |
| { | | { | |
| return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek); | | return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek); | |
| } | | } | |
|
| | | #endif | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| #endif /* #if !UCONFIG_NO_FORMATTING */ | | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
| | | | |
| #endif // _CALENDAR | | #endif // _CALENDAR | |
| | | | |
End of changes. 56 change blocks. |
| 13 lines changed or deleted | | 184 lines changed or added | |
|
| choicfmt.h | | choicfmt.h | |
| | | | |
| skipping to change at line 33 | | skipping to change at line 33 | |
| #define CHOICFMT_H | | #define CHOICFMT_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C++ API: Choice Format. | | * \brief C++ API: Choice Format. | |
| */ | | */ | |
| | | | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| | | | |
| #include "unicode/fieldpos.h" | | #include "unicode/fieldpos.h" | |
| #include "unicode/format.h" | | #include "unicode/format.h" | |
| #include "unicode/messagepattern.h" | | #include "unicode/messagepattern.h" | |
| #include "unicode/numfmt.h" | | #include "unicode/numfmt.h" | |
| #include "unicode/unistr.h" | | #include "unicode/unistr.h" | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class MessageFormat; | | class MessageFormat; | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 168 | |
| * << buf << endl; | | * << buf << endl; | |
| * } | | * } | |
| * cout << endl; | | * cout << endl; | |
| * return 0; | | * return 0; | |
| * } | | * } | |
| * \endcode | | * \endcode | |
| * | | * | |
| * <p><em>User subclasses are not supported.</em> While clients may write | | * <p><em>User subclasses are not supported.</em> While clients may write | |
| * subclasses, such code will not necessarily work and will not be | | * subclasses, such code will not necessarily work and will not be | |
| * guaranteed to work stably from release to release. | | * guaranteed to work stably from release to release. | |
|
| | | * | |
| | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select arg | |
| | | uments. | |
| */ | | */ | |
| class U_I18N_API ChoiceFormat: public NumberFormat { | | class U_I18N_API ChoiceFormat: public NumberFormat { | |
| public: | | public: | |
| /** | | /** | |
| * Constructs a new ChoiceFormat from the pattern string. | | * Constructs a new ChoiceFormat from the pattern string. | |
| * | | * | |
| * @param pattern Pattern used to construct object. | | * @param pattern Pattern used to construct object. | |
| * @param status Output param to receive success code. If the | | * @param status Output param to receive success code. If the | |
| * pattern cannot be parsed, set to failure code. | | * pattern cannot be parsed, set to failure code. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| ChoiceFormat(const UnicodeString& pattern, | | ChoiceFormat(const UnicodeString& pattern, | |
| UErrorCode& status); | | UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Constructs a new ChoiceFormat with the given limits and message stri
ngs. | | * Constructs a new ChoiceFormat with the given limits and message stri
ngs. | |
| * All closure flags default to <code>FALSE</code>, | | * All closure flags default to <code>FALSE</code>, | |
| * equivalent to <code>less_than_or_equal</code> separators. | | * equivalent to <code>less_than_or_equal</code> separators. | |
| * | | * | |
| * Copies the limits and formats instead of adopting them. | | * Copies the limits and formats instead of adopting them. | |
| * | | * | |
| * @param limits Array of limit values. | | * @param limits Array of limit values. | |
| * @param formats Array of formats. | | * @param formats Array of formats. | |
| * @param count Size of 'limits' and 'formats' arrays. | | * @param count Size of 'limits' and 'formats' arrays. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| ChoiceFormat(const double* limits, | | ChoiceFormat(const double* limits, | |
| const UnicodeString* formats, | | const UnicodeString* formats, | |
| int32_t count ); | | int32_t count ); | |
| | | | |
| /** | | /** | |
| * Constructs a new ChoiceFormat with the given limits, closure flags a
nd message strings. | | * Constructs a new ChoiceFormat with the given limits, closure flags a
nd message strings. | |
| * | | * | |
| * Copies the limits and formats instead of adopting them. | | * Copies the limits and formats instead of adopting them. | |
| * | | * | |
| * @param limits Array of limit values | | * @param limits Array of limit values | |
| * @param closures Array of booleans specifying whether each | | * @param closures Array of booleans specifying whether each | |
| * element of 'limits' is open or closed. If FALSE, then the | | * element of 'limits' is open or closed. If FALSE, then the | |
| * corresponding limit number is a member of its range. | | * corresponding limit number is a member of its range. | |
| * If TRUE, then the limit number belongs to the previous range it. | | * If TRUE, then the limit number belongs to the previous range it. | |
| * @param formats Array of formats | | * @param formats Array of formats | |
| * @param count Size of 'limits', 'closures', and 'formats' arrays | | * @param count Size of 'limits', 'closures', and 'formats' arrays | |
|
| * @stable ICU 2.4 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| ChoiceFormat(const double* limits, | | ChoiceFormat(const double* limits, | |
| const UBool* closures, | | const UBool* closures, | |
| const UnicodeString* formats, | | const UnicodeString* formats, | |
| int32_t count); | | int32_t count); | |
| | | | |
| /** | | /** | |
| * Copy constructor. | | * Copy constructor. | |
| * | | * | |
| * @param that ChoiceFormat object to be copied from | | * @param that ChoiceFormat object to be copied from | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| ChoiceFormat(const ChoiceFormat& that); | | ChoiceFormat(const ChoiceFormat& that); | |
| | | | |
| /** | | /** | |
| * Assignment operator. | | * Assignment operator. | |
| * | | * | |
| * @param that ChoiceFormat object to be copied | | * @param that ChoiceFormat object to be copied | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| const ChoiceFormat& operator=(const ChoiceFormat& that); | | const ChoiceFormat& operator=(const ChoiceFormat& that); | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual ~ChoiceFormat(); | | virtual ~ChoiceFormat(); | |
| | | | |
| /** | | /** | |
| * Clones this Format object. The caller owns the | | * Clones this Format object. The caller owns the | |
| * result and must delete it when done. | | * result and must delete it when done. | |
| * | | * | |
| * @return a copy of this object | | * @return a copy of this object | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual Format* clone(void) const; | | virtual Format* clone(void) const; | |
| | | | |
| /** | | /** | |
| * Returns true if the given Format objects are semantically equal. | | * Returns true if the given Format objects are semantically equal. | |
| * Objects of different subclasses are considered unequal. | | * Objects of different subclasses are considered unequal. | |
| * | | * | |
| * @param other ChoiceFormat object to be compared | | * @param other ChoiceFormat object to be compared | |
| * @return true if other is the same as this. | | * @return true if other is the same as this. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UBool operator==(const Format& other) const; | | virtual UBool operator==(const Format& other) const; | |
| | | | |
| /** | | /** | |
| * Sets the pattern. | | * Sets the pattern. | |
| * @param pattern The pattern to be applied. | | * @param pattern The pattern to be applied. | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. If the pattern is invalid, this will be | | * exit. If the pattern is invalid, this will be | |
| * set to a failure result. | | * set to a failure result. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void applyPattern(const UnicodeString& pattern, | | virtual void applyPattern(const UnicodeString& pattern, | |
| UErrorCode& status); | | UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Sets the pattern. | | * Sets the pattern. | |
| * @param pattern The pattern to be applied. | | * @param pattern The pattern to be applied. | |
| * @param parseError Struct to receive information on position | | * @param parseError Struct to receive information on position | |
| * of error if an error is encountered | | * of error if an error is encountered | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. If the pattern is invalid, this will be | | * exit. If the pattern is invalid, this will be | |
| * set to a failure result. | | * set to a failure result. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void applyPattern(const UnicodeString& pattern, | | virtual void applyPattern(const UnicodeString& pattern, | |
| UParseError& parseError, | | UParseError& parseError, | |
| UErrorCode& status); | | UErrorCode& status); | |
| /** | | /** | |
| * Gets the pattern. | | * Gets the pattern. | |
| * | | * | |
| * @param pattern Output param which will receive the pattern | | * @param pattern Output param which will receive the pattern | |
| * Previous contents are deleted. | | * Previous contents are deleted. | |
| * @return A reference to 'pattern' | | * @return A reference to 'pattern' | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& toPattern(UnicodeString &pattern) const; | | virtual UnicodeString& toPattern(UnicodeString &pattern) const; | |
| | | | |
| /** | | /** | |
| * Sets the choices to be used in formatting. | | * Sets the choices to be used in formatting. | |
| * For details see the constructor with the same parameter list. | | * For details see the constructor with the same parameter list. | |
| * | | * | |
| * @param limitsToCopy Contains the top value that you want | | * @param limitsToCopy Contains the top value that you want | |
| * parsed with that format,and should be in | | * parsed with that format,and should be in | |
| * ascending sorted order. When formatting X, | | * ascending sorted order. When formatting X, | |
| * the choice will be the i, where limit[i] | | * the choice will be the i, where limit[i] | |
| * <= X < limit[i+1]. | | * <= X < limit[i+1]. | |
| * @param formatsToCopy The format strings you want to use for each
limit. | | * @param formatsToCopy The format strings you want to use for each
limit. | |
| * @param count The size of the above arrays. | | * @param count The size of the above arrays. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void setChoices(const double* limitsToCopy, | | virtual void setChoices(const double* limitsToCopy, | |
| const UnicodeString* formatsToCopy, | | const UnicodeString* formatsToCopy, | |
| int32_t count ); | | int32_t count ); | |
| | | | |
| /** | | /** | |
| * Sets the choices to be used in formatting. | | * Sets the choices to be used in formatting. | |
| * For details see the constructor with the same parameter list. | | * For details see the constructor with the same parameter list. | |
| * | | * | |
| * @param limits Array of limits | | * @param limits Array of limits | |
| * @param closures Array of limit booleans | | * @param closures Array of limit booleans | |
| * @param formats Array of format string | | * @param formats Array of format string | |
| * @param count The size of the above arrays | | * @param count The size of the above arrays | |
|
| * @stable ICU 2.4 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void setChoices(const double* limits, | | virtual void setChoices(const double* limits, | |
| const UBool* closures, | | const UBool* closures, | |
| const UnicodeString* formats, | | const UnicodeString* formats, | |
| int32_t count); | | int32_t count); | |
| | | | |
| /** | | /** | |
| * Returns NULL and 0. | | * Returns NULL and 0. | |
| * Before ICU 4.8, this used to return the choice limits array. | | * Before ICU 4.8, this used to return the choice limits array. | |
| * | | * | |
| | | | |
| skipping to change at line 364 | | skipping to change at line 367 | |
| | | | |
| /** | | /** | |
| * Formats a double number using this object's choices. | | * Formats a double number using this object's choices. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& format(double number, | | virtual UnicodeString& format(double number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| /** | | /** | |
| * Formats an int32_t number using this object's choices. | | * Formats an int32_t number using this object's choices. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& format(int32_t number, | | virtual UnicodeString& format(int32_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Formats an int64_t number using this object's choices. | | * Formats an int64_t number using this object's choices. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.8 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& format(int64_t number, | | virtual UnicodeString& format(int64_t number, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Formats an array of objects using this object's choices. | | * Formats an array of objects using this object's choices. | |
| * | | * | |
| * @param objs The array of objects to be formatted. | | * @param objs The array of objects to be formatted. | |
| * @param cnt The size of objs. | | * @param cnt The size of objs. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @param success Output param set to success/failure code on | | * @param success Output param set to success/failure code on | |
| * exit. | | * exit. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& format(const Formattable* objs, | | virtual UnicodeString& format(const Formattable* objs, | |
| int32_t cnt, | | int32_t cnt, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos, | | FieldPosition& pos, | |
| UErrorCode& success) const; | | UErrorCode& success) const; | |
| /** | | /** | |
| * Formats an object using this object's choices. | | * Formats an object using this object's choices. | |
| * | | * | |
| * | | * | |
| * @param obj The object to be formatted. | | * @param obj The object to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos On input: an alignment field, if desired. | | * @param pos On input: an alignment field, if desired. | |
| * On output: the offsets of the alignment field. | | * On output: the offsets of the alignment field. | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. | | * exit. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UnicodeString& format(const Formattable& obj, | | virtual UnicodeString& format(const Formattable& obj, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos, | | FieldPosition& pos, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Redeclared NumberFormat method. | | * Redeclared NumberFormat method. | |
| * | | * | |
| * @param obj The object to be formatted. | | * @param obj The object to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. | | * exit. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| UnicodeString& format(const Formattable& obj, | | UnicodeString& format(const Formattable& obj, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Redeclared NumberFormat method. | | * Redeclared NumberFormat method. | |
| * Formats a double number. These methods call the NumberFormat | | * Formats a double number. These methods call the NumberFormat | |
| * pure virtual format() methods with the default FieldPosition. | | * pure virtual format() methods with the default FieldPosition. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| UnicodeString& format( double number, | | UnicodeString& format( double number, | |
| UnicodeString& appendTo) const; | | UnicodeString& appendTo) const; | |
| | | | |
| /** | | /** | |
| * Redeclared NumberFormat method. | | * Redeclared NumberFormat method. | |
| * Formats an int32_t number. These methods call the NumberFormat | | * Formats an int32_t number. These methods call the NumberFormat | |
| * pure virtual format() methods with the default FieldPosition. | | * pure virtual format() methods with the default FieldPosition. | |
| * | | * | |
| * @param number The value to be formatted. | | * @param number The value to be formatted. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| UnicodeString& format( int32_t number, | | UnicodeString& format( int32_t number, | |
| UnicodeString& appendTo) const; | | UnicodeString& appendTo) const; | |
| | | | |
| /** | | /** | |
| * Looks for the longest match of any message string on the input text a
nd, | | * Looks for the longest match of any message string on the input text a
nd, | |
| * if there is a match, sets the result object to the corresponding rang
e's number. | | * if there is a match, sets the result object to the corresponding rang
e's number. | |
| * | | * | |
| * If no string matches, then the parsePosition is unchanged. | | * If no string matches, then the parsePosition is unchanged. | |
| * | | * | |
| * @param text The text to be parsed. | | * @param text The text to be parsed. | |
| * @param result Formattable to be set to the parse result. | | * @param result Formattable to be set to the parse result. | |
| * If parse fails, return contents are undefined. | | * If parse fails, return contents are undefined. | |
| * @param parsePosition The position to start parsing at on input. | | * @param parsePosition The position to start parsing at on input. | |
| * On output, moved to after the last successfully | | * On output, moved to after the last successfully | |
| * parse character. On parse failure, does not cha
nge. | | * parse character. On parse failure, does not cha
nge. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void parse(const UnicodeString& text, | | virtual void parse(const UnicodeString& text, | |
| Formattable& result, | | Formattable& result, | |
| ParsePosition& parsePosition) const; | | ParsePosition& parsePosition) const; | |
| | | | |
| /** | | /** | |
| * Looks for the longest match of any message string on the input text
and, | | * Looks for the longest match of any message string on the input text
and, | |
| * if there is a match, sets the result object to the corresponding ran
ge's number. | | * if there is a match, sets the result object to the corresponding ran
ge's number. | |
| * | | * | |
| * If no string matches, then the UErrorCode is set to U_INVALID_FORMAT
_ERROR. | | * If no string matches, then the UErrorCode is set to U_INVALID_FORMAT
_ERROR. | |
| * | | * | |
| * @param text The text to be parsed. | | * @param text The text to be parsed. | |
| * @param result Formattable to be set to the parse result. | | * @param result Formattable to be set to the parse result. | |
| * If parse fails, return contents are undefined. | | * If parse fails, return contents are undefined. | |
| * @param status Output param with the formatted string. | | * @param status Output param with the formatted string. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual void parse(const UnicodeString& text, | | virtual void parse(const UnicodeString& text, | |
| Formattable& result, | | Formattable& result, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's
RTTI". | | * Returns a unique class ID POLYMORPHICALLY. Part of ICU's "poor man's
RTTI". | |
| * | | * | |
| * @return The class ID for this object. All objects of a | | * @return The class ID for this object. All objects of a | |
| * given class have the same class ID. Objects of | | * given class have the same class ID. Objects of | |
| * other classes have different class IDs. | | * other classes have different class IDs. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| virtual UClassID getDynamicClassID(void) const; | | virtual UClassID getDynamicClassID(void) const; | |
| | | | |
| /** | | /** | |
| * Returns the class ID for this class. This is useful only for | | * Returns the class ID for this class. This is useful only for | |
| * comparing to a return value from getDynamicClassID(). For example: | | * comparing to a return value from getDynamicClassID(). For example: | |
| * <pre> | | * <pre> | |
| * . Base* polymorphic_pointer = createPolymorphicObject(); | | * . Base* polymorphic_pointer = createPolymorphicObject(); | |
| * . if (polymorphic_pointer->getDynamicClassID() == | | * . if (polymorphic_pointer->getDynamicClassID() == | |
| * . Derived::getStaticClassID()) ... | | * . Derived::getStaticClassID()) ... | |
| * </pre> | | * </pre> | |
| * @return The class ID for all objects of this class. | | * @return The class ID for all objects of this class. | |
|
| * @stable ICU 2.0 | | * @deprecated ICU 49 Use MessageFormat instead, with plural and select
arguments. | |
| */ | | */ | |
| static UClassID U_EXPORT2 getStaticClassID(void); | | static UClassID U_EXPORT2 getStaticClassID(void); | |
| | | | |
| private: | | private: | |
| /** | | /** | |
| * Converts a double value to a string. | | * Converts a double value to a string. | |
| * @param value the double number to be converted. | | * @param value the double number to be converted. | |
| * @param string the result string. | | * @param string the result string. | |
| * @return the converted string. | | * @return the converted string. | |
| */ | | */ | |
| | | | |
| skipping to change at line 557 | | skipping to change at line 560 | |
| | | | |
| /** | | /** | |
| * Construct a new ChoiceFormat with the limits and the corresponding f
ormats | | * Construct a new ChoiceFormat with the limits and the corresponding f
ormats | |
| * based on the pattern. | | * based on the pattern. | |
| * | | * | |
| * @param newPattern Pattern used to construct object. | | * @param newPattern Pattern used to construct object. | |
| * @param parseError Struct to receive information on position | | * @param parseError Struct to receive information on position | |
| * of error if an error is encountered. | | * of error if an error is encountered. | |
| * @param status Output param to receive success code. If the | | * @param status Output param to receive success code. If the | |
| * pattern cannot be parsed, set to failure code. | | * pattern cannot be parsed, set to failure code. | |
|
| * @stable ICU 2.0 | | | |
| */ | | */ | |
| ChoiceFormat(const UnicodeString& newPattern, | | ChoiceFormat(const UnicodeString& newPattern, | |
| UParseError& parseError, | | UParseError& parseError, | |
| UErrorCode& status); | | UErrorCode& status); | |
| | | | |
| friend class MessageFormat; | | friend class MessageFormat; | |
| | | | |
| virtual void setChoices(const double* limits, | | virtual void setChoices(const double* limits, | |
| const UBool* closures, | | const UBool* closures, | |
| const UnicodeString* formats, | | const UnicodeString* formats, | |
| | | | |
| skipping to change at line 680 | | skipping to change at line 682 | |
| return NumberFormat::format(number, appendTo); | | return NumberFormat::format(number, appendTo); | |
| } | | } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| ChoiceFormat::format(int32_t number, | | ChoiceFormat::format(int32_t number, | |
| UnicodeString& appendTo) const { | | UnicodeString& appendTo) const { | |
| return NumberFormat::format(number, appendTo); | | return NumberFormat::format(number, appendTo); | |
| } | | } | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
|
| | | #endif // U_HIDE_DEPRECATED_API | |
| #endif /* #if !UCONFIG_NO_FORMATTING */ | | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
| | | | |
|
| #endif // _CHOICFMT | | #endif // CHOICFMT_H | |
| //eof | | //eof | |
| | | | |
End of changes. 30 change blocks. |
| 27 lines changed or deleted | | 31 lines changed or added | |
|
| idna.h | | idna.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
|
| * Copyright (C) 2010, International Business Machines | | * Copyright (C) 2010-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * file name: idna.h | | * file name: idna.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2010mar05 | | * created on: 2010mar05 | |
| * created by: Markus W. Scherer | | * created by: Markus W. Scherer | |
| */ | | */ | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| /** | | /** | |
| * Abstract base class for IDNA processing. | | * Abstract base class for IDNA processing. | |
| * See http://www.unicode.org/reports/tr46/ | | * See http://www.unicode.org/reports/tr46/ | |
| * and http://www.ietf.org/rfc/rfc3490.txt | | * and http://www.ietf.org/rfc/rfc3490.txt | |
| * | | * | |
| * The IDNA class is not intended for public subclassing. | | * The IDNA class is not intended for public subclassing. | |
| * | | * | |
| * This C++ API currently only implements UTS #46. | | * This C++ API currently only implements UTS #46. | |
| * The uidna.h C API implements both UTS #46 (functions using UIDNA service
object) | | * The uidna.h C API implements both UTS #46 (functions using UIDNA service
object) | |
| * and IDNA2003 (functions that do not use a service object). | | * and IDNA2003 (functions that do not use a service object). | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| class U_COMMON_API IDNA : public UObject { | | class U_COMMON_API IDNA : public UObject { | |
| public: | | public: | |
| /** | | /** | |
|
| | | * Destructor. | |
| | | * @stable ICU 4.6 | |
| | | */ | |
| | | ~IDNA(); | |
| | | | |
| | | /** | |
| * Returns an IDNA instance which implements UTS #46. | | * Returns an IDNA instance which implements UTS #46. | |
| * Returns an unmodifiable instance, owned by the caller. | | * Returns an unmodifiable instance, owned by the caller. | |
| * Cache it for multiple operations, and delete it when done. | | * Cache it for multiple operations, and delete it when done. | |
| * The instance is thread-safe, that is, it can be used concurrently. | | * The instance is thread-safe, that is, it can be used concurrently. | |
| * | | * | |
| * UTS #46 defines Unicode IDNA Compatibility Processing, | | * UTS #46 defines Unicode IDNA Compatibility Processing, | |
| * updated to the latest version of Unicode and compatible with both | | * updated to the latest version of Unicode and compatible with both | |
| * IDNA2003 and IDNA2008. | | * IDNA2003 and IDNA2008. | |
| * | | * | |
| * The worker functions use transitional processing, including deviatio
n mappings, | | * The worker functions use transitional processing, including deviatio
n mappings, | |
| | | | |
| skipping to change at line 81 | | skipping to change at line 87 | |
| * When the UIDNA_USE_STD3_RULES option is used, ASCII characters other
than | | * When the UIDNA_USE_STD3_RULES option is used, ASCII characters other
than | |
| * letters, digits, hyphen (LDH) and dot/full stop are disallowed and m
apped to U+FFFD. | | * letters, digits, hyphen (LDH) and dot/full stop are disallowed and m
apped to U+FFFD. | |
| * | | * | |
| * @param options Bit set to modify the processing and error checking. | | * @param options Bit set to modify the processing and error checking. | |
| * See option bit set values in uidna.h. | | * See option bit set values in uidna.h. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the UTS #46 IDNA instance, if successful | | * @return the UTS #46 IDNA instance, if successful | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| static IDNA * | | static IDNA * | |
| createUTS46Instance(uint32_t options, UErrorCode &errorCode); | | createUTS46Instance(uint32_t options, UErrorCode &errorCode); | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its ASCII form for DNS look
up. | | * Converts a single domain name label into its ASCII form for DNS look
up. | |
| * If any processing step fails, then info.hasErrors() will be TRUE and | | * If any processing step fails, then info.hasErrors() will be TRUE and | |
| * the result might not be an ASCII string. | | * the result might not be an ASCII string. | |
| * The label might be modified according to the types of errors. | | * The label might be modified according to the types of errors. | |
| * Labels with severe errors will be left in (or turned into) their Uni
code form. | | * Labels with severe errors will be left in (or turned into) their Uni
code form. | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 110 | |
| * such as a U_MEMORY_ALLOCATION_ERROR. | | * such as a U_MEMORY_ALLOCATION_ERROR. | |
| * | | * | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param dest Destination string object | | * @param dest Destination string object | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UnicodeString & | | virtual UnicodeString & | |
| labelToASCII(const UnicodeString &label, UnicodeString &dest, | | labelToASCII(const UnicodeString &label, UnicodeString &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const = 0; | | IDNAInfo &info, UErrorCode &errorCode) const = 0; | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-
readable display. | | * Converts a single domain name label into its Unicode form for human-
readable display. | |
| * If any processing step fails, then info.hasErrors() will be TRUE. | | * If any processing step fails, then info.hasErrors() will be TRUE. | |
| * The label might be modified according to the types of errors. | | * The label might be modified according to the types of errors. | |
| * | | * | |
| | | | |
| skipping to change at line 126 | | skipping to change at line 132 | |
| * such as a U_MEMORY_ALLOCATION_ERROR. | | * such as a U_MEMORY_ALLOCATION_ERROR. | |
| * | | * | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param dest Destination string object | | * @param dest Destination string object | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UnicodeString & | | virtual UnicodeString & | |
| labelToUnicode(const UnicodeString &label, UnicodeString &dest, | | labelToUnicode(const UnicodeString &label, UnicodeString &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const = 0; | | IDNAInfo &info, UErrorCode &errorCode) const = 0; | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * If any processing step fails, then info.hasErrors() will be TRUE and | | * If any processing step fails, then info.hasErrors() will be TRUE and | |
| * the result might not be an ASCII string. | | * the result might not be an ASCII string. | |
| * The domain name might be modified according to the types of errors. | | * The domain name might be modified according to the types of errors. | |
| | | | |
| skipping to change at line 150 | | skipping to change at line 156 | |
| * such as a U_MEMORY_ALLOCATION_ERROR. | | * such as a U_MEMORY_ALLOCATION_ERROR. | |
| * | | * | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param dest Destination string object | | * @param dest Destination string object | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UnicodeString & | | virtual UnicodeString & | |
| nameToASCII(const UnicodeString &name, UnicodeString &dest, | | nameToASCII(const UnicodeString &name, UnicodeString &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const = 0; | | IDNAInfo &info, UErrorCode &errorCode) const = 0; | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readabl
e display. | | * Converts a whole domain name into its Unicode form for human-readabl
e display. | |
| * If any processing step fails, then info.hasErrors() will be TRUE. | | * If any processing step fails, then info.hasErrors() will be TRUE. | |
| * The domain name might be modified according to the types of errors. | | * The domain name might be modified according to the types of errors. | |
| * | | * | |
| | | | |
| skipping to change at line 172 | | skipping to change at line 178 | |
| * such as a U_MEMORY_ALLOCATION_ERROR. | | * such as a U_MEMORY_ALLOCATION_ERROR. | |
| * | | * | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param dest Destination string object | | * @param dest Destination string object | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UnicodeString & | | virtual UnicodeString & | |
| nameToUnicode(const UnicodeString &name, UnicodeString &dest, | | nameToUnicode(const UnicodeString &name, UnicodeString &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const = 0; | | IDNAInfo &info, UErrorCode &errorCode) const = 0; | |
| | | | |
| // UTF-8 versions of the processing methods ---------------------------
- *** | | // UTF-8 versions of the processing methods ---------------------------
- *** | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its ASCII form for DNS look
up. | | * Converts a single domain name label into its ASCII form for DNS look
up. | |
| * UTF-8 version of labelToASCII(), same behavior. | | * UTF-8 version of labelToASCII(), same behavior. | |
| * | | * | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param dest Destination byte sink; Flush()ed if successful | | * @param dest Destination byte sink; Flush()ed if successful | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void | | virtual void | |
| labelToASCII_UTF8(const StringPiece &label, ByteSink &dest, | | labelToASCII_UTF8(const StringPiece &label, ByteSink &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const; | | IDNAInfo &info, UErrorCode &errorCode) const; | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-
readable display. | | * Converts a single domain name label into its Unicode form for human-
readable display. | |
| * UTF-8 version of labelToUnicode(), same behavior. | | * UTF-8 version of labelToUnicode(), same behavior. | |
| * | | * | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param dest Destination byte sink; Flush()ed if successful | | * @param dest Destination byte sink; Flush()ed if successful | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void | | virtual void | |
| labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest, | | labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const; | | IDNAInfo &info, UErrorCode &errorCode) const; | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * UTF-8 version of nameToASCII(), same behavior. | | * UTF-8 version of nameToASCII(), same behavior. | |
| * | | * | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param dest Destination byte sink; Flush()ed if successful | | * @param dest Destination byte sink; Flush()ed if successful | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void | | virtual void | |
| nameToASCII_UTF8(const StringPiece &name, ByteSink &dest, | | nameToASCII_UTF8(const StringPiece &name, ByteSink &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const; | | IDNAInfo &info, UErrorCode &errorCode) const; | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readabl
e display. | | * Converts a whole domain name into its Unicode form for human-readabl
e display. | |
| * UTF-8 version of nameToUnicode(), same behavior. | | * UTF-8 version of nameToUnicode(), same behavior. | |
| * | | * | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param dest Destination byte sink; Flush()ed if successful | | * @param dest Destination byte sink; Flush()ed if successful | |
| * @param info Output container of IDNA processing details. | | * @param info Output container of IDNA processing details. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return dest | | * @return dest | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void | | virtual void | |
| nameToUnicodeUTF8(const StringPiece &name, ByteSink &dest, | | nameToUnicodeUTF8(const StringPiece &name, ByteSink &dest, | |
| IDNAInfo &info, UErrorCode &errorCode) const; | | IDNAInfo &info, UErrorCode &errorCode) const; | |
| | | | |
| private: | | private: | |
| // No ICU "poor man's RTTI" for this class nor its subclasses. | | // No ICU "poor man's RTTI" for this class nor its subclasses. | |
| virtual UClassID getDynamicClassID() const; | | virtual UClassID getDynamicClassID() const; | |
| }; | | }; | |
| | | | |
| class UTS46; | | class UTS46; | |
| | | | |
| /** | | /** | |
| * Output container for IDNA processing errors. | | * Output container for IDNA processing errors. | |
| * The IDNAInfo class is not suitable for subclassing. | | * The IDNAInfo class is not suitable for subclassing. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| class U_COMMON_API IDNAInfo : public UMemory { | | class U_COMMON_API IDNAInfo : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Constructor for stack allocation. | | * Constructor for stack allocation. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALS
E), isOkBiDi(TRUE) {} | | IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALS
E), isOkBiDi(TRUE) {} | |
| /** | | /** | |
| * Were there IDNA processing errors? | | * Were there IDNA processing errors? | |
| * @return TRUE if there were processing errors | | * @return TRUE if there were processing errors | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UBool hasErrors() const { return errors!=0; } | | UBool hasErrors() const { return errors!=0; } | |
| /** | | /** | |
| * Returns a bit set indicating IDNA processing errors. | | * Returns a bit set indicating IDNA processing errors. | |
| * See UIDNA_ERROR_... constants in uidna.h. | | * See UIDNA_ERROR_... constants in uidna.h. | |
| * @return bit set of processing errors | | * @return bit set of processing errors | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| uint32_t getErrors() const { return errors; } | | uint32_t getErrors() const { return errors; } | |
| /** | | /** | |
| * Returns TRUE if transitional and nontransitional processing produce
different results. | | * Returns TRUE if transitional and nontransitional processing produce
different results. | |
| * This is the case when the input label or domain name contains | | * This is the case when the input label or domain name contains | |
| * one or more deviation characters outside a Punycode label (see UTS #
46). | | * one or more deviation characters outside a Punycode label (see UTS #
46). | |
| * <ul> | | * <ul> | |
| * <li>With nontransitional processing, such characters are | | * <li>With nontransitional processing, such characters are | |
| * copied to the destination string. | | * copied to the destination string. | |
| * <li>With transitional processing, such characters are | | * <li>With transitional processing, such characters are | |
| * mapped (sharp s/sigma) or removed (joiner/nonjoiner). | | * mapped (sharp s/sigma) or removed (joiner/nonjoiner). | |
| * </ul> | | * </ul> | |
| * @return TRUE if transitional and nontransitional processing produce
different results | | * @return TRUE if transitional and nontransitional processing produce
different results | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UBool isTransitionalDifferent() const { return isTransDiff; } | | UBool isTransitionalDifferent() const { return isTransDiff; } | |
| | | | |
| private: | | private: | |
| friend class UTS46; | | friend class UTS46; | |
| | | | |
| IDNAInfo(const IDNAInfo &other); // no copying | | IDNAInfo(const IDNAInfo &other); // no copying | |
| IDNAInfo &operator=(const IDNAInfo &other); // no copying | | IDNAInfo &operator=(const IDNAInfo &other); // no copying | |
| | | | |
| void reset() { | | void reset() { | |
| | | | |
End of changes. 17 change blocks. |
| 16 lines changed or deleted | | 22 lines changed or added | |
|
| messagepattern.h | | messagepattern.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
|
| * Copyright (C) 2011, International Business Machines | | * Copyright (C) 2011-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * file name: messagepattern.h | | * file name: messagepattern.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2011mar14 | | * created on: 2011mar14 | |
| * created by: Markus W. Scherer | | * created by: Markus W. Scherer | |
| */ | | */ | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| * <td>I said {'Wow!'}</td> | | * <td>I said {'Wow!'}</td> | |
| * <td>I said '{''Wow!''}'</td> | | * <td>I said '{''Wow!''}'</td> | |
| * <td>(same)</td> | | * <td>(same)</td> | |
| * </tr> | | * </tr> | |
| * <tr> | | * <tr> | |
| * <td>I don't know</td> | | * <td>I don't know</td> | |
| * <td>I don't know OR<br> I don''t know</td> | | * <td>I don't know OR<br> I don''t know</td> | |
| * <td>I don''t know</td> | | * <td>I don''t know</td> | |
| * </tr> | | * </tr> | |
| * </table> | | * </table> | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| * @see UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE | | * @see UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE | |
| */ | | */ | |
| enum UMessagePatternApostropheMode { | | enum UMessagePatternApostropheMode { | |
| /** | | /** | |
| * A literal apostrophe is represented by | | * A literal apostrophe is represented by | |
| * either a single or a double apostrophe pattern character. | | * either a single or a double apostrophe pattern character. | |
| * Within a MessageFormat pattern, a single apostrophe only starts quot
ed literal text | | * Within a MessageFormat pattern, a single apostrophe only starts quot
ed literal text | |
| * if it immediately precedes a curly brace {}, | | * if it immediately precedes a curly brace {}, | |
| * or a pipe symbol | if inside a choice format, | | * or a pipe symbol | if inside a choice format, | |
| * or a pound symbol # if inside a plural format. | | * or a pound symbol # if inside a plural format. | |
| * <p> | | * <p> | |
| * This is the default behavior starting with ICU 4.8. | | * This is the default behavior starting with ICU 4.8. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_APOS_DOUBLE_OPTIONAL, | | UMSGPAT_APOS_DOUBLE_OPTIONAL, | |
| /** | | /** | |
| * A literal apostrophe must be represented by | | * A literal apostrophe must be represented by | |
| * a double apostrophe pattern character. | | * a double apostrophe pattern character. | |
| * A single apostrophe always starts quoted literal text. | | * A single apostrophe always starts quoted literal text. | |
| * <p> | | * <p> | |
| * This is the behavior of ICU 4.6 and earlier, and of the JDK. | | * This is the behavior of ICU 4.6 and earlier, and of the JDK. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_APOS_DOUBLE_REQUIRED | | UMSGPAT_APOS_DOUBLE_REQUIRED | |
| }; | | }; | |
| /** | | /** | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode; | | typedef enum UMessagePatternApostropheMode UMessagePatternApostropheMode; | |
| | | | |
| /** | | /** | |
| * MessagePattern::Part type constants. | | * MessagePattern::Part type constants. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| enum UMessagePatternPartType { | | enum UMessagePatternPartType { | |
| /** | | /** | |
| * Start of a message pattern (main or nested). | | * Start of a message pattern (main or nested). | |
| * The length is 0 for the top-level message | | * The length is 0 for the top-level message | |
| * and for a choice argument sub-message, otherwise 1 for the '{'. | | * and for a choice argument sub-message, otherwise 1 for the '{'. | |
| * The value indicates the nesting level, starting with 0 for the main
message. | | * The value indicates the nesting level, starting with 0 for the main
message. | |
| * <p> | | * <p> | |
| * There is always a later MSG_LIMIT part. | | * There is always a later MSG_LIMIT part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_MSG_START, | | UMSGPAT_PART_TYPE_MSG_START, | |
| /** | | /** | |
| * End of a message pattern (main or nested). | | * End of a message pattern (main or nested). | |
| * The length is 0 for the top-level message and | | * The length is 0 for the top-level message and | |
| * the last sub-message of a choice argument, | | * the last sub-message of a choice argument, | |
| * otherwise 1 for the '}' or (in a choice argument style) the '|'. | | * otherwise 1 for the '}' or (in a choice argument style) the '|'. | |
| * The value indicates the nesting level, starting with 0 for the main
message. | | * The value indicates the nesting level, starting with 0 for the main
message. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_MSG_LIMIT, | | UMSGPAT_PART_TYPE_MSG_LIMIT, | |
| /** | | /** | |
| * Indicates a substring of the pattern string which is to be skipped w
hen formatting. | | * Indicates a substring of the pattern string which is to be skipped w
hen formatting. | |
| * For example, an apostrophe that begins or ends quoted text | | * For example, an apostrophe that begins or ends quoted text | |
| * would be indicated with such a part. | | * would be indicated with such a part. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_SKIP_SYNTAX, | | UMSGPAT_PART_TYPE_SKIP_SYNTAX, | |
| /** | | /** | |
| * Indicates that a syntax character needs to be inserted for auto-quot
ing. | | * Indicates that a syntax character needs to be inserted for auto-quot
ing. | |
| * The length is 0. | | * The length is 0. | |
| * The value is the character code of the insertion character. (U+0027=
APOSTROPHE) | | * The value is the character code of the insertion character. (U+0027=
APOSTROPHE) | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_INSERT_CHAR, | | UMSGPAT_PART_TYPE_INSERT_CHAR, | |
| /** | | /** | |
| * Indicates a syntactic (non-escaped) # symbol in a plural variant. | | * Indicates a syntactic (non-escaped) # symbol in a plural variant. | |
| * When formatting, replace this part's substring with the | | * When formatting, replace this part's substring with the | |
| * (value-offset) for the plural argument value. | | * (value-offset) for the plural argument value. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_REPLACE_NUMBER, | | UMSGPAT_PART_TYPE_REPLACE_NUMBER, | |
| /** | | /** | |
| * Start of an argument. | | * Start of an argument. | |
| * The length is 1 for the '{'. | | * The length is 1 for the '{'. | |
| * The value is the ordinal value of the ArgType. Use getArgType(). | | * The value is the ordinal value of the ArgType. Use getArgType(). | |
|
| * @draft ICU 4.8 | | * <p> | |
| | | * This part is followed by either an ARG_NUMBER or ARG_NAME, | |
| | | * followed by optional argument sub-parts (see UMessagePatternArgType | |
| | | constants) | |
| | | * and finally an ARG_LIMIT part. | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_START, | | UMSGPAT_PART_TYPE_ARG_START, | |
| /** | | /** | |
| * End of an argument. | | * End of an argument. | |
| * The length is 1 for the '}'. | | * The length is 1 for the '}'. | |
| * The value is the ordinal value of the ArgType. Use getArgType(). | | * The value is the ordinal value of the ArgType. Use getArgType(). | |
|
| * <p> | | * @stable ICU 4.8 | |
| * This part is followed by either an ARG_NUMBER or ARG_NAME, | | | |
| * followed by optional argument sub-parts (see UMessagePatternArgType | | | |
| constants) | | | |
| * and finally an ARG_LIMIT part. | | | |
| * @draft ICU 4.8 | | | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_LIMIT, | | UMSGPAT_PART_TYPE_ARG_LIMIT, | |
| /** | | /** | |
| * The argument number, provided by the value. | | * The argument number, provided by the value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_NUMBER, | | UMSGPAT_PART_TYPE_ARG_NUMBER, | |
| /** | | /** | |
| * The argument name. | | * The argument name. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_NAME, | | UMSGPAT_PART_TYPE_ARG_NAME, | |
| /** | | /** | |
| * The argument type. | | * The argument type. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_TYPE, | | UMSGPAT_PART_TYPE_ARG_TYPE, | |
| /** | | /** | |
| * The argument style text. | | * The argument style text. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_STYLE, | | UMSGPAT_PART_TYPE_ARG_STYLE, | |
| /** | | /** | |
| * A selector substring in a "complex" argument style. | | * A selector substring in a "complex" argument style. | |
| * The value is undefined and currently always 0. | | * The value is undefined and currently always 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_SELECTOR, | | UMSGPAT_PART_TYPE_ARG_SELECTOR, | |
| /** | | /** | |
| * An integer value, for example the offset or an explicit selector val
ue | | * An integer value, for example the offset or an explicit selector val
ue | |
| * in a PluralFormat style. | | * in a PluralFormat style. | |
| * The part value is the integer value. | | * The part value is the integer value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_INT, | | UMSGPAT_PART_TYPE_ARG_INT, | |
| /** | | /** | |
| * A numeric value, for example the offset or an explicit selector valu
e | | * A numeric value, for example the offset or an explicit selector valu
e | |
| * in a PluralFormat style. | | * in a PluralFormat style. | |
| * The part value is an index into an internal array of numeric values; | | * The part value is an index into an internal array of numeric values; | |
| * use getNumericValue(). | | * use getNumericValue(). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_PART_TYPE_ARG_DOUBLE | | UMSGPAT_PART_TYPE_ARG_DOUBLE | |
| }; | | }; | |
| /** | | /** | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| typedef enum UMessagePatternPartType UMessagePatternPartType; | | typedef enum UMessagePatternPartType UMessagePatternPartType; | |
| | | | |
| /** | | /** | |
| * Argument type constants. | | * Argument type constants. | |
| * Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts. | | * Returned by Part.getArgType() for ARG_START and ARG_LIMIT parts. | |
| * | | * | |
| * Messages nested inside an argument are each delimited by MSG_START and M
SG_LIMIT, | | * Messages nested inside an argument are each delimited by MSG_START and M
SG_LIMIT, | |
| * with a nesting level one greater than the surrounding message. | | * with a nesting level one greater than the surrounding message. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| enum UMessagePatternArgType { | | enum UMessagePatternArgType { | |
| /** | | /** | |
| * The argument has no specified type. | | * The argument has no specified type. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_TYPE_NONE, | | UMSGPAT_ARG_TYPE_NONE, | |
| /** | | /** | |
| * The argument has a "simple" type which is provided by the ARG_TYPE p
art. | | * The argument has a "simple" type which is provided by the ARG_TYPE p
art. | |
| * An ARG_STYLE part might follow that. | | * An ARG_STYLE part might follow that. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_TYPE_SIMPLE, | | UMSGPAT_ARG_TYPE_SIMPLE, | |
| /** | | /** | |
| * The argument is a ChoiceFormat with one or more | | * The argument is a ChoiceFormat with one or more | |
| * ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. | | * ((ARG_INT | ARG_DOUBLE), ARG_SELECTOR, message) tuples. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_TYPE_CHOICE, | | UMSGPAT_ARG_TYPE_CHOICE, | |
| /** | | /** | |
| * The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBL
E offset | | * The argument is a PluralFormat with an optional ARG_INT or ARG_DOUBL
E offset | |
| * (e.g., offset:1) | | * (e.g., offset:1) | |
| * and one or more (ARG_SELECTOR [explicit-value] message) tuples. | | * and one or more (ARG_SELECTOR [explicit-value] message) tuples. | |
| * If the selector has an explicit value (e.g., =2), then | | * If the selector has an explicit value (e.g., =2), then | |
| * that value is provided by the ARG_INT or ARG_DOUBLE part preceding t
he message. | | * that value is provided by the ARG_INT or ARG_DOUBLE part preceding t
he message. | |
| * Otherwise the message immediately follows the ARG_SELECTOR. | | * Otherwise the message immediately follows the ARG_SELECTOR. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_TYPE_PLURAL, | | UMSGPAT_ARG_TYPE_PLURAL, | |
| /** | | /** | |
| * The argument is a SelectFormat with one or more (ARG_SELECTOR, messa
ge) pairs. | | * The argument is a SelectFormat with one or more (ARG_SELECTOR, messa
ge) pairs. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_TYPE_SELECT | | UMSGPAT_ARG_TYPE_SELECT | |
| }; | | }; | |
| /** | | /** | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| typedef enum UMessagePatternArgType UMessagePatternArgType; | | typedef enum UMessagePatternArgType UMessagePatternArgType; | |
| | | | |
|
| /** | | | |
| * @draft ICU 4.8 | | | |
| */ | | | |
| enum { | | enum { | |
| /** | | /** | |
| * Return value from MessagePattern.validateArgumentName() for when | | * Return value from MessagePattern.validateArgumentName() for when | |
| * the string is a valid "pattern identifier" but not a number. | | * the string is a valid "pattern identifier" but not a number. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_NAME_NOT_NUMBER=-1, | | UMSGPAT_ARG_NAME_NOT_NUMBER=-1, | |
| | | | |
| /** | | /** | |
| * Return value from MessagePattern.validateArgumentName() for when | | * Return value from MessagePattern.validateArgumentName() for when | |
| * the string is invalid. | | * the string is invalid. | |
| * It might not be a valid "pattern identifier", | | * It might not be a valid "pattern identifier", | |
| * or it have only ASCII digits but there is a leading zero or the numb
er is too large. | | * or it have only ASCII digits but there is a leading zero or the numb
er is too large. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMSGPAT_ARG_NAME_NOT_VALID=-2 | | UMSGPAT_ARG_NAME_NOT_VALID=-2 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Special value that is returned by getNumericValue(Part) when no | | * Special value that is returned by getNumericValue(Part) when no | |
| * numeric value is defined for a part. | | * numeric value is defined for a part. | |
| * @see MessagePattern.getNumericValue() | | * @see MessagePattern.getNumericValue() | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| #define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789)) | | #define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789)) | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class MessagePatternDoubleList; | | class MessagePatternDoubleList; | |
| class MessagePatternPartsList; | | class MessagePatternPartsList; | |
| | | | |
| /** | | /** | |
| * Parses and represents ICU MessageFormat patterns. | | * Parses and represents ICU MessageFormat patterns. | |
| | | | |
| skipping to change at line 344 | | skipping to change at line 341 | |
| * the less-than-or-equal-to sign (U+2264). | | * the less-than-or-equal-to sign (U+2264). | |
| * <li>In the pluralStyle, the first, optional numeric Part has the "offs
et:" value. | | * <li>In the pluralStyle, the first, optional numeric Part has the "offs
et:" value. | |
| * The optional numeric Part between each (ARG_SELECTOR, message) pai
r | | * The optional numeric Part between each (ARG_SELECTOR, message) pai
r | |
| * is the value of an explicit-number selector like "=2", | | * is the value of an explicit-number selector like "=2", | |
| * otherwise the selector is a non-numeric identifier. | | * otherwise the selector is a non-numeric identifier. | |
| * <li>The REPLACE_NUMBER Part can occur only in an immediate sub-message
of the pluralStyle. | | * <li>The REPLACE_NUMBER Part can occur only in an immediate sub-message
of the pluralStyle. | |
| * </ul> | | * </ul> | |
| * <p> | | * <p> | |
| * This class is not intended for public subclassing. | | * This class is not intended for public subclassing. | |
| * | | * | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| class U_COMMON_API MessagePattern : public UObject { | | class U_COMMON_API MessagePattern : public UObject { | |
| public: | | public: | |
| /** | | /** | |
| * Constructs an empty MessagePattern with default UMessagePatternApost
ropheMode. | | * Constructs an empty MessagePattern with default UMessagePatternApost
ropheMode. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern(UErrorCode &errorCode); | | MessagePattern(UErrorCode &errorCode); | |
| | | | |
| /** | | /** | |
| * Constructs an empty MessagePattern. | | * Constructs an empty MessagePattern. | |
| * @param mode Explicit UMessagePatternApostropheMode. | | * @param mode Explicit UMessagePatternApostropheMode. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCod
e); | | MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCod
e); | |
| | | | |
| /** | | /** | |
| * Constructs a MessagePattern with default UMessagePatternApostropheMo
de and | | * Constructs a MessagePattern with default UMessagePatternApostropheMo
de and | |
| * parses the MessageFormat pattern string. | | * parses the MessageFormat pattern string. | |
| * @param pattern a MessageFormat pattern string | | * @param pattern a MessageFormat pattern string | |
| * @param parseError Struct to receive information on the position | | * @param parseError Struct to receive information on the position | |
| * of an error within the pattern. | | * of an error within the pattern. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * TODO: turn @throws into UErrorCode specifics? | | * TODO: turn @throws into UErrorCode specifics? | |
| * @throws IllegalArgumentException for syntax errors in the pattern st
ring | | * @throws IllegalArgumentException for syntax errors in the pattern st
ring | |
| * @throws IndexOutOfBoundsException if certain limits are exceeded | | * @throws IndexOutOfBoundsException if certain limits are exceeded | |
| * (e.g., argument number too high, argument name too long, etc
.) | | * (e.g., argument number too high, argument name too long, etc
.) | |
| * @throws NumberFormatException if a number could not be parsed | | * @throws NumberFormatException if a number could not be parsed | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern(const UnicodeString &pattern, UParseError *parseError, U
ErrorCode &errorCode); | | MessagePattern(const UnicodeString &pattern, UParseError *parseError, U
ErrorCode &errorCode); | |
| | | | |
| /** | | /** | |
| * Copy constructor. | | * Copy constructor. | |
| * @param other Object to copy. | | * @param other Object to copy. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern(const MessagePattern &other); | | MessagePattern(const MessagePattern &other); | |
| | | | |
| /** | | /** | |
| * Assignment operator. | | * Assignment operator. | |
| * @param other Object to copy. | | * @param other Object to copy. | |
| * @return *this=other | | * @return *this=other | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern &operator=(const MessagePattern &other); | | MessagePattern &operator=(const MessagePattern &other); | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual ~MessagePattern(); | | virtual ~MessagePattern(); | |
| | | | |
| /** | | /** | |
| * Parses a MessageFormat pattern string. | | * Parses a MessageFormat pattern string. | |
| * @param pattern a MessageFormat pattern string | | * @param pattern a MessageFormat pattern string | |
| * @param parseError Struct to receive information on the position | | * @param parseError Struct to receive information on the position | |
| * of an error within the pattern. | | * of an error within the pattern. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return *this | | * @return *this | |
| * @throws IllegalArgumentException for syntax errors in the pattern st
ring | | * @throws IllegalArgumentException for syntax errors in the pattern st
ring | |
| * @throws IndexOutOfBoundsException if certain limits are exceeded | | * @throws IndexOutOfBoundsException if certain limits are exceeded | |
| * (e.g., argument number too high, argument name too long, etc
.) | | * (e.g., argument number too high, argument name too long, etc
.) | |
| * @throws NumberFormatException if a number could not be parsed | | * @throws NumberFormatException if a number could not be parsed | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern &parse(const UnicodeString &pattern, | | MessagePattern &parse(const UnicodeString &pattern, | |
| UParseError *parseError, UErrorCode &errorCode); | | UParseError *parseError, UErrorCode &errorCode); | |
| | | | |
| /** | | /** | |
| * Parses a ChoiceFormat pattern string. | | * Parses a ChoiceFormat pattern string. | |
| * @param pattern a ChoiceFormat pattern string | | * @param pattern a ChoiceFormat pattern string | |
| * @param parseError Struct to receive information on the position | | * @param parseError Struct to receive information on the position | |
| * of an error within the pattern. | | * of an error within the pattern. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return *this | | * @return *this | |
| * @throws IllegalArgumentException for syntax errors in the pattern st
ring | | * @throws IllegalArgumentException for syntax errors in the pattern st
ring | |
| * @throws IndexOutOfBoundsException if certain limits are exceeded | | * @throws IndexOutOfBoundsException if certain limits are exceeded | |
| * (e.g., argument number too high, argument name too long, etc
.) | | * (e.g., argument number too high, argument name too long, etc
.) | |
| * @throws NumberFormatException if a number could not be parsed | | * @throws NumberFormatException if a number could not be parsed | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern &parseChoiceStyle(const UnicodeString &pattern, | | MessagePattern &parseChoiceStyle(const UnicodeString &pattern, | |
| UParseError *parseError, UErrorCode &e
rrorCode); | | UParseError *parseError, UErrorCode &e
rrorCode); | |
| | | | |
| /** | | /** | |
| * Parses a PluralFormat pattern string. | | * Parses a PluralFormat pattern string. | |
| * @param pattern a PluralFormat pattern string | | * @param pattern a PluralFormat pattern string | |
| * @param parseError Struct to receive information on the position | | * @param parseError Struct to receive information on the position | |
| * of an error within the pattern. | | * of an error within the pattern. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return *this | | * @return *this | |
| * @throws IllegalArgumentException for syntax errors in the pattern st
ring | | * @throws IllegalArgumentException for syntax errors in the pattern st
ring | |
| * @throws IndexOutOfBoundsException if certain limits are exceeded | | * @throws IndexOutOfBoundsException if certain limits are exceeded | |
| * (e.g., argument number too high, argument name too long, etc
.) | | * (e.g., argument number too high, argument name too long, etc
.) | |
| * @throws NumberFormatException if a number could not be parsed | | * @throws NumberFormatException if a number could not be parsed | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern &parsePluralStyle(const UnicodeString &pattern, | | MessagePattern &parsePluralStyle(const UnicodeString &pattern, | |
| UParseError *parseError, UErrorCode &e
rrorCode); | | UParseError *parseError, UErrorCode &e
rrorCode); | |
| | | | |
| /** | | /** | |
| * Parses a SelectFormat pattern string. | | * Parses a SelectFormat pattern string. | |
| * @param pattern a SelectFormat pattern string | | * @param pattern a SelectFormat pattern string | |
| * @param parseError Struct to receive information on the position | | * @param parseError Struct to receive information on the position | |
| * of an error within the pattern. | | * of an error within the pattern. | |
| * Can be NULL. | | * Can be NULL. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function ret
urns | | * pass the U_SUCCESS() test, or else the function ret
urns | |
| * immediately. Check for U_FAILURE() on output or use
with | | * immediately. Check for U_FAILURE() on output or use
with | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return *this | | * @return *this | |
| * @throws IllegalArgumentException for syntax errors in the pattern st
ring | | * @throws IllegalArgumentException for syntax errors in the pattern st
ring | |
| * @throws IndexOutOfBoundsException if certain limits are exceeded | | * @throws IndexOutOfBoundsException if certain limits are exceeded | |
| * (e.g., argument number too high, argument name too long, etc
.) | | * (e.g., argument number too high, argument name too long, etc
.) | |
| * @throws NumberFormatException if a number could not be parsed | | * @throws NumberFormatException if a number could not be parsed | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| MessagePattern &parseSelectStyle(const UnicodeString &pattern, | | MessagePattern &parseSelectStyle(const UnicodeString &pattern, | |
| UParseError *parseError, UErrorCode &e
rrorCode); | | UParseError *parseError, UErrorCode &e
rrorCode); | |
| | | | |
| /** | | /** | |
| * Clears this MessagePattern. | | * Clears this MessagePattern. | |
| * countParts() will return 0. | | * countParts() will return 0. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| void clear(); | | void clear(); | |
| | | | |
| /** | | /** | |
| * Clears this MessagePattern and sets the UMessagePatternApostropheMod
e. | | * Clears this MessagePattern and sets the UMessagePatternApostropheMod
e. | |
| * countParts() will return 0. | | * countParts() will return 0. | |
| * @param mode The new UMessagePatternApostropheMode. | | * @param mode The new UMessagePatternApostropheMode. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| void clearPatternAndSetApostropheMode(UMessagePatternApostropheMode mod
e) { | | void clearPatternAndSetApostropheMode(UMessagePatternApostropheMode mod
e) { | |
| clear(); | | clear(); | |
| aposMode=mode; | | aposMode=mode; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * @param other another object to compare with. | | * @param other another object to compare with. | |
| * @return TRUE if this object is equivalent to the other one. | | * @return TRUE if this object is equivalent to the other one. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool operator==(const MessagePattern &other) const; | | UBool operator==(const MessagePattern &other) const; | |
| | | | |
| /** | | /** | |
| * @param other another object to compare with. | | * @param other another object to compare with. | |
| * @return FALSE if this object is equivalent to the other one. | | * @return FALSE if this object is equivalent to the other one. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| inline UBool operator!=(const MessagePattern &other) const { | | inline UBool operator!=(const MessagePattern &other) const { | |
| return !operator==(other); | | return !operator==(other); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * @return A hash code for this object. | | * @return A hash code for this object. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t hashCode() const; | | int32_t hashCode() const; | |
| | | | |
| /** | | /** | |
| * @return this instance's UMessagePatternApostropheMode. | | * @return this instance's UMessagePatternApostropheMode. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMessagePatternApostropheMode getApostropheMode() const { | | UMessagePatternApostropheMode getApostropheMode() const { | |
| return aposMode; | | return aposMode; | |
| } | | } | |
| | | | |
| // Java has package-private jdkAposMode() here. | | // Java has package-private jdkAposMode() here. | |
| // In C++, this is declared in the MessageImpl class. | | // In C++, this is declared in the MessageImpl class. | |
| | | | |
| /** | | /** | |
| * @return the parsed pattern string (null if none was parsed). | | * @return the parsed pattern string (null if none was parsed). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| const UnicodeString &getPatternString() const { | | const UnicodeString &getPatternString() const { | |
| return msg; | | return msg; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Does the parsed pattern have named arguments like {first_name}? | | * Does the parsed pattern have named arguments like {first_name}? | |
| * @return TRUE if the parsed pattern has at least one named argument. | | * @return TRUE if the parsed pattern has at least one named argument. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool hasNamedArguments() const { | | UBool hasNamedArguments() const { | |
| return hasArgNames; | | return hasArgNames; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Does the parsed pattern have numbered arguments like {2}? | | * Does the parsed pattern have numbered arguments like {2}? | |
| * @return TRUE if the parsed pattern has at least one numbered argumen
t. | | * @return TRUE if the parsed pattern has at least one numbered argumen
t. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool hasNumberedArguments() const { | | UBool hasNumberedArguments() const { | |
| return hasArgNumbers; | | return hasArgNumbers; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Validates and parses an argument name or argument number string. | | * Validates and parses an argument name or argument number string. | |
| * An argument name must be a "pattern identifier", that is, it must co
ntain | | * An argument name must be a "pattern identifier", that is, it must co
ntain | |
| * no Unicode Pattern_Syntax or Pattern_White_Space characters. | | * no Unicode Pattern_Syntax or Pattern_White_Space characters. | |
| * If it only contains ASCII digits, then it must be a small integer wi
th no leading zero. | | * If it only contains ASCII digits, then it must be a small integer wi
th no leading zero. | |
| * @param name Input string. | | * @param name Input string. | |
| * @return >=0 if the name is a valid number, | | * @return >=0 if the name is a valid number, | |
| * ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but
not all ASCII digits, | | * ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but
not all ASCII digits, | |
| * ARG_NAME_NOT_VALID (-2) if it is neither. | | * ARG_NAME_NOT_VALID (-2) if it is neither. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| static int32_t validateArgumentName(const UnicodeString &name); | | static int32_t validateArgumentName(const UnicodeString &name); | |
| | | | |
| /** | | /** | |
| * Returns a version of the parsed pattern string where each ASCII apos
trophe | | * Returns a version of the parsed pattern string where each ASCII apos
trophe | |
| * is doubled (escaped) if it is not already, and if it is not interpre
ted as quoting syntax. | | * is doubled (escaped) if it is not already, and if it is not interpre
ted as quoting syntax. | |
| * <p> | | * <p> | |
| * For example, this turns "I don't '{know}' {gender,select,female{h''e
r}other{h'im}}." | | * For example, this turns "I don't '{know}' {gender,select,female{h''e
r}other{h'im}}." | |
| * into "I don''t '{know}' {gender,select,female{h''er}other{h''im}}." | | * into "I don''t '{know}' {gender,select,female{h''er}other{h''im}}." | |
| * @return the deep-auto-quoted version of the parsed pattern string. | | * @return the deep-auto-quoted version of the parsed pattern string. | |
| * @see MessageFormat.autoQuoteApostrophe() | | * @see MessageFormat.autoQuoteApostrophe() | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UnicodeString autoQuoteApostropheDeep() const; | | UnicodeString autoQuoteApostropheDeep() const; | |
| | | | |
| class Part; | | class Part; | |
| | | | |
| /** | | /** | |
| * Returns the number of "parts" created by parsing the pattern string. | | * Returns the number of "parts" created by parsing the pattern string. | |
| * Returns 0 if no pattern has been parsed or clear() was called. | | * Returns 0 if no pattern has been parsed or clear() was called. | |
| * @return the number of pattern parts. | | * @return the number of pattern parts. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t countParts() const { | | int32_t countParts() const { | |
| return partsLength; | | return partsLength; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Gets the i-th pattern "part". | | * Gets the i-th pattern "part". | |
| * @param i The index of the Part data. (0..countParts()-1) | | * @param i The index of the Part data. (0..countParts()-1) | |
| * @return the i-th pattern "part". | | * @return the i-th pattern "part". | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| const Part &getPart(int32_t i) const { | | const Part &getPart(int32_t i) const { | |
| return parts[i]; | | return parts[i]; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the UMessagePatternPartType of the i-th pattern "part". | | * Returns the UMessagePatternPartType of the i-th pattern "part". | |
| * Convenience method for getPart(i).getType(). | | * Convenience method for getPart(i).getType(). | |
| * @param i The index of the Part data. (0..countParts()-1) | | * @param i The index of the Part data. (0..countParts()-1) | |
| * @return The UMessagePatternPartType of the i-th Part. | | * @return The UMessagePatternPartType of the i-th Part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMessagePatternPartType getPartType(int32_t i) const { | | UMessagePatternPartType getPartType(int32_t i) const { | |
| return getPart(i).type; | | return getPart(i).type; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the pattern index of the specified pattern "part". | | * Returns the pattern index of the specified pattern "part". | |
| * Convenience method for getPart(partIndex).getIndex(). | | * Convenience method for getPart(partIndex).getIndex(). | |
| * @param partIndex The index of the Part data. (0..countParts()-1) | | * @param partIndex The index of the Part data. (0..countParts()-1) | |
| * @return The pattern index of this Part. | | * @return The pattern index of this Part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getPatternIndex(int32_t partIndex) const { | | int32_t getPatternIndex(int32_t partIndex) const { | |
| return getPart(partIndex).index; | | return getPart(partIndex).index; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the substring of the pattern string indicated by the Part. | | * Returns the substring of the pattern string indicated by the Part. | |
| * Convenience method for getPatternString().substring(part.getIndex(),
part.getLimit()). | | * Convenience method for getPatternString().substring(part.getIndex(),
part.getLimit()). | |
| * @param part a part of this MessagePattern. | | * @param part a part of this MessagePattern. | |
| * @return the substring associated with part. | | * @return the substring associated with part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UnicodeString getSubstring(const Part &part) const { | | UnicodeString getSubstring(const Part &part) const { | |
| return msg.tempSubString(part.index, part.length); | | return msg.tempSubString(part.index, part.length); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Compares the part's substring with the input string s. | | * Compares the part's substring with the input string s. | |
| * @param part a part of this MessagePattern. | | * @param part a part of this MessagePattern. | |
| * @param s a string. | | * @param s a string. | |
| * @return TRUE if getSubstring(part).equals(s). | | * @return TRUE if getSubstring(part).equals(s). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool partSubstringMatches(const Part &part, const UnicodeString &s) co
nst { | | UBool partSubstringMatches(const Part &part, const UnicodeString &s) co
nst { | |
| return 0==msg.compare(part.index, part.length, s); | | return 0==msg.compare(part.index, part.length, s); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the numeric value associated with an ARG_INT or ARG_DOUBLE. | | * Returns the numeric value associated with an ARG_INT or ARG_DOUBLE. | |
| * @param part a part of this MessagePattern. | | * @param part a part of this MessagePattern. | |
| * @return the part's numeric value, or UMSGPAT_NO_NUMERIC_VALUE if thi
s is not a numeric part. | | * @return the part's numeric value, or UMSGPAT_NO_NUMERIC_VALUE if thi
s is not a numeric part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| double getNumericValue(const Part &part) const; | | double getNumericValue(const Part &part) const; | |
| | | | |
| /** | | /** | |
| * Returns the "offset:" value of a PluralFormat argument, or 0 if none
is specified. | | * Returns the "offset:" value of a PluralFormat argument, or 0 if none
is specified. | |
| * @param pluralStart the index of the first PluralFormat argument styl
e part. (0..countParts()-1) | | * @param pluralStart the index of the first PluralFormat argument styl
e part. (0..countParts()-1) | |
| * @return the "offset:" value. | | * @return the "offset:" value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| double getPluralOffset(int32_t pluralStart) const; | | double getPluralOffset(int32_t pluralStart) const; | |
| | | | |
| /** | | /** | |
| * Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG
|MSG_START at start. | | * Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG
|MSG_START at start. | |
| * @param start The index of some Part data (0..countParts()-1); | | * @param start The index of some Part data (0..countParts()-1); | |
| * this Part should be of Type ARG_START or MSG_START. | | * this Part should be of Type ARG_START or MSG_START. | |
| * @return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT
at the same nesting level, | | * @return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT
at the same nesting level, | |
| * or start itself if getPartType(msgStart)!=ARG|MSG_START. | | * or start itself if getPartType(msgStart)!=ARG|MSG_START. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getLimitPartIndex(int32_t start) const { | | int32_t getLimitPartIndex(int32_t start) const { | |
| int32_t limit=getPart(start).limitPartIndex; | | int32_t limit=getPart(start).limitPartIndex; | |
| if(limit<start) { | | if(limit<start) { | |
| return start; | | return start; | |
| } | | } | |
| return limit; | | return limit; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * A message pattern "part", representing a pattern parsing event. | | * A message pattern "part", representing a pattern parsing event. | |
| * There is a part for the start and end of a message or argument, | | * There is a part for the start and end of a message or argument, | |
| * for quoting and escaping of and with ASCII apostrophes, | | * for quoting and escaping of and with ASCII apostrophes, | |
| * and for syntax elements of "complex" arguments. | | * and for syntax elements of "complex" arguments. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| class Part : public UMemory { | | class Part : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Default constructor, do not use. | | * Default constructor, do not use. | |
| * @internal | | * @internal | |
| */ | | */ | |
| Part() {} | | Part() {} | |
| | | | |
| /** | | /** | |
| * Returns the type of this part. | | * Returns the type of this part. | |
| * @return the part type. | | * @return the part type. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMessagePatternPartType getType() const { | | UMessagePatternPartType getType() const { | |
| return type; | | return type; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the pattern string index associated with this Part. | | * Returns the pattern string index associated with this Part. | |
| * @return this part's pattern string index. | | * @return this part's pattern string index. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getIndex() const { | | int32_t getIndex() const { | |
| return index; | | return index; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the length of the pattern substring associated with this
Part. | | * Returns the length of the pattern substring associated with this
Part. | |
| * This is 0 for some parts. | | * This is 0 for some parts. | |
|
| * @return this part's pattern string index. | | * @return this part's pattern substring length. | |
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getLength() const { | | int32_t getLength() const { | |
| return length; | | return length; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the pattern string limit (exclusive-end) index associate
d with this Part. | | * Returns the pattern string limit (exclusive-end) index associate
d with this Part. | |
| * Convenience method for getIndex()+getLength(). | | * Convenience method for getIndex()+getLength(). | |
| * @return this part's pattern string limit index, same as getIndex
()+getLength(). | | * @return this part's pattern string limit index, same as getIndex
()+getLength(). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getLimit() const { | | int32_t getLimit() const { | |
| return index+length; | | return index+length; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns a value associated with this part. | | * Returns a value associated with this part. | |
| * See the documentation of each part type for details. | | * See the documentation of each part type for details. | |
| * @return the part value. | | * @return the part value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getValue() const { | | int32_t getValue() const { | |
| return value; | | return value; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Returns the argument type if this part is of type ARG_START or A
RG_LIMIT, | | * Returns the argument type if this part is of type ARG_START or A
RG_LIMIT, | |
| * otherwise UMSGPAT_ARG_TYPE_NONE. | | * otherwise UMSGPAT_ARG_TYPE_NONE. | |
| * @return the argument type for this part. | | * @return the argument type for this part. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UMessagePatternArgType getArgType() const { | | UMessagePatternArgType getArgType() const { | |
| UMessagePatternPartType type=getType(); | | UMessagePatternPartType type=getType(); | |
| if(type==UMSGPAT_PART_TYPE_ARG_START || type==UMSGPAT_PART_TYPE
_ARG_LIMIT) { | | if(type==UMSGPAT_PART_TYPE_ARG_START || type==UMSGPAT_PART_TYPE
_ARG_LIMIT) { | |
| return (UMessagePatternArgType)value; | | return (UMessagePatternArgType)value; | |
| } else { | | } else { | |
| return UMSGPAT_ARG_TYPE_NONE; | | return UMSGPAT_ARG_TYPE_NONE; | |
| } | | } | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Indicates whether the Part type has a numeric value. | | * Indicates whether the Part type has a numeric value. | |
| * If so, then that numeric value can be retrieved via MessagePatte
rn.getNumericValue(). | | * If so, then that numeric value can be retrieved via MessagePatte
rn.getNumericValue(). | |
| * @param type The Part type to be tested. | | * @param type The Part type to be tested. | |
| * @return TRUE if the Part type has a numeric value. | | * @return TRUE if the Part type has a numeric value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| static UBool hasNumericValue(UMessagePatternPartType type) { | | static UBool hasNumericValue(UMessagePatternPartType type) { | |
| return type==UMSGPAT_PART_TYPE_ARG_INT || type==UMSGPAT_PART_TY
PE_ARG_DOUBLE; | | return type==UMSGPAT_PART_TYPE_ARG_INT || type==UMSGPAT_PART_TY
PE_ARG_DOUBLE; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * @param other another object to compare with. | | * @param other another object to compare with. | |
| * @return TRUE if this object is equivalent to the other one. | | * @return TRUE if this object is equivalent to the other one. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool operator==(const Part &other) const; | | UBool operator==(const Part &other) const; | |
| | | | |
| /** | | /** | |
| * @param other another object to compare with. | | * @param other another object to compare with. | |
| * @return FALSE if this object is equivalent to the other one. | | * @return FALSE if this object is equivalent to the other one. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| inline UBool operator!=(const Part &other) const { | | inline UBool operator!=(const Part &other) const { | |
| return !operator==(other); | | return !operator==(other); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * @return A hash code for this object. | | * @return A hash code for this object. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t hashCode() const { | | int32_t hashCode() const { | |
| return ((type*37+index)*37+length)*37+value; | | return ((type*37+index)*37+length)*37+value; | |
| } | | } | |
| | | | |
| private: | | private: | |
| friend class MessagePattern; | | friend class MessagePattern; | |
| | | | |
| static const int32_t MAX_LENGTH=0xffff; | | static const int32_t MAX_LENGTH=0xffff; | |
| static const int32_t MAX_VALUE=0x7fff; | | static const int32_t MAX_VALUE=0x7fff; | |
| | | | |
End of changes. 74 change blocks. |
| 82 lines changed or deleted | | 79 lines changed or added | |
|
| platform.h | | platform.h | |
| /* | | /* | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| * | | * | |
|
| * Copyright (C) 1997-2011, International Business Machines | | * Copyright (C) 1997-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| * | | * | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| * | | * | |
|
| * Note: autoconf creates platform.h from platform.h.in at configure time. | | | |
| * | | | |
| *************************************************************************** | | | |
| *** | | | |
| * | | | |
| * FILE NAME : platform.h | | * FILE NAME : platform.h | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 05/13/98 nos Creation (content moved here from ptypes.h). | | * 05/13/98 nos Creation (content moved here from ptypes.h). | |
| * 03/02/99 stephen Added AS400 support. | | * 03/02/99 stephen Added AS400 support. | |
| * 03/30/99 stephen Added Linux support. | | * 03/30/99 stephen Added Linux support. | |
| * 04/13/99 stephen Reworked for autoconf. | | * 04/13/99 stephen Reworked for autoconf. | |
| ***************************************************************************
*** | | ***************************************************************************
*** | |
| */ | | */ | |
| | | | |
| #ifndef _PLATFORM_H | | #ifndef _PLATFORM_H | |
| #define _PLATFORM_H | | #define _PLATFORM_H | |
| | | | |
|
| | | #include "unicode/uconfig.h" | |
| | | #include "unicode/uvernum.h" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
|
| * \brief Basic types for the platform | | * \brief Basic types for the platform. | |
| | | * | |
| | | * This file used to be generated by autoconf/configure. | |
| | | * Starting with ICU 49, platform.h is a normal source file, | |
| | | * to simplify cross-compiling and working with non-autoconf/make build sys | |
| | | tems. | |
| | | * | |
| | | * When a value in this file does not work on a platform, then please | |
| | | * try to derive it from the U_PLATFORM value | |
| | | * (for which we might need a new value constant in rare cases) | |
| | | * 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 #define for some macr | |
| | | os | |
| | | * before it is first tested, or add an equivalent -D macro definition | |
| | | * to the compiler's command line. | |
| | | * | |
| | | * Note: Some compilers provide ways to show the predefined macros. | |
| | | * For example, with gcc you can compile an empty .c file and have the comp | |
| | | iler | |
| | | * print the predefined macros with | |
| | | * \code | |
| | | * gcc -E -dM -x c /dev/null | sort | |
| | | * \endcode | |
| | | * (You can provide an actual empty .c file rather than /dev/null. | |
| | | * <code>-x c++</code> is for C++.) | |
| */ | | */ | |
| | | | |
|
| /* This file should be included before uvernum.h. */ | | /** | |
| #if defined(UVERNUM_H) | | * \def U_PLATFORM | |
| # error Do not include unicode/uvernum.h before #including unicode/platform | | * The U_PLATFORM macro defines the platform we're on. | |
| .h. Instead of unicode/uvernum.h, #include unicode/uversion.h | | * | |
| | | * We used to define one different, value-less macro per platform. | |
| | | * That made it hard to know the set of relevant platforms and macros, | |
| | | * and hard to deal with variants of platforms. | |
| | | * | |
| | | * Starting with ICU 49, we define platforms as numeric macros, | |
| | | * with ranges of values for related platforms and their variants. | |
| | | * The U_PLATFORM macro is set to one of these values. | |
| | | * | |
| | | * Historical note from the Solaris Wikipedia article: | |
| | | * AT&T and Sun collaborated on a project to merge the most popular Unix va | |
| | | riants | |
| | | * on the market at that time: BSD, System V, and Xenix. | |
| | | * This became Unix System V Release 4 (SVR4). | |
| | | * | |
| | | * @internal | |
| | | */ | |
| | | | |
| | | /** Unknown platform. @internal */ | |
| | | #define U_PF_UNKNOWN 0 | |
| | | /** Windows @internal */ | |
| | | #define U_PF_WINDOWS 1000 | |
| | | /** MinGW. Windows, calls to Win32 API, but using GNU gcc and binutils. @in | |
| | | ternal */ | |
| | | #define U_PF_MINGW 1800 | |
| | | /** | |
| | | * Cygwin. Windows, calls to cygwin1.dll for Posix functions, | |
| | | * using MSVC or GNU gcc and binutils. | |
| | | * @internal | |
| | | */ | |
| | | #define U_PF_CYGWIN 1900 | |
| | | /* Reserve 2000 for U_PF_UNIX? */ | |
| | | /** HP-UX is based on UNIX System V. @internal */ | |
| | | #define U_PF_HPUX 2100 | |
| | | /** Solaris is a Unix operating system based on SVR4. @internal */ | |
| | | #define U_PF_SOLARIS 2600 | |
| | | /** BSD is a UNIX operating system derivative. @internal */ | |
| | | #define U_PF_BSD 3000 | |
| | | /** AIX is based on UNIX System V Releases and 4.3 BSD. @internal */ | |
| | | #define U_PF_AIX 3100 | |
| | | /** IRIX is based on UNIX System V with BSD extensions. @internal */ | |
| | | #define U_PF_IRIX 3200 | |
| | | /** | |
| | | * Darwin is a POSIX-compliant operating system, composed of code developed | |
| | | by Apple, | |
| | | * as well as code derived from NeXTSTEP, BSD, and other projects, | |
| | | * built around the Mach kernel. | |
| | | * Darwin forms the core set of components upon which Mac OS X, Apple TV, a | |
| | | nd iOS are based. | |
| | | * (Original description modified from WikiPedia.) | |
| | | * @internal | |
| | | */ | |
| | | #define U_PF_DARWIN 3500 | |
| | | /** iPhone OS (iOS) is a derivative of Mac OS X. @internal */ | |
| | | #define U_PF_IPHONE 3550 | |
| | | /** QNX is a commercial Unix-like real-time operating system related to BSD | |
| | | . @internal */ | |
| | | #define U_PF_QNX 3700 | |
| | | /** Linux is a Unix-like operating system. @internal */ | |
| | | #define U_PF_LINUX 4000 | |
| | | /** Android is based on Linux. @internal */ | |
| | | #define U_PF_ANDROID 4050 | |
| | | /** "Classic" Mac OS (1984-2001) @internal */ | |
| | | #define U_PF_CLASSIC_MACOS 8000 | |
| | | /** z/OS is the successor to OS/390 which was the successor to MVS. @intern | |
| | | al */ | |
| | | #define U_PF_OS390 9000 | |
| | | /** "IBM i" is the current name of what used to be i5/OS and earlier OS/400 | |
| | | . @internal */ | |
| | | #define U_PF_OS400 9400 | |
| | | | |
| | | #ifdef U_PLATFORM | |
| | | /* Use the predefined value. */ | |
| | | #elif defined(__MINGW32__) | |
| | | # define U_PLATFORM U_PF_MINGW | |
| | | #elif defined(__CYGWIN__) | |
| | | # define U_PLATFORM U_PF_CYGWIN | |
| | | #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64 | |
| | | ) | |
| | | # define U_PLATFORM U_PF_WINDOWS | |
| | | #elif defined(__ANDROID__) | |
| | | # define U_PLATFORM U_PF_ANDROID | |
| | | /* Android wchar_t support depends on the API level. */ | |
| | | # include <android/api-level.h> | |
| | | #elif defined(linux) || defined(__linux__) || defined(__linux) | |
| | | # define U_PLATFORM U_PF_LINUX | |
| | | #elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | |
| | | # define U_PLATFORM U_PF_BSD | |
| | | #elif defined(sun) || defined(__sun) | |
| | | /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris fr | |
| | | om SunOS? */ | |
| | | # define U_PLATFORM U_PF_SOLARIS | |
| | | # if defined(__GNUC__) | |
| | | /* Solaris/GCC needs this header file to get the proper endianness. | |
| | | Normally, this | |
| | | * header file is included with stddef.h but on Solairs/GCC, the GC | |
| | | C version of stddef.h | |
| | | * is included which does not include this header file. | |
| | | */ | |
| | | # include <sys/isa_defs.h> | |
| | | # endif | |
| | | #elif defined(_AIX) || defined(__TOS_AIX__) | |
| | | # define U_PLATFORM U_PF_AIX | |
| | | #elif defined(_hpux) || defined(hpux) || defined(__hpux) | |
| | | # define U_PLATFORM U_PF_HPUX | |
| | | #elif defined(sgi) || defined(__sgi) | |
| | | # define U_PLATFORM U_PF_IRIX | |
| | | #elif defined(__APPLE__) && defined(__MACH__) | |
| | | # include <TargetConditionals.h> | |
| | | # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_ | |
| | | OS_MAC */ | |
| | | # define U_PLATFORM U_PF_IPHONE | |
| | | # else | |
| | | # define U_PLATFORM U_PF_DARWIN | |
| | | # endif | |
| | | #elif defined(macintosh) | |
| | | # define U_PLATFORM U_PF_CLASSIC_MACOS | |
| | | #elif defined(__QNX__) || defined(__QNXNTO__) | |
| | | # define U_PLATFORM U_PF_QNX | |
| | | #elif defined(__TOS_MVS__) | |
| | | # define U_PLATFORM U_PF_OS390 | |
| | | #elif defined(__OS400__) || defined(__TOS_OS400__) | |
| | | # define U_PLATFORM U_PF_OS400 | |
| | | #else | |
| | | # define U_PLATFORM U_PF_UNKNOWN | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Determine wheter to enable auto cleanup of libraries. | | * \def CYGWINMSVC | |
| | | * Defined if this is Windows with Cygwin, but using MSVC rather than gcc. | |
| | | * Otherwise undefined. | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #ifndef UCLN_NO_AUTO_CLEANUP | | /* Commented out because this is already set in mh-cygwin-msvc | |
| #define UCLN_NO_AUTO_CLEANUP 1 | | #if U_PLATFORM == U_PF_CYGWIN && defined(_MSC_VER) | |
| | | # define CYGWINMSVC | |
| #endif | | #endif | |
|
| | | */ | |
| | | | |
|
| #if 0 | | /** | |
| #define CYGWINMSVC | | * \def U_PLATFORM_USES_ONLY_WIN32_API | |
| | | * Defines whether the platform uses only the Win32 API. | |
| | | * Set to 1 for Windows/MSVC and MinGW but not Cygwin. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_PLATFORM_USES_ONLY_WIN32_API | |
| | | /* Use the predefined value. */ | |
| | | #elif (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_MINGW) || defined(C | |
| | | YGWINMSVC) | |
| | | # define U_PLATFORM_USES_ONLY_WIN32_API 1 | |
| | | #else | |
| | | /* Cygwin implements POSIX. */ | |
| | | # define U_PLATFORM_USES_ONLY_WIN32_API 0 | |
| #endif | | #endif | |
| | | | |
|
| /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore e | | /** | |
| verything else. */ | | * \def U_PLATFORM_HAS_WIN32_API | |
| #ifndef CYGWINMSVC | | * Defines whether the Win32 API is available on the platform. | |
| | | * Set to 1 for Windows/MSVC, MinGW and Cygwin. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_PLATFORM_HAS_WIN32_API | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN | |
| | | # define U_PLATFORM_HAS_WIN32_API 1 | |
| | | #else | |
| | | # define U_PLATFORM_HAS_WIN32_API 0 | |
| | | #endif | |
| | | | |
|
| /** Define the platform we're on. */ | | /** | |
| #ifndef U_LINUX | | * \def U_PLATFORM_IMPLEMENTS_POSIX | |
| #define U_LINUX | | * Defines whether the platform implements (most of) the POSIX API. | |
| | | * Set to 1 for Cygwin and most other platforms. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_PLATFORM_IMPLEMENTS_POSIX | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CLASSIC_MACOS | |
| | | # define U_PLATFORM_IMPLEMENTS_POSIX 0 | |
| | | #else | |
| | | # define U_PLATFORM_IMPLEMENTS_POSIX 1 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * \def U_HAVE_DIRENT_H | | * \def U_PLATFORM_IS_LINUX_BASED | |
| * Define whether dirent.h is available | | * Defines whether the platform is Linux or one of its derivatives. | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #ifndef U_HAVE_DIRENT_H | | #ifdef U_PLATFORM_IS_LINUX_BASED | |
| #define U_HAVE_DIRENT_H 1 | | /* Use the predefined value. */ | |
| | | #elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= U_PF_ANDROID | |
| | | # define U_PLATFORM_IS_LINUX_BASED 1 | |
| | | #else | |
| | | # define U_PLATFORM_IS_LINUX_BASED 0 | |
| #endif | | #endif | |
| | | | |
|
| /** Define whether inttypes.h is available */ | | /** | |
| #ifndef U_HAVE_INTTYPES_H | | * \def U_PLATFORM_IS_DARWIN_BASED | |
| #define U_HAVE_INTTYPES_H 1 | | * Defines whether the platform is Darwin or one of its derivatives. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_PLATFORM_IS_DARWIN_BASED | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PF_DARWIN <= U_PLATFORM && U_PLATFORM <= U_PF_IPHONE | |
| | | # define U_PLATFORM_IS_DARWIN_BASED 1 | |
| | | #else | |
| | | # define U_PLATFORM_IS_DARWIN_BASED 0 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Define what support for C++ streams is available. | | * \def U_HAVE_STDINT_H | |
| * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is avai | | * Defines whether stdint.h is available. It is a C99 standard header. | |
| lable | | * We used to include inttypes.h which includes stdint.h but we usually do | |
| * (1997711 is the date the ISO/IEC C++ FDIS was published), and then | | not need | |
| | | * the additional definitions from inttypes.h. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_HAVE_STDINT_H | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM_USES_ONLY_WIN32_API | |
| | | # if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600) | |
| | | /* Windows Visual Studio 9 and below do not have stdint.h & inttype | |
| | | s.h, but VS 2010 adds them. */ | |
| | | # define U_HAVE_STDINT_H 1 | |
| | | # else | |
| | | # define U_HAVE_STDINT_H 0 | |
| | | # endif | |
| | | #elif U_PLATFORM == U_PF_SOLARIS | |
| | | /* Solaris has inttypes.h but not stdint.h. */ | |
| | | # define U_HAVE_STDINT_H 0 | |
| | | #else | |
| | | # define U_HAVE_STDINT_H 1 | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * \def U_HAVE_INTTYPES_H | |
| | | * Defines whether inttypes.h is available. It is a C99 standard header. | |
| | | * We include inttypes.h where it is available but stdint.h is not. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_HAVE_INTTYPES_H | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM == U_PF_SOLARIS | |
| | | /* Solaris has inttypes.h but not stdint.h. */ | |
| | | # define U_HAVE_INTTYPES_H 1 | |
| | | #else | |
| | | /* Most platforms have both inttypes.h and stdint.h, or neither. */ | |
| | | # define U_HAVE_INTTYPES_H U_HAVE_STDINT_H | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * \def U_IOSTREAM_SOURCE | |
| | | * Defines what support for C++ streams is available. | |
| | | * | |
| | | * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is availabl | |
| | | e | |
| | | * (the ISO/IEC C++ FDIS was published in November 1997), and then | |
| * one should qualify streams using the std namespace in ICU header | | * one should qualify streams using the std namespace in ICU header | |
| * files. | | * files. | |
|
| * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is | | * Starting with ICU 49, this is the only supported version. | |
| * available instead (198506 is the date when Stroustrup published | | * | |
| | | * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is | |
| | | * available instead (in June 1985 Stroustrup published | |
| * "An Extensible I/O Facility for C++" at the summer USENIX conference). | | * "An Extensible I/O Facility for C++" at the summer USENIX conference). | |
|
| * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and | | * Starting with ICU 49, this version is not supported any more. | |
| | | * | |
| | | * If U_IOSTREAM_SOURCE is 0 (or any value less than 199711), | |
| | | * then C++ streams are not available and | |
| * support for them will be silently suppressed in ICU. | | * support for them will be silently suppressed in ICU. | |
| * | | * | |
|
| | | * @internal | |
| */ | | */ | |
|
| | | | |
| #ifndef U_IOSTREAM_SOURCE | | #ifndef U_IOSTREAM_SOURCE | |
| #define U_IOSTREAM_SOURCE 199711 | | #define U_IOSTREAM_SOURCE 199711 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * \def U_HAVE_STD_STRING | | * \def U_HAVE_STD_STRING | |
|
| * Define whether the standard C++ (STL) <string> header is available | | * Defines whether the standard C++ (STL) <string> header is availabl | |
| . | | e. | |
| * For platforms that do not use platform.h and do not define this constant | | | |
| * in their platform-specific headers, std_string.h defaults | | | |
| * U_HAVE_STD_STRING to 1. | | | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #ifndef U_HAVE_STD_STRING | | #ifdef U_HAVE_STD_STRING | |
| #define U_HAVE_STD_STRING 1 | | /* Use the predefined value. */ | |
| #endif | | #elif U_PLATFORM == U_PF_ANDROID | |
| | | # define U_HAVE_STD_STRING 0 | |
| /** @{ Determines whether specific types are available */ | | #else | |
| #ifndef U_HAVE_INT8_T | | # define U_HAVE_STD_STRING 1 | |
| #define U_HAVE_INT8_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_UINT8_T | | | |
| #define U_HAVE_UINT8_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_INT16_T | | | |
| #define U_HAVE_INT16_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_UINT16_T | | | |
| #define U_HAVE_UINT16_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_INT32_T | | | |
| #define U_HAVE_INT32_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_UINT32_T | | | |
| #define U_HAVE_UINT32_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_INT64_T | | | |
| #define U_HAVE_INT64_T 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_HAVE_UINT64_T | | | |
| #define U_HAVE_UINT64_T 1 | | | |
| #endif | | #endif | |
| | | | |
|
| /** @} */ | | | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| /** @{ Compiler and environment features
*/ | | /** @{ Compiler and environment features
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
|
| /* Define whether namespace is supported */ | | /** | |
| #ifndef U_HAVE_NAMESPACE | | * \def U_IS_BIG_ENDIAN | |
| #define U_HAVE_NAMESPACE 1 | | * Determines the endianness of the platform. | |
| #endif | | * @internal | |
| | | */ | |
| /* Determines the endianness of the platform | | #ifdef U_IS_BIG_ENDIAN | |
| It's done this way in case multiple architectures are being built at onc | | /* Use the predefined value. */ | |
| e. | | #elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) | |
| For example, Darwin supports fat binaries, which can be both PPC and x86 | | # define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) | |
| based. */ | | #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) | |
| #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) | | /* gcc */ | |
| #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) | | # define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) | |
| | | #elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) | |
| | | # define U_IS_BIG_ENDIAN 1 | |
| | | #elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) | |
| | | # define U_IS_BIG_ENDIAN 0 | |
| | | #elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 | |
| | | /* These platforms do not appear to predefine any endianness macros. */ | |
| | | # define U_IS_BIG_ENDIAN 1 | |
| #else | | #else | |
|
| #define U_IS_BIG_ENDIAN 0 | | # define U_IS_BIG_ENDIAN 0 | |
| #endif | | | |
| | | | |
| /* 1 or 0 to enable or disable threads. If undefined, default is: enable t | | | |
| hreads. */ | | | |
| #ifndef ICU_USE_THREADS | | | |
| #define ICU_USE_THREADS 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_DEBUG | | | |
| #define U_DEBUG 0 | | | |
| #endif | | #endif | |
| | | | |
|
| #ifndef U_RELEASE | | /** | |
| #define U_RELEASE 1 | | * \def U_HAVE_PLACEMENT_NEW | |
| | | * Determines whether to override placement new and delete for STL. | |
| | | * @stable ICU 2.6 | |
| | | */ | |
| | | #ifdef U_HAVE_PLACEMENT_NEW | |
| | | /* Use the predefined value. */ | |
| | | #elif defined(__BORLANDC__) | |
| | | # define U_HAVE_PLACEMENT_NEW 0 | |
| | | #else | |
| | | # define U_HAVE_PLACEMENT_NEW 1 | |
| #endif | | #endif | |
| | | | |
|
| /* Determine whether to disable renaming or not. This overrides the | | /** | |
| setting in umachine.h which is for all platforms. */ | | * \def U_HAVE_DEBUG_LOCATION_NEW | |
| #ifndef U_DISABLE_RENAMING | | * Define this to define the MFC debug version of the operator new. | |
| #define U_DISABLE_RENAMING 0 | | * | |
| | | * @stable ICU 3.4 | |
| | | */ | |
| | | #ifdef U_HAVE_DEBUG_LOCATION_NEW | |
| | | /* Use the predefined value. */ | |
| | | #elif defined(_MSC_VER) | |
| | | # define U_HAVE_DEBUG_LOCATION_NEW 1 | |
| | | #else | |
| | | # define U_HAVE_DEBUG_LOCATION_NEW 0 | |
| #endif | | #endif | |
| | | | |
|
| /* Determine whether to override new and delete. */ | | /** @} */ | |
| #ifndef U_OVERRIDE_CXX_ALLOCATION | | | |
| #define U_OVERRIDE_CXX_ALLOCATION 1 | | | |
| #endif | | | |
| /* Determine whether to override placement new and delete for STL. */ | | | |
| #ifndef U_HAVE_PLACEMENT_NEW | | | |
| #define U_HAVE_PLACEMENT_NEW 1 | | | |
| #endif | | | |
| | | | |
|
| /* Determine whether to enable tracing. */ | | /*========================================================================= | |
| #ifndef U_ENABLE_TRACING | | ==*/ | |
| #define U_ENABLE_TRACING 0 | | /** @{ Character data types | |
| #endif | | */ | |
| | | /*========================================================================= | |
| | | ==*/ | |
| | | | |
| /** | | /** | |
|
| * Whether to enable Dynamic loading in ICU | | * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba | |
| * @internal | | sed platform. | |
| | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #ifndef U_ENABLE_DYLOAD | | #define U_ASCII_FAMILY 0 | |
| #define U_ENABLE_DYLOAD 1 | | | |
| #endif | | | |
| | | | |
| /** | | /** | |
|
| * Whether to test Dynamic loading as an OS capabilty | | * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC b | |
| * @internal | | ased platform. | |
| | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #ifndef U_CHECK_DYLOAD | | #define U_EBCDIC_FAMILY 1 | |
| #define U_CHECK_DYLOAD 1 | | | |
| #endif | | | |
| | | | |
|
| /** Do we allow ICU users to use the draft APIs by default? */ | | /** | |
| #ifndef U_DEFAULT_SHOW_DRAFT | | * \def U_CHARSET_FAMILY | |
| #define U_DEFAULT_SHOW_DRAFT 1 | | * | |
| | | * <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.</p> | |
| | | * | |
| | | * <p>Those "invariant characters" should be all the uppercase and lowercas | |
| | | e | |
| | | * latin letters, the digits, the space, and "basic punctuation". | |
| | | * Also, '\\n', '\\r', '\\t' should be available.</p> | |
| | | * | |
| | | * <p>The list of "invariant characters" is:<br> | |
| | | * \code | |
| | | * A-Z a-z 0-9 SPACE " % & ' ( ) * + , - . / : ; < | |
| | | = > ? _ | |
| | | * \endcode | |
| | | * <br> | |
| | | * (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p> | |
| | | * | |
| | | * <p>This matches the IBM Syntactic Character Set (CS 640).</p> | |
| | | * | |
| | | * <p>In other words, all the graphic characters in 7-bit ASCII should | |
| | | * be safely accessible except the following:</p> | |
| | | * | |
| | | * \code | |
| | | * '\' <backslash> | |
| | | * '[' <left bracket> | |
| | | * ']' <right bracket> | |
| | | * '{' <left brace> | |
| | | * '}' <right brace> | |
| | | * '^' <circumflex> | |
| | | * '~' <tilde> | |
| | | * '!' <exclamation mark> | |
| | | * '#' <number sign> | |
| | | * '|' <vertical line> | |
| | | * '$' <dollar sign> | |
| | | * '@' <commercial at> | |
| | | * '`' <grave accent> | |
| | | * \endcode | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| | | #ifdef U_CHARSET_FAMILY | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM == U_PF_OS390 && (!defined(__CHARSET_LIB) || !__CHARSET_LI | |
| | | B) | |
| | | # define U_CHARSET_FAMILY U_EBCDIC_FAMILY | |
| | | #elif U_PLATFORM == U_PF_OS400 && !defined(__UTF32__) | |
| | | # define U_CHARSET_FAMILY U_EBCDIC_FAMILY | |
| | | #else | |
| | | # define U_CHARSET_FAMILY U_ASCII_FAMILY | |
| #endif | | #endif | |
| | | | |
|
| /** @} */ | | /** | |
| | | * \def U_CHARSET_IS_UTF8 | |
| /*========================================================================= | | * | |
| ==*/ | | * Hardcode the default charset to UTF-8. | |
| /** @{ Character data types | | * | |
| */ | | * If this is set to 1, then | |
| /*========================================================================= | | * - ICU will assume that all non-invariant char*, StringPiece, std::string | |
| ==*/ | | etc. | |
| | | * contain UTF-8 text, regardless of what the system API uses | |
| #if ((defined(OS390) && (!defined(__CHARSET_LIB) || !__CHARSET_LIB))) || de | | * - some ICU code will use fast functions like u_strFromUTF8() | |
| fined(OS400) | | * rather than the more general and more heavy-weight conversion API (ucn | |
| # define U_CHARSET_FAMILY 1 | | v.h) | |
| | | * - ucnv_getDefaultName() always returns "UTF-8" | |
| | | * - ucnv_setDefaultName() is disabled and will not change the default char | |
| | | set | |
| | | * - static builds of ICU are smaller | |
| | | * - more functionality is available with the UCONFIG_NO_CONVERSION build-t | |
| | | ime | |
| | | * configuration option (see unicode/uconfig.h) | |
| | | * - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable | |
| | | * | |
| | | * @stable ICU 4.2 | |
| | | * @see UCONFIG_NO_CONVERSION | |
| | | */ | |
| | | #ifdef U_CHARSET_IS_UTF8 | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM == U_PF_ANDROID || U_PLATFORM_IS_DARWIN_BASED | |
| | | # define U_CHARSET_IS_UTF8 1 | |
| | | #else | |
| | | # define U_CHARSET_IS_UTF8 0 | |
| #endif | | #endif | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
|
| /** @{ Information about wchar support
*/ | | /** @{ Information about wchar support
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
|
| #ifndef U_HAVE_WCHAR_H | | /** | |
| #define U_HAVE_WCHAR_H 1 | | * \def U_HAVE_WCHAR_H | |
| | | * Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by def | |
| | | ault. | |
| | | * | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| | | #ifdef U_HAVE_WCHAR_H | |
| | | /* Use the predefined value. */ | |
| | | #elif U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9 | |
| | | /* | |
| | | * Android before Gingerbread (Android 2.3, API level 9) did not suppor | |
| | | t wchar_t. | |
| | | * The type and header existed, but the library functions did not work | |
| | | as expected. | |
| | | * The size of wchar_t was 1 but L"xyz" string literals had 32-bit unit | |
| | | s anyway. | |
| | | */ | |
| | | # define U_HAVE_WCHAR_H 0 | |
| | | #else | |
| | | # define U_HAVE_WCHAR_H 1 | |
| #endif | | #endif | |
| | | | |
|
| #ifndef U_SIZEOF_WCHAR_T | | /** | |
| #define U_SIZEOF_WCHAR_T 4 | | * \def U_SIZEOF_WCHAR_T | |
| | | * U_SIZEOF_WCHAR_T==sizeof(wchar_t) | |
| | | * | |
| | | * @stable ICU 2.0 | |
| | | */ | |
| | | #ifdef U_SIZEOF_WCHAR_T | |
| | | /* Use the predefined value. */ | |
| | | #elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) || U_PLATFORM == | |
| | | U_PF_CLASSIC_MACOS | |
| | | /* | |
| | | * Classic Mac OS and Mac OS X before 10.3 (Panther) did not support wc | |
| | | har_t or wstring. | |
| | | * Newer Mac OS X has size 4. | |
| | | */ | |
| | | # define U_SIZEOF_WCHAR_T 1 | |
| | | #elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_CYGWIN | |
| | | # define U_SIZEOF_WCHAR_T 2 | |
| | | #elif U_PLATFORM == U_PF_AIX | |
| | | /* | |
| | | * AIX 6.1 information, section "Wide character data representation": | |
| | | * "... the wchar_t datatype is 32-bit in the 64-bit environment and | |
| | | * 16-bit in the 32-bit environment." | |
| | | * and | |
| | | * "All locales use Unicode for their wide character code values (proce | |
| | | ss code), | |
| | | * except the IBM-eucTW codeset." | |
| | | */ | |
| | | # ifdef __64BIT__ | |
| | | # define U_SIZEOF_WCHAR_T 4 | |
| | | # else | |
| | | # define U_SIZEOF_WCHAR_T 2 | |
| | | # endif | |
| | | #elif U_PLATFORM == U_PF_OS390 | |
| | | /* | |
| | | * z/OS V1R11 information center, section "LP64 | ILP32": | |
| | | * "In 31-bit mode, the size of long and pointers is 4 bytes and the si | |
| | | ze of wchar_t is 2 bytes. | |
| | | * Under LP64, the size of long and pointer is 8 bytes and the size of | |
| | | wchar_t is 4 bytes." | |
| | | */ | |
| | | # ifdef _LP64 | |
| | | # define U_SIZEOF_WCHAR_T 4 | |
| | | # else | |
| | | # define U_SIZEOF_WCHAR_T 2 | |
| | | # endif | |
| | | #elif U_PLATFORM == U_PF_OS400 | |
| | | # if defined(__UTF32__) | |
| | | /* | |
| | | * LOCALETYPE(*LOCALEUTF) is specified. | |
| | | * Wide-character strings are in UTF-32, | |
| | | * narrow-character strings are in UTF-8. | |
| | | */ | |
| | | # define U_SIZEOF_WCHAR_T 4 | |
| | | # elif defined(__UCS2__) | |
| | | /* | |
| | | * LOCALETYPE(*LOCALEUCS2) is specified. | |
| | | * Wide-character strings are in UCS-2, | |
| | | * narrow-character strings are in EBCDIC. | |
| | | */ | |
| | | # define U_SIZEOF_WCHAR_T 2 | |
| | | #else | |
| | | /* | |
| | | * LOCALETYPE(*CLD) or LOCALETYPE(*LOCALE) is specified. | |
| | | * Wide-character strings are in 16-bit EBCDIC, | |
| | | * narrow-character strings are in EBCDIC. | |
| | | */ | |
| | | # define U_SIZEOF_WCHAR_T 2 | |
| | | # endif | |
| | | #else | |
| | | # define U_SIZEOF_WCHAR_T 4 | |
| #endif | | #endif | |
| | | | |
| #ifndef U_HAVE_WCSCPY | | #ifndef U_HAVE_WCSCPY | |
|
| #define U_HAVE_WCSCPY 1 | | #define U_HAVE_WCSCPY U_HAVE_WCHAR_H | |
| #endif | | #endif | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** | | /** | |
|
| | | * \def U_HAVE_CHAR16_T | |
| | | * Defines whether the char16_t type is available for UTF-16 | |
| | | * and u"abc" UTF-16 string literals are supported. | |
| | | * This is a new standard type and standard string literal syntax in C++0x | |
| | | * but has been available in some compilers before. | |
| | | * @internal | |
| | | */ | |
| | | #ifdef U_HAVE_CHAR16_T | |
| | | /* Use the predefined value. */ | |
| | | #else | |
| | | /* | |
| | | * Notes: | |
| | | * Visual Studio 10 (_MSC_VER>=1600) defines char16_t but | |
| | | * does not support u"abc" string literals. | |
| | | * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but | |
| | | * does not support u"abc" string literals. | |
| | | */ | |
| | | # define U_HAVE_CHAR16_T 0 | |
| | | #endif | |
| | | | |
| | | /** | |
| * @{ | | * @{ | |
| * \def U_DECLARE_UTF16 | | * \def U_DECLARE_UTF16 | |
|
| * Do not use this macro. Use the UNICODE_STRING or U_STRING_DECL macros | | * Do not use this macro because it is not defined on all platforms. | |
| * instead. | | * Use the UNICODE_STRING or U_STRING_DECL macros instead. | |
| * @internal | | | |
| * | | | |
| * \def U_GNUC_UTF16_STRING | | | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #ifndef U_GNUC_UTF16_STRING | | #ifdef U_DECLARE_UTF16 | |
| #define U_GNUC_UTF16_STRING 0 | | /* Use the predefined value. */ | |
| #endif | | #elif (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T ! | |
| #if 1 || defined(U_CHECK_UTF16_STRING) | | = 2) \ | |
| #if (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != | | | |
| 2) \ | | | |
| || (defined(__HP_aCC) && __HP_aCC >= 035000) \ | | || (defined(__HP_aCC) && __HP_aCC >= 035000) \ | |
| || (defined(__HP_cc) && __HP_cc >= 111106) \ | | || (defined(__HP_cc) && __HP_cc >= 111106) \ | |
|
| || U_GNUC_UTF16_STRING | | || U_HAVE_CHAR16_T | |
| #define U_DECLARE_UTF16(string) u ## string | | # define U_DECLARE_UTF16(string) u ## string | |
| #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) | | #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) | |
| /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */ | | /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */ | |
| /* Sun's C compiler has issues with this notation, and it's unreliable. */ | | /* Sun's C compiler has issues with this notation, and it's unreliable. */ | |
|
| #define U_DECLARE_UTF16(string) U ## string | | # define U_DECLARE_UTF16(string) U ## string | |
| #elif U_SIZEOF_WCHAR_T == 2 \ | | #elif U_SIZEOF_WCHAR_T == 2 \ | |
|
| && (U_CHARSET_FAMILY == 0 || ((defined(OS390) || defined(OS400)) && def | | && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= | |
| ined(__UCS2__))) | | U_PF_OS400 && defined(__UCS2__))) | |
| #define U_DECLARE_UTF16(string) L ## string | | # define U_DECLARE_UTF16(string) L ## string | |
| #endif | | #else | |
| #endif | | /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ | |
| | | | |
| /** @} */ | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /** @{ Information about POSIX support | | | |
| */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| #ifndef U_HAVE_NL_LANGINFO_CODESET | | | |
| #define U_HAVE_NL_LANGINFO_CODESET 1 | | | |
| #endif | | | |
| | | | |
| #ifndef U_NL_LANGINFO_CODESET | | | |
| #define U_NL_LANGINFO_CODESET CODESET | | | |
| #endif | | | |
| | | | |
| #if 1 | | | |
| #define U_TZSET tzset | | | |
| #endif | | | |
| #if 1 | | | |
| #define U_TIMEZONE __timezone | | | |
| #endif | | | |
| #if 1 | | | |
| #define U_TZNAME tzname | | | |
| #endif | | #endif | |
| | | | |
|
| #define U_HAVE_MMAP 1 | | | |
| #define U_HAVE_POPEN 1 | | | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
|
| /** @{ Symbol import-export control
*/ | | /** @{ Symbol import-export control
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
|
| #ifdef U_STATIC_IMPLEMENTATION | | #ifdef U_EXPORT | |
| #define U_EXPORT | | /* Use the predefined value. */ | |
| #elif 1 | | #elif defined(U_STATIC_IMPLEMENTATION) | |
| #define U_EXPORT __attribute__((visibility("default"))) | | # define U_EXPORT | |
| | | #elif defined(__GNUC__) | |
| | | # define U_EXPORT __attribute__((visibility("default"))) | |
| #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ | | #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ | |
| || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) | | || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) | |
|
| #define U_EXPORT __global | | # define U_EXPORT __global | |
| /*#elif defined(__HP_aCC) || defined(__HP_cc) | | /*#elif defined(__HP_aCC) || defined(__HP_cc) | |
|
| #define U_EXPORT __declspec(dllexport)*/ | | # define U_EXPORT __declspec(dllexport)*/ | |
| | | #elif defined(_MSC_VER) | |
| | | # define U_EXPORT __declspec(dllexport) | |
| #else | | #else | |
|
| #define U_EXPORT | | # define U_EXPORT | |
| #endif | | #endif | |
| | | | |
| /* U_CALLCONV is releated to U_EXPORT2 */ | | /* U_CALLCONV is releated to U_EXPORT2 */ | |
|
| #define U_EXPORT2 | | #ifdef U_EXPORT2 | |
| | | /* Use the predefined value. */ | |
| /* cygwin needs to export/import data */ | | #elif defined(_MSC_VER) | |
| #if defined(U_CYGWIN) && !defined(__GNUC__) | | # define U_EXPORT2 __cdecl | |
| #define U_IMPORT __declspec(dllimport) | | | |
| #else | | #else | |
|
| #define U_IMPORT | | # define U_EXPORT2 | |
| #endif | | | |
| | | | |
| /* @} */ | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /** @{ Code alignment and C function inlining | | | |
| */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| #ifndef U_INLINE | | | |
| # ifdef __cplusplus | | | |
| # define U_INLINE inline | | | |
| # else | | | |
| # define U_INLINE __inline__ | | | |
| # endif | | | |
| #endif | | | |
| | | | |
| #ifndef U_ALIGN_CODE | | | |
| #define U_ALIGN_CODE(n) | | | |
| #endif | | #endif | |
| | | | |
|
| /** @} */ | | #ifdef U_IMPORT | |
| | | /* Use the predefined value. */ | |
| /*========================================================================= | | #elif defined(_MSC_VER) | |
| ==*/ | | /* Windows needs to export/import data. */ | |
| /** @{ GCC built in functions for atomic memory operations | | # define U_IMPORT __declspec(dllimport) | |
| */ | | #else | |
| /*========================================================================= | | # define U_IMPORT | |
| ==*/ | | | |
| | | | |
| /** | | | |
| * \def U_HAVE_GCC_ATOMICS | | | |
| * @internal | | | |
| */ | | | |
| #ifndef U_HAVE_GCC_ATOMICS | | | |
| #define U_HAVE_GCC_ATOMICS 1 | | | |
| #endif | | #endif | |
| | | | |
|
| /** @} */ | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /** @{ Programs used by ICU code | | | |
| */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| /** | | /** | |
|
| * \def U_MAKE | | * \def U_CALLCONV | |
| * What program to execute to run 'make' | | * 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. | |
| | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #ifndef U_MAKE | | #if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) | |
| #define U_MAKE "/usr/bin/gmake" | | # define U_CALLCONV __cdecl | |
| | | #else | |
| | | # define U_CALLCONV U_EXPORT2 | |
| #endif | | #endif | |
| | | | |
|
| /** @} */ | | /* @} */ | |
| | | | |
| #endif /* CYGWINMSVC */ | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /* Custom icu entry point renaming | | | |
| */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| /** | | | |
| * Define the library suffix with C syntax. | | | |
| * @internal | | | |
| */ | | | |
| # define U_LIB_SUFFIX_C_NAME | | | |
| /** | | | |
| * Define the library suffix as a string with C syntax | | | |
| * @internal | | | |
| */ | | | |
| # define U_LIB_SUFFIX_C_NAME_STRING "" | | | |
| /** | | | |
| * 1 if a custom library suffix is set | | | |
| * @internal | | | |
| */ | | | |
| # define U_HAVE_LIB_SUFFIX 0 | | | |
| | | | |
| #if U_HAVE_LIB_SUFFIX | | | |
| # ifndef U_ICU_ENTRY_POINT_RENAME | | | |
| /* Renaming pattern: u_strcpy_41_suffix */ | | | |
| # define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 48 ## | | | |
| # define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_d | | | |
| at | | | |
| | | | |
| # endif | | | |
| #endif | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 57 change blocks. |
| 298 lines changed or deleted | | 597 lines changed or added | |
|
| regex.h | | regex.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 2002-2011, International Business Machines | | * Copyright (C) 2002-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * file name: regex.h | | * file name: regex.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2002oct22 | | * created on: 2002oct22 | |
| * created by: Andy Heninger | | * created by: Andy Heninger | |
| * | | * | |
| * ICU Regular Expressions, API for C++ | | * ICU Regular Expressions, API for C++ | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| | | | |
| #if !UCONFIG_NO_REGULAR_EXPRESSIONS | | #if !UCONFIG_NO_REGULAR_EXPRESSIONS | |
| | | | |
| #include "unicode/uobject.h" | | #include "unicode/uobject.h" | |
| #include "unicode/unistr.h" | | #include "unicode/unistr.h" | |
| #include "unicode/utext.h" | | #include "unicode/utext.h" | |
| #include "unicode/parseerr.h" | | #include "unicode/parseerr.h" | |
| | | | |
| #include "unicode/uregex.h" | | #include "unicode/uregex.h" | |
| | | | |
|
| U_NAMESPACE_BEGIN | | // Forward Declarations | |
| | | | |
|
| // Forward Declarations... | | U_NAMESPACE_BEGIN | |
| | | | |
|
| class RegexMatcher; | | | |
| class RegexPattern; | | | |
| class UVector; | | | |
| class UVector32; | | | |
| class UVector64; | | | |
| class UnicodeSet; | | | |
| struct REStackFrame; | | | |
| struct Regex8BitSet; | | struct Regex8BitSet; | |
|
| class RuleBasedBreakIterator; | | | |
| class RegexCImpl; | | class RegexCImpl; | |
|
| | | class RegexMatcher; | |
| | | class RegexPattern; | |
| | | struct REStackFrame; | |
| | | class RuleBasedBreakIterator; | |
| | | class UnicodeSet; | |
| | | class UVector; | |
| | | class UVector32; | |
| | | class UVector64; | |
| | | | |
| /** | | /** | |
| * RBBIPatternDump Debug function, displays the compiled form of a patt
ern. | | * RBBIPatternDump Debug function, displays the compiled form of a patt
ern. | |
| * @internal | | * @internal | |
| */ | | */ | |
| #ifdef REGEX_DEBUG | | #ifdef REGEX_DEBUG | |
| U_INTERNAL void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| RegexPatternDump(const RegexPattern *pat); | | RegexPatternDump(const RegexPattern *pat); | |
| #else | | #else | |
| #undef RegexPatternDump | | #undef RegexPatternDump | |
| | | | |
| skipping to change at line 209 | | skipping to change at line 209 | |
| * then creating a RegexMatcher object from the pattern.</p> | | * then creating a RegexMatcher object from the pattern.</p> | |
| * | | * | |
| * @param regex The regular expression to be compiled. Note, the text re
ferred | | * @param regex The regular expression to be compiled. Note, the text re
ferred | |
| * to by this UText must not be deleted during the lifetime
of the | | * to by this UText must not be deleted during the lifetime
of the | |
| * RegexPattern object or any RegexMatcher object created f
rom it. | | * RegexPattern object or any RegexMatcher object created f
rom it. | |
| * @param pe Receives the position (line and column nubers) of any er
ror | | * @param pe Receives the position (line and column nubers) of any er
ror | |
| * within the regular expression.) | | * within the regular expression.) | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return A regexPattern object for the compiled pattern. | | * @return A regexPattern object for the compiled pattern. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| static RegexPattern * U_EXPORT2 compile( UText *regex, | | static RegexPattern * U_EXPORT2 compile( UText *regex, | |
| UParseError &pe, | | UParseError &pe, | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Compiles the regular expression in string form into a RegexPattern | | * Compiles the regular expression in string form into a RegexPattern | |
| * object using the specified match mode flags. These compile methods, | | * object using the specified match mode flags. These compile methods, | |
| * rather than the constructors, are the usual way that RegexPattern obj
ects | | * rather than the constructors, are the usual way that RegexPattern obj
ects | |
| * are created. | | * are created. | |
| | | | |
| skipping to change at line 268 | | skipping to change at line 268 | |
| * | | * | |
| * @param regex The regular expression to be compiled. Note, the text re
ferred | | * @param regex The regular expression to be compiled. Note, the text re
ferred | |
| * to by this UText must not be deleted during the lifetime
of the | | * to by this UText must not be deleted during the lifetime
of the | |
| * RegexPattern object or any RegexMatcher object created f
rom it. | | * RegexPattern object or any RegexMatcher object created f
rom it. | |
| * @param flags The match mode flags to be used. | | * @param flags The match mode flags to be used. | |
| * @param pe Receives the position (line and column numbers) of any e
rror | | * @param pe Receives the position (line and column numbers) of any e
rror | |
| * within the regular expression.) | | * within the regular expression.) | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return A regexPattern object for the compiled pattern. | | * @return A regexPattern object for the compiled pattern. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| static RegexPattern * U_EXPORT2 compile( UText *regex, | | static RegexPattern * U_EXPORT2 compile( UText *regex, | |
| uint32_t flags, | | uint32_t flags, | |
| UParseError &pe, | | UParseError &pe, | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Compiles the regular expression in string form into a RegexPattern | | * Compiles the regular expression in string form into a RegexPattern | |
| * object using the specified match mode flags. These compile methods, | | * object using the specified match mode flags. These compile methods, | |
| * rather than the constructors, are the usual way that RegexPattern obj
ects | | * rather than the constructors, are the usual way that RegexPattern obj
ects | |
| | | | |
| skipping to change at line 323 | | skipping to change at line 323 | |
| * from a pattern string instead of than separately compiling the pat
tern and | | * from a pattern string instead of than separately compiling the pat
tern and | |
| * then creating a RegexMatcher object from the pattern.</p> | | * then creating a RegexMatcher object from the pattern.</p> | |
| * | | * | |
| * @param regex The regular expression to be compiled. Note, the text re
ferred | | * @param regex The regular expression to be compiled. Note, the text re
ferred | |
| * to by this UText must not be deleted during the lifetime
of the | | * to by this UText must not be deleted during the lifetime
of the | |
| * RegexPattern object or any RegexMatcher object created f
rom it. | | * RegexPattern object or any RegexMatcher object created f
rom it. | |
| * @param flags The match mode flags to be used. | | * @param flags The match mode flags to be used. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return A regexPattern object for the compiled pattern. | | * @return A regexPattern object for the compiled pattern. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| static RegexPattern * U_EXPORT2 compile( UText *regex, | | static RegexPattern * U_EXPORT2 compile( UText *regex, | |
| uint32_t flags, | | uint32_t flags, | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the match mode flags that were used when compiling this pattern. | | * Get the match mode flags that were used when compiling this pattern. | |
| * @return the match mode flags | | * @return the match mode flags | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| | | | |
| skipping to change at line 418 | | skipping to change at line 418 | |
| * both compiles the regular expression and applies it in a single opera
tion. | | * both compiles the regular expression and applies it in a single opera
tion. | |
| * Note that if the same pattern needs to be applied repeatedly, this me
thod will be | | * Note that if the same pattern needs to be applied repeatedly, this me
thod will be | |
| * less efficient than creating and reusing a RegexMatcher object. | | * less efficient than creating and reusing a RegexMatcher object. | |
| * | | * | |
| * @param regex The regular expression | | * @param regex The regular expression | |
| * @param input The string data to be matched | | * @param input The string data to be matched | |
| * @param pe Receives the position of any syntax errors within the regul
ar expression | | * @param pe Receives the position of any syntax errors within the regul
ar expression | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return True if the regular expression exactly matches the full input
string. | | * @return True if the regular expression exactly matches the full input
string. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| static UBool U_EXPORT2 matches(UText *regex, | | static UBool U_EXPORT2 matches(UText *regex, | |
| UText *input, | | UText *input, | |
| UParseError &pe, | | UParseError &pe, | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Returns the regular expression from which this pattern was compiled.
This method will work | | * Returns the regular expression from which this pattern was compiled.
This method will work | |
| * even if the pattern was compiled from a UText. | | * even if the pattern was compiled from a UText. | |
| * | | * | |
| | | | |
| skipping to change at line 443 | | skipping to change at line 443 | |
| virtual UnicodeString pattern() const; | | virtual UnicodeString pattern() const; | |
| | | | |
| /** | | /** | |
| * Returns the regular expression from which this pattern was compiled.
This method will work | | * Returns the regular expression from which this pattern was compiled.
This method will work | |
| * even if the pattern was compiled from a UnicodeString. | | * even if the pattern was compiled from a UnicodeString. | |
| * | | * | |
| * Note: This is the original input, not a clone. If the pattern was ori
ginally compiled from a | | * Note: This is the original input, not a clone. If the pattern was ori
ginally compiled from a | |
| * UText, and that UText was modified, the returned UText may no longer
reflect the RegexPattern | | * UText, and that UText was modified, the returned UText may no longer
reflect the RegexPattern | |
| * object. | | * object. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *patternText(UErrorCode &status) const; | | virtual UText *patternText(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Split a string into fields. Somewhat like split() from Perl or Java
. | | * Split a string into fields. Somewhat like split() from Perl or Java
. | |
| * Pattern matches identify delimiters that separate the input | | * Pattern matches identify delimiters that separate the input | |
| * into fields. The input data between the delimiters becomes the | | * into fields. The input data between the delimiters becomes the | |
| * fields themselves. | | * fields themselves. | |
| * | | * | |
| * If the delimiter pattern includes capture groups, the captured text
will | | * If the delimiter pattern includes capture groups, the captured text
will | |
| | | | |
| skipping to change at line 526 | | skipping to change at line 526 | |
| * that field. This new UText is not guaranteed to be mu
table. | | * that field. This new UText is not guaranteed to be mu
table. | |
| * @param destCapacity The number of elements in the destination array
. | | * @param destCapacity The number of elements in the destination array
. | |
| * If the number of fields found is less than destCapaci
ty, the | | * If the number of fields found is less than destCapaci
ty, the | |
| * extra strings in the destination array are not altere
d. | | * extra strings in the destination array are not altere
d. | |
| * If the number of destination strings is less than the
number | | * If the number of destination strings is less than the
number | |
| * of fields, the trailing part of the input string, inc
luding any | | * of fields, the trailing part of the input string, inc
luding any | |
| * field delimiters, is placed in the last destination s
tring. | | * field delimiters, is placed in the last destination s
tring. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return The number of destination strings used. | | * @return The number of destination strings used. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int32_t split(UText *input, | | virtual int32_t split(UText *input, | |
| UText *dest[], | | UText *dest[], | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode &status) const; | | UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for the actual class. | | * ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| * | | * | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| | | | |
| skipping to change at line 653 | | skipping to change at line 653 | |
| * a RegexPattern object. Note that if several RegexMatchers need to
be | | * a RegexPattern object. Note that if several RegexMatchers need to
be | |
| * created for the same expression, it will be more efficient to | | * created for the same expression, it will be more efficient to | |
| * separately create and cache a RegexPattern object, and use | | * separately create and cache a RegexPattern object, and use | |
| * its matcher() method to create the RegexMatcher objects. | | * its matcher() method to create the RegexMatcher objects. | |
| * | | * | |
| * @param regexp The regular expression to be compiled. | | * @param regexp The regular expression to be compiled. | |
| * @param flags Regular expression options, such as case insensitive
matching. | | * @param flags Regular expression options, such as case insensitive
matching. | |
| * @see UREGEX_CASE_INSENSITIVE | | * @see UREGEX_CASE_INSENSITIVE | |
| * @param status Any errors are reported by setting this UErrorCode v
ariable. | | * @param status Any errors are reported by setting this UErrorCode v
ariable. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| RegexMatcher(UText *regexp, uint32_t flags, UErrorCode &status); | | RegexMatcher(UText *regexp, uint32_t flags, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Construct a RegexMatcher for a regular expression. | | * Construct a RegexMatcher for a regular expression. | |
| * This is a convenience method that avoids the need to explicitly cre
ate | | * This is a convenience method that avoids the need to explicitly cre
ate | |
| * a RegexPattern object. Note that if several RegexMatchers need to
be | | * a RegexPattern object. Note that if several RegexMatchers need to
be | |
| * created for the same expression, it will be more efficient to | | * created for the same expression, it will be more efficient to | |
| * separately create and cache a RegexPattern object, and use | | * separately create and cache a RegexPattern object, and use | |
| * its matcher() method to create the RegexMatcher objects. | | * its matcher() method to create the RegexMatcher objects. | |
| | | | |
| skipping to change at line 700 | | skipping to change at line 700 | |
| * pattern matching operations happen on this clone. While read-only
operations on | | * pattern matching operations happen on this clone. While read-only
operations on | |
| * the supplied text are permitted, it is critical that the underlying
string not be | | * the supplied text are permitted, it is critical that the underlying
string not be | |
| * altered or deleted before use by the regular expression operations
is complete. | | * altered or deleted before use by the regular expression operations
is complete. | |
| * | | * | |
| * @param regexp The Regular Expression to be compiled. | | * @param regexp The Regular Expression to be compiled. | |
| * @param input The string to match. The matcher retains a shallow
clone of the text. | | * @param input The string to match. The matcher retains a shallow
clone of the text. | |
| * @param flags Regular expression options, such as case insensitive
matching. | | * @param flags Regular expression options, such as case insensitive
matching. | |
| * @see UREGEX_CASE_INSENSITIVE | | * @see UREGEX_CASE_INSENSITIVE | |
| * @param status Any errors are reported by setting this UErrorCode v
ariable. | | * @param status Any errors are reported by setting this UErrorCode v
ariable. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| RegexMatcher(UText *regexp, UText *input, | | RegexMatcher(UText *regexp, UText *input, | |
| uint32_t flags, UErrorCode &status); | | uint32_t flags, UErrorCode &status); | |
| | | | |
| private: | | private: | |
| /** | | /** | |
| * Cause a compilation error if an application accidentally attempts to | | * Cause a compilation error if an application accidentally attempts to | |
| * create a matcher with a (UChar *) string as input rather than | | * create a matcher with a (UChar *) string as input rather than | |
| * a UnicodeString. Avoids a dangling reference to a temporary str
ing. | | * a UnicodeString. Avoids a dangling reference to a temporary str
ing. | |
| * <p> | | * <p> | |
| | | | |
| skipping to change at line 849 | | skipping to change at line 849 | |
| * set to the beginning of the requested group. | | * set to the beginning of the requested group. | |
| * | | * | |
| * @param dest The UText into which the input should be clone
d, or NULL to create a new UText | | * @param dest The UText into which the input should be clone
d, or NULL to create a new UText | |
| * @param group_len A reference to receive the length of the desir
ed capture group | | * @param group_len A reference to receive the length of the desir
ed capture group | |
| * @param status A reference to a UErrorCode to receive any err
ors. | | * @param status A reference to a UErrorCode to receive any err
ors. | |
| * Possible errors are U_REGEX_INVALID_STATE if
no match | | * Possible errors are U_REGEX_INVALID_STATE if
no match | |
| * has been attempted or the last match failed an
d | | * has been attempted or the last match failed an
d | |
| * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | | * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | |
| * @return dest if non-NULL, a shallow copy of the input text otherwis
e | | * @return dest if non-NULL, a shallow copy of the input text otherwis
e | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &statu
s) const; | | virtual UText *group(UText *dest, int64_t &group_len, UErrorCode &statu
s) const; | |
| | | | |
| /** | | /** | |
| * Returns a shallow clone of the entire live input string with the UT
ext current native index | | * Returns a shallow clone of the entire live input string with the UT
ext current native index | |
| * set to the beginning of the requested group. | | * set to the beginning of the requested group. | |
| * | | * | |
| * @param groupNum The capture group number. | | * @param groupNum The capture group number. | |
| * @param dest The UText into which the input should be clone
d, or NULL to create a new UText. | | * @param dest The UText into which the input should be clone
d, or NULL to create a new UText. | |
| * @param group_len A reference to receive the length of the desir
ed capture group | | * @param group_len A reference to receive the length of the desir
ed capture group | |
| * @param status A reference to a UErrorCode to receive any err
ors. | | * @param status A reference to a UErrorCode to receive any err
ors. | |
| * Possible errors are U_REGEX_INVALID_STATE if
no match | | * Possible errors are U_REGEX_INVALID_STATE if
no match | |
| * has been attempted or the last match failed an
d | | * has been attempted or the last match failed an
d | |
| * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | | * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | |
| * @return dest if non-NULL, a shallow copy of the input text otherwis
e | | * @return dest if non-NULL, a shallow copy of the input text otherwis
e | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len,
UErrorCode &status) const; | | virtual UText *group(int32_t groupNum, UText *dest, int64_t &group_len,
UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Returns a string containing the text captured by the given group | | * Returns a string containing the text captured by the given group | |
| * during the previous match operation. Group(0) is the entire match. | | * during the previous match operation. Group(0) is the entire match. | |
| * | | * | |
| * @param groupNum the capture group number | | * @param groupNum the capture group number | |
| * @param dest A mutable UText in which the matching text is
placed. | | * @param dest A mutable UText in which the matching text is
placed. | |
| * If NULL, a new UText will be created (which ma
y not be mutable). | | * If NULL, a new UText will be created (which ma
y not be mutable). | |
| | | | |
| skipping to change at line 901 | | skipping to change at line 901 | |
| * @return The (native) position in the input string of
the start of the last match. | | * @return The (native) position in the input string of
the start of the last match. | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| virtual int32_t start(UErrorCode &status) const; | | virtual int32_t start(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the start of the text matc
hed | | * Returns the index in the input string of the start of the text matc
hed | |
| * during the previous match operation. | | * during the previous match operation. | |
| * @param status a reference to a UErrorCode to receive any er
rors. | | * @param status a reference to a UErrorCode to receive any er
rors. | |
| * @return The (native) position in the input string of
the start of the last match. | | * @return The (native) position in the input string of
the start of the last match. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t start64(UErrorCode &status) const; | | virtual int64_t start64(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the start of the text matc
hed by the | | * Returns the index in the input string of the start of the text matc
hed by the | |
| * specified capture group during the previous match operation. Retu
rn -1 if | | * specified capture group during the previous match operation. Retu
rn -1 if | |
| * the capture group exists in the pattern, but was not part of the l
ast match. | | * the capture group exists in the pattern, but was not part of the l
ast match. | |
| * | | * | |
| * @param group the capture group number | | * @param group the capture group number | |
| * @param status A reference to a UErrorCode to receive any err
ors. Possible | | * @param status A reference to a UErrorCode to receive any err
ors. Possible | |
| | | | |
| skipping to change at line 931 | | skipping to change at line 931 | |
| * Returns the index in the input string of the start of the text matc
hed by the | | * Returns the index in the input string of the start of the text matc
hed by the | |
| * specified capture group during the previous match operation. Retu
rn -1 if | | * specified capture group during the previous match operation. Retu
rn -1 if | |
| * the capture group exists in the pattern, but was not part of the l
ast match. | | * the capture group exists in the pattern, but was not part of the l
ast match. | |
| * | | * | |
| * @param group the capture group number. | | * @param group the capture group number. | |
| * @param status A reference to a UErrorCode to receive any err
ors. Possible | | * @param status A reference to a UErrorCode to receive any err
ors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| * attempted or the last match failed, and | | * attempted or the last match failed, and | |
| * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | | * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number. | |
| * @return the (native) start position of substring matched by the sp
ecified group. | | * @return the (native) start position of substring matched by the sp
ecified group. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t start64(int32_t group, UErrorCode &status) const; | | virtual int64_t start64(int32_t group, UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the first character follo
wing the | | * Returns the index in the input string of the first character follo
wing the | |
| * text matched during the previous match operation. | | * text matched during the previous match operation. | |
| * | | * | |
| * @param status A reference to a UErrorCode to receive any err
ors. Possible | | * @param status A reference to a UErrorCode to receive any err
ors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| * attempted or the last match failed. | | * attempted or the last match failed. | |
| | | | |
| skipping to change at line 961 | | skipping to change at line 961 | |
| * Returns the index in the input string of the first character follo
wing the | | * Returns the index in the input string of the first character follo
wing the | |
| * text matched during the previous match operation. | | * text matched during the previous match operation. | |
| * | | * | |
| * @param status A reference to a UErrorCode to receive any err
ors. Possible | | * @param status A reference to a UErrorCode to receive any err
ors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| * attempted or the last match failed. | | * attempted or the last match failed. | |
| * @return the index of the last character matched, plus one. | | * @return the index of the last character matched, plus one. | |
| * The index value returned is a native index, co
rresponding to | | * The index value returned is a native index, co
rresponding to | |
| * code units for the underlying encoding type, f
or example, | | * code units for the underlying encoding type, f
or example, | |
| * a byte index for UTF-8. | | * a byte index for UTF-8. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t end64(UErrorCode &status) const; | | virtual int64_t end64(UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the character following t
he | | * Returns the index in the input string of the character following t
he | |
| * text matched by the specified capture group during the previous ma
tch operation. | | * text matched by the specified capture group during the previous ma
tch operation. | |
| * | | * | |
| * @param group the capture group number | | * @param group the capture group number | |
| * @param status A reference to a UErrorCode to receive any er
rors. Possible | | * @param status A reference to a UErrorCode to receive any er
rors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| | | | |
| skipping to change at line 999 | | skipping to change at line 999 | |
| * @param status A reference to a UErrorCode to receive any er
rors. Possible | | * @param status A reference to a UErrorCode to receive any er
rors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| * attempted or the last match failed and | | * attempted or the last match failed and | |
| * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number | | * U_INDEX_OUTOFBOUNDS_ERROR for a bad capture gr
oup number | |
| * @return the index of the first character following the text | | * @return the index of the first character following the text | |
| * captured by the specified group during the previous matc
h operation. | | * captured by the specified group during the previous matc
h operation. | |
| * Return -1 if the capture group exists in the pattern but
was not part of the match. | | * Return -1 if the capture group exists in the pattern but
was not part of the match. | |
| * The index value returned is a native index, correspondin
g to | | * The index value returned is a native index, correspondin
g to | |
| * code units for the underlying encoding type, for example
, | | * code units for the underlying encoding type, for example
, | |
| * a byte index for UTF8. | | * a byte index for UTF8. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t end64(int32_t group, UErrorCode &status) const; | | virtual int64_t end64(int32_t group, UErrorCode &status) const; | |
| | | | |
| /** | | /** | |
| * Resets this matcher. The effect is to remove any memory of previou
s matches, | | * Resets this matcher. The effect is to remove any memory of previou
s matches, | |
| * and to cause subsequent find() operations to begin at the begin
ning of | | * and to cause subsequent find() operations to begin at the begin
ning of | |
| * the input string. | | * the input string. | |
| * | | * | |
| * @return this RegexMatcher. | | * @return this RegexMatcher. | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| | | | |
| skipping to change at line 1060 | | skipping to change at line 1060 | |
| * Resets this matcher with a new input string. This allows instances
of RegexMatcher | | * Resets this matcher with a new input string. This allows instances
of RegexMatcher | |
| * to be reused, which is more efficient than creating a new RegexMa
tcher for | | * to be reused, which is more efficient than creating a new RegexMa
tcher for | |
| * each input string to be processed. | | * each input string to be processed. | |
| * @param input The new string on which subsequent pattern matches wil
l operate. | | * @param input The new string on which subsequent pattern matches wil
l operate. | |
| * The matcher makes a shallow clone of the given text; o
wnership of the | | * The matcher makes a shallow clone of the given text; o
wnership of the | |
| * original string remains with the caller. Because no de
ep copy of the | | * original string remains with the caller. Because no de
ep copy of the | |
| * text is made, it is essential that the caller not modi
fy the string | | * text is made, it is essential that the caller not modi
fy the string | |
| * until after regexp operations on it are done. | | * until after regexp operations on it are done. | |
| * @return this RegexMatcher. | | * @return this RegexMatcher. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual RegexMatcher &reset(UText *input); | | virtual RegexMatcher &reset(UText *input); | |
| | | | |
| /** | | /** | |
| * Set the subject text string upon which the regular expression is loo
king for matches | | * Set the subject text string upon which the regular expression is loo
king for matches | |
| * without changing any other aspect of the matching state. | | * without changing any other aspect of the matching state. | |
| * The new and previous text strings must have the same content. | | * The new and previous text strings must have the same content. | |
| * | | * | |
| * This function is intended for use in environments where ICU is opera
ting on | | * This function is intended for use in environments where ICU is opera
ting on | |
| * strings that may move around in memory. It provides a mechanism for
notifying | | * strings that may move around in memory. It provides a mechanism for
notifying | |
| | | | |
| skipping to change at line 1086 | | skipping to change at line 1086 | |
| * provided by the user. Refreshing simply drops the references to the
old text | | * provided by the user. Refreshing simply drops the references to the
old text | |
| * and replaces them with references to the new. | | * and replaces them with references to the new. | |
| * | | * | |
| * Caution: this function is normally used only by very specialized, | | * Caution: this function is normally used only by very specialized, | |
| * system-level code. One example use case is with garbage collection
that moves | | * system-level code. One example use case is with garbage collection
that moves | |
| * the text in memory. | | * the text in memory. | |
| * | | * | |
| * @param input The new (moved) text string. | | * @param input The new (moved) text string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * | | * | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status
); | | virtual RegexMatcher &refreshInputText(UText *input, UErrorCode &status
); | |
| | | | |
| private: | | private: | |
| /** | | /** | |
| * Cause a compilation error if an application accidentally attempts to | | * Cause a compilation error if an application accidentally attempts to | |
| * reset a matcher with a (UChar *) string as input rather than | | * reset a matcher with a (UChar *) string as input rather than | |
| * a UnicodeString. Avoids a dangling reference to a temporary str
ing. | | * a UnicodeString. Avoids a dangling reference to a temporary str
ing. | |
| * <p> | | * <p> | |
| * To efficiently work with UChar *strings, wrap the data in a UnicodeS
tring | | * To efficiently work with UChar *strings, wrap the data in a UnicodeS
tring | |
| | | | |
| skipping to change at line 1122 | | skipping to change at line 1122 | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| virtual const UnicodeString &input() const; | | virtual const UnicodeString &input() const; | |
| | | | |
| /** | | /** | |
| * Returns the input string being matched. This is the live input tex
t; it should not be | | * Returns the input string being matched. This is the live input tex
t; it should not be | |
| * altered or deleted. This method will work even if the input was ori
ginally supplied as | | * altered or deleted. This method will work even if the input was ori
ginally supplied as | |
| * a UnicodeString. | | * a UnicodeString. | |
| * @return the input text | | * @return the input text | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *inputText() const; | | virtual UText *inputText() const; | |
| | | | |
| /** | | /** | |
| * Returns the input string being matched, either by copying it into t
he provided | | * Returns the input string being matched, either by copying it into t
he provided | |
| * UText parameter or by returning a shallow clone of the live input.
Note that copying | | * UText parameter or by returning a shallow clone of the live input.
Note that copying | |
| * the entire input may cause significant performance and memory issue
s. | | * the entire input may cause significant performance and memory issue
s. | |
| * @param dest The UText into which the input should be copied, or NUL
L to create a new UText | | * @param dest The UText into which the input should be copied, or NUL
L to create a new UText | |
| * @param status error code | | * @param status error code | |
| * @return dest if non-NULL, a shallow copy of the input text otherwis
e | | * @return dest if non-NULL, a shallow copy of the input text otherwis
e | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *getInput(UText *dest, UErrorCode &status) const; | | virtual UText *getInput(UText *dest, UErrorCode &status) const; | |
| | | | |
| /** Sets the limits of this matcher's region. | | /** Sets the limits of this matcher's region. | |
| * The region is the part of the input string that will be searched to
find a match. | | * The region is the part of the input string that will be searched to
find a match. | |
| * Invoking this method resets the matcher, and then sets the region to
start | | * Invoking this method resets the matcher, and then sets the region to
start | |
| * at the index specified by the start parameter and end at the index s
pecified | | * at the index specified by the start parameter and end at the index s
pecified | |
| * by the end parameter. | | * by the end parameter. | |
| * | | * | |
| * Depending on the transparency and anchoring being used (see useTrans
parentBounds | | * Depending on the transparency and anchoring being used (see useTrans
parentBounds | |
| | | | |
| skipping to change at line 1167 | | skipping to change at line 1167 | |
| | | | |
| /** | | /** | |
| * Identical to region(start, limit, status) but also allows a start po
sition without | | * Identical to region(start, limit, status) but also allows a start po
sition without | |
| * resetting the region state. | | * resetting the region state. | |
| * @param regionStart The region start | | * @param regionStart The region start | |
| * @param regionLimit the limit of the region | | * @param regionLimit the limit of the region | |
| * @param startIndex The (native) index within the region bounds at wh
ich to begin searches. | | * @param startIndex The (native) index within the region bounds at wh
ich to begin searches. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * If startIndex is not within the specified region boun
ds, | | * If startIndex is not within the specified region boun
ds, | |
| * U_INDEX_OUTOFBOUNDS_ERROR is returned. | | * U_INDEX_OUTOFBOUNDS_ERROR is returned. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual RegexMatcher ®ion(int64_t regionStart, int64_t regionLimit,
int64_t startIndex, UErrorCode &status); | | virtual RegexMatcher ®ion(int64_t regionStart, int64_t regionLimit,
int64_t startIndex, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Reports the start index of this matcher's region. The searches this
matcher | | * Reports the start index of this matcher's region. The searches this
matcher | |
| * conducts are limited to finding matches within regionStart (inclusiv
e) and | | * conducts are limited to finding matches within regionStart (inclusiv
e) and | |
| * regionEnd (exclusive). | | * regionEnd (exclusive). | |
| * | | * | |
| * @return The starting (native) index of this matcher's region. | | * @return The starting (native) index of this matcher's region. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual int32_t regionStart() const; | | virtual int32_t regionStart() const; | |
| | | | |
| /** | | /** | |
| * Reports the start index of this matcher's region. The searches this
matcher | | * Reports the start index of this matcher's region. The searches this
matcher | |
| * conducts are limited to finding matches within regionStart (inclusiv
e) and | | * conducts are limited to finding matches within regionStart (inclusiv
e) and | |
| * regionEnd (exclusive). | | * regionEnd (exclusive). | |
| * | | * | |
| * @return The starting (native) index of this matcher's region. | | * @return The starting (native) index of this matcher's region. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t regionStart64() const; | | virtual int64_t regionStart64() const; | |
| | | | |
| /** | | /** | |
| * Reports the end (limit) index (exclusive) of this matcher's region.
The searches | | * Reports the end (limit) index (exclusive) of this matcher's region.
The searches | |
| * this matcher conducts are limited to finding matches within regionS
tart | | * this matcher conducts are limited to finding matches within regionS
tart | |
| * (inclusive) and regionEnd (exclusive). | | * (inclusive) and regionEnd (exclusive). | |
| * | | * | |
| * @return The ending point (native) of this matcher's region. | | * @return The ending point (native) of this matcher's region. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual int32_t regionEnd() const; | | virtual int32_t regionEnd() const; | |
| | | | |
| /** | | /** | |
| * Reports the end (limit) index (exclusive) of this matcher's region.
The searches | | * Reports the end (limit) index (exclusive) of this matcher's region.
The searches | |
| * this matcher conducts are limited to finding matches within regionSt
art | | * this matcher conducts are limited to finding matches within regionSt
art | |
| * (inclusive) and regionEnd (exclusive). | | * (inclusive) and regionEnd (exclusive). | |
| * | | * | |
| * @return The ending point (native) of this matcher's region. | | * @return The ending point (native) of this matcher's region. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int64_t regionEnd64() const; | | virtual int64_t regionEnd64() const; | |
| | | | |
| /** | | /** | |
| * Queries the transparency of region bounds for this matcher. | | * Queries the transparency of region bounds for this matcher. | |
| * See useTransparentBounds for a description of transparent and opaqu
e bounds. | | * See useTransparentBounds for a description of transparent and opaqu
e bounds. | |
| * By default, a matcher uses opaque region boundaries. | | * By default, a matcher uses opaque region boundaries. | |
| * | | * | |
| * @return TRUE if this matcher is using opaque bounds, false if it is
not. | | * @return TRUE if this matcher is using opaque bounds, false if it is
not. | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| | | | |
| skipping to change at line 1265 | | skipping to change at line 1265 | |
| * | | * | |
| * Anchoring Bounds are the default for regions. | | * Anchoring Bounds are the default for regions. | |
| * | | * | |
| * @param b TRUE if to enable anchoring bounds; FALSE to disable them. | | * @param b TRUE if to enable anchoring bounds; FALSE to disable them. | |
| * @return This Matcher | | * @return This Matcher | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual RegexMatcher &useAnchoringBounds(UBool b); | | virtual RegexMatcher &useAnchoringBounds(UBool b); | |
| | | | |
| /** | | /** | |
|
| * Return TRUE if the most recent matching operation touched the | | * Return TRUE if the most recent matching operation attempted to acce | |
| * end of the text being processed. In this case, additional input t | | ss | |
| ext could | | * additional input beyond the available input text. | |
| * change the results of that match. | | * In this case, additional input text could change the results of th | |
| | | e match. | |
| * | | * | |
| * hitEnd() is defined for both successful and unsuccessful matches. | | * hitEnd() is defined for both successful and unsuccessful matches. | |
| * In either case hitEnd() will return TRUE if if the end of the text
was | | * In either case hitEnd() will return TRUE if if the end of the text
was | |
| * reached at any point during the matching process. | | * reached at any point during the matching process. | |
| * | | * | |
| * @return TRUE if the most recent match hit the end of input | | * @return TRUE if the most recent match hit the end of input | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| virtual UBool hitEnd() const; | | virtual UBool hitEnd() const; | |
| | | | |
| | | | |
| skipping to change at line 1332 | | skipping to change at line 1332 | |
| * replacement string. The replacement string may contain references
to | | * replacement string. The replacement string may contain references
to | |
| * capture groups. | | * capture groups. | |
| * | | * | |
| * @param replacement a string containing the replacement text. | | * @param replacement a string containing the replacement text. | |
| * @param dest a mutable UText in which the results are plac
ed. | | * @param dest a mutable UText in which the results are plac
ed. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status a reference to a UErrorCode to receive any er
rors. | | * @param status a reference to a UErrorCode to receive any er
rors. | |
| * @return a string containing the results of the find a
nd replace. | | * @return a string containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it wi
ll always be used and returned. | | * If a pre-allocated UText was provided, it wi
ll always be used and returned. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode &
status); | | virtual UText *replaceAll(UText *replacement, UText *dest, UErrorCode &
status); | |
| | | | |
| /** | | /** | |
| * Replaces the first substring of the input that matches | | * Replaces the first substring of the input that matches | |
| * the pattern with the replacement string. This is a convenience | | * the pattern with the replacement string. This is a convenience | |
| * function that provides a complete find-and-replace operation. | | * function that provides a complete find-and-replace operation. | |
| * | | * | |
| * <p>This function first resets this RegexMatcher. It then scans the in
put string | | * <p>This function first resets this RegexMatcher. It then scans the in
put string | |
| * looking for a match of the pattern. Input that is not part | | * looking for a match of the pattern. Input that is not part | |
| | | | |
| skipping to change at line 1380 | | skipping to change at line 1380 | |
| * would begin) after completing a replaceFirst() is not specified.
The | | * would begin) after completing a replaceFirst() is not specified.
The | |
| * RegexMatcher should be reset before doing additional find() operat
ions.</p> | | * RegexMatcher should be reset before doing additional find() operat
ions.</p> | |
| * | | * | |
| * @param replacement a string containing the replacement text. | | * @param replacement a string containing the replacement text. | |
| * @param dest a mutable UText in which the results are plac
ed. | | * @param dest a mutable UText in which the results are plac
ed. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status a reference to a UErrorCode to receive any er
rors. | | * @param status a reference to a UErrorCode to receive any er
rors. | |
| * @return a string containing the results of the find a
nd replace. | | * @return a string containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it wi
ll always be used and returned. | | * If a pre-allocated UText was provided, it wi
ll always be used and returned. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode
&status); | | virtual UText *replaceFirst(UText *replacement, UText *dest, UErrorCode
&status); | |
| | | | |
| /** | | /** | |
| * Implements a replace operation intended to be used as part of an | | * Implements a replace operation intended to be used as part of an | |
| * incremental find-and-replace. | | * incremental find-and-replace. | |
| * | | * | |
| * <p>The input string, starting from the end of the previous replacem
ent and ending at | | * <p>The input string, starting from the end of the previous replacem
ent and ending at | |
| * the start of the current match, is appended to the destination stri
ng. Then the | | * the start of the current match, is appended to the destination stri
ng. Then the | |
| * replacement string is appended to the output string, | | * replacement string is appended to the output string, | |
| | | | |
| skipping to change at line 1439 | | skipping to change at line 1439 | |
| * the input text that matched the regexp pattern
. The replacement | | * the input text that matched the regexp pattern
. The replacement | |
| * text may contain references to captured text f
rom the input. | | * text may contain references to captured text f
rom the input. | |
| * @param status A reference to a UErrorCode to receive any err
ors. Possible | | * @param status A reference to a UErrorCode to receive any err
ors. Possible | |
| * errors are U_REGEX_INVALID_STATE if no match
has been | | * errors are U_REGEX_INVALID_STATE if no match
has been | |
| * attempted or the last match failed, and U_INDE
X_OUTOFBOUNDS_ERROR | | * attempted or the last match failed, and U_INDE
X_OUTOFBOUNDS_ERROR | |
| * if the replacement text specifies a capture gr
oup that | | * if the replacement text specifies a capture gr
oup that | |
| * does not exist in the pattern. | | * does not exist in the pattern. | |
| * | | * | |
| * @return this RegexMatcher | | * @return this RegexMatcher | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual RegexMatcher &appendReplacement(UText *dest, | | virtual RegexMatcher &appendReplacement(UText *dest, | |
| UText *replacement, UErrorCode &status); | | UText *replacement, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * As the final step in a find-and-replace operation, append the remaind
er | | * As the final step in a find-and-replace operation, append the remaind
er | |
| * of the input string, starting at the position following the last appe
ndReplacement(), | | * of the input string, starting at the position following the last appe
ndReplacement(), | |
| * to the destination string. <code>appendTail()</code> is intended to b
e invoked after one | | * to the destination string. <code>appendTail()</code> is intended to b
e invoked after one | |
| * or more invocations of the <code>RegexMatcher::appendReplacement()</c
ode>. | | * or more invocations of the <code>RegexMatcher::appendReplacement()</c
ode>. | |
| * | | * | |
| | | | |
| skipping to change at line 1467 | | skipping to change at line 1467 | |
| * As the final step in a find-and-replace operation, append the remaind
er | | * As the final step in a find-and-replace operation, append the remaind
er | |
| * of the input string, starting at the position following the last appe
ndReplacement(), | | * of the input string, starting at the position following the last appe
ndReplacement(), | |
| * to the destination string. <code>appendTail()</code> is intended to b
e invoked after one | | * to the destination string. <code>appendTail()</code> is intended to b
e invoked after one | |
| * or more invocations of the <code>RegexMatcher::appendReplacement()</c
ode>. | | * or more invocations of the <code>RegexMatcher::appendReplacement()</c
ode>. | |
| * | | * | |
| * @param dest A mutable UText to which the results of the find-and-rep
lace are appended. | | * @param dest A mutable UText to which the results of the find-and-rep
lace are appended. | |
| * Must not be NULL. | | * Must not be NULL. | |
| * @param status error cod | | * @param status error cod | |
| * @return the destination string. | | * @return the destination string. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual UText *appendTail(UText *dest, UErrorCode &status); | | virtual UText *appendTail(UText *dest, UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Split a string into fields. Somewhat like split() from Perl. | | * Split a string into fields. Somewhat like split() from Perl. | |
| * The pattern matches identify delimiters that separate the input | | * The pattern matches identify delimiters that separate the input | |
| * into fields. The input data between the matches becomes the | | * into fields. The input data between the matches becomes the | |
| * fields themselves. | | * fields themselves. | |
| * | | * | |
| * @param input The string to be split into fields. The field delimi
ters | | * @param input The string to be split into fields. The field delimi
ters | |
| | | | |
| skipping to change at line 1520 | | skipping to change at line 1520 | |
| * that field. This new UText is not guaranteed to be mu
table. | | * that field. This new UText is not guaranteed to be mu
table. | |
| * @param destCapacity The number of elements in the destination array
. | | * @param destCapacity The number of elements in the destination array
. | |
| * If the number of fields found is less than destCapaci
ty, the | | * If the number of fields found is less than destCapaci
ty, the | |
| * extra strings in the destination array are not altere
d. | | * extra strings in the destination array are not altere
d. | |
| * If the number of destination strings is less than the
number | | * If the number of destination strings is less than the
number | |
| * of fields, the trailing part of the input string, inc
luding any | | * of fields, the trailing part of the input string, inc
luding any | |
| * field delimiters, is placed in the last destination s
tring. | | * field delimiters, is placed in the last destination s
tring. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return The number of fields into which the input string was
split. | | * @return The number of fields into which the input string was
split. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual int32_t split(UText *input, | | virtual int32_t split(UText *input, | |
| UText *dest[], | | UText *dest[], | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode &status); | | UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Set a processing time limit for match operations with this Matcher. | | * Set a processing time limit for match operations with this Matcher. | |
| * | | * | |
| * Some patterns, when matching certain strings, can run in exponentia
l time. | | * Some patterns, when matching certain strings, can run in exponentia
l time. | |
| | | | |
| skipping to change at line 1632 | | skipping to change at line 1632 | |
| * Set a progress callback function for use with find operations on this
Matcher. | | * Set a progress callback function for use with find operations on this
Matcher. | |
| * During find operations, the callback will be invoked after each retur
n from a | | * During find operations, the callback will be invoked after each retur
n from a | |
| * match attempt, giving the application the opportunity to terminate a
long-running | | * match attempt, giving the application the opportunity to terminate a
long-running | |
| * find operation. | | * find operation. | |
| * | | * | |
| * @param callback A pointer to the user-supplied callback funct
ion. | | * @param callback A pointer to the user-supplied callback funct
ion. | |
| * @param context User context pointer. The value supplied at
the | | * @param context User context pointer. The value supplied at
the | |
| * time the callback function is set will be sav
ed | | * time the callback function is set will be sav
ed | |
| * and passed to the callback each time that it
is called. | | * and passed to the callback each time that it
is called. | |
| * @param status A reference to a UErrorCode to receive any er
rors. | | * @param status A reference to a UErrorCode to receive any er
rors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void setFindProgressCallback(URegexFindProgressCallback *c
allback, | | virtual void setFindProgressCallback(URegexFindProgressCallback *c
allback, | |
| const void
*context, | | const void
*context, | |
| UErrorCode
&status); | | UErrorCode
&status); | |
| | | | |
| /** | | /** | |
| * Get the find progress callback function for this URegularExpression. | | * Get the find progress callback function for this URegularExpression. | |
| * | | * | |
| * @param callback Out parameter, receives a pointer to the user
-supplied | | * @param callback Out parameter, receives a pointer to the user
-supplied | |
| * callback function. | | * callback function. | |
| * @param context Out parameter, receives the user context poin
ter that | | * @param context Out parameter, receives the user context poin
ter that | |
| * was set when uregex_setFindProgressCallback()
was called. | | * was set when uregex_setFindProgressCallback()
was called. | |
| * @param status A reference to a UErrorCode to receive any er
rors. | | * @param status A reference to a UErrorCode to receive any er
rors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| virtual void getFindProgressCallback(URegexFindProgressCallback *&
callback, | | virtual void getFindProgressCallback(URegexFindProgressCallback *&
callback, | |
| const void
*&context, | | const void
*&context, | |
| UErrorCode
&status); | | UErrorCode
&status); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * setTrace Debug function, enable/disable tracing of the matching
engine. | | * setTrace Debug function, enable/disable tracing of the matching
engine. | |
| * For internal ICU development use only. DO NO USE!!!! | | * For internal ICU development use only. DO NO USE!!!! | |
| * @internal | | * @internal | |
| */ | | */ | |
| void setTrace(UBool state); | | void setTrace(UBool state); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for this class. | | * ICU "poor man's RTTI", returns a UClassID for this class. | |
| * | | * | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| static UClassID U_EXPORT2 getStaticClassID(); | | static UClassID U_EXPORT2 getStaticClassID(); | |
| | | | |
| /** | | /** | |
| * ICU "poor man's RTTI", returns a UClassID for the actual class. | | * ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| | | | |
| skipping to change at line 1686 | | skipping to change at line 1688 | |
| RegexMatcher(); // default constructor not implemented | | RegexMatcher(); // default constructor not implemented | |
| RegexMatcher(const RegexPattern *pat); | | RegexMatcher(const RegexPattern *pat); | |
| RegexMatcher(const RegexMatcher &other); | | RegexMatcher(const RegexMatcher &other); | |
| RegexMatcher &operator =(const RegexMatcher &rhs); | | RegexMatcher &operator =(const RegexMatcher &rhs); | |
| void init(UErrorCode &status); // Common initializ
ation | | void init(UErrorCode &status); // Common initializ
ation | |
| void init2(UText *t, UErrorCode &e); // Common initialization, part 2. | | void init2(UText *t, UErrorCode &e); // Common initialization, part 2. | |
| | | | |
| friend class RegexPattern; | | friend class RegexPattern; | |
| friend class RegexCImpl; | | friend class RegexCImpl; | |
| public: | | public: | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** @internal */ | | /** @internal */ | |
| void resetPreserveRegion(); // Reset matcher state, but preserve any r
egion. | | void resetPreserveRegion(); // Reset matcher state, but preserve any r
egion. | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| private: | | private: | |
| | | | |
| // | | // | |
| // MatchAt This is the internal interface to the match engine itself
. | | // MatchAt This is the internal interface to the match engine itself
. | |
| // Match status comes back in matcher member variables. | | // Match status comes back in matcher member variables. | |
| // | | // | |
| void MatchAt(int64_t startIdx, UBool toEnd, UErrorCode
&status); | | void MatchAt(int64_t startIdx, UBool toEnd, UErrorCode
&status); | |
| inline void backTrack(int64_t &inputIdx, int32_t &patIdx); | | inline void backTrack(int64_t &inputIdx, int32_t &patIdx); | |
| UBool isWordBoundary(int64_t pos); // perform Pe
rl-like \b test | | UBool isWordBoundary(int64_t pos); // perform Pe
rl-like \b test | |
| UBool isUWordBoundary(int64_t pos); // perform RB
BI based \b test | | UBool isUWordBoundary(int64_t pos); // perform RB
BI based \b test | |
| | | | |
End of changes. 39 change blocks. |
| 43 lines changed or deleted | | 48 lines changed or added | |
|
| smpdtfmt.h | | smpdtfmt.h | |
| /* | | /* | |
|
| * Copyright (C) 1997-2011, International Business Machines Corporation and | | * Copyright (C) 1997-2012, International Business Machines Corporation and | |
| * others. All Rights Reserved. | | * others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * | | * | |
| * File SMPDTFMT.H | | * File SMPDTFMT.H | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 02/19/97 aliu Converted from java. | | * 02/19/97 aliu Converted from java. | |
| * 07/09/97 helena Make ParsePosition into a class. | | * 07/09/97 helena Make ParsePosition into a class. | |
| | | | |
| skipping to change at line 75 | | skipping to change at line 75 | |
| * pattern, all ASCII letters are reserved as pattern letters, which are de
fined | | * pattern, all ASCII letters are reserved as pattern letters, which are de
fined | |
| * as the following: | | * as the following: | |
| * <pre> | | * <pre> | |
| * \code | | * \code | |
| * Symbol Meaning Presentation Example | | * Symbol Meaning Presentation Example | |
| * ------ ------- ------------ ------- | | * ------ ------- ------------ ------- | |
| * G era designator (Text) AD | | * G era designator (Text) AD | |
| * y year (Number) 1996 | | * y year (Number) 1996 | |
| * Y year (week of year) (Number) 1997 | | * Y year (week of year) (Number) 1997 | |
| * u extended year (Number) 4601 | | * u extended year (Number) 4601 | |
|
| | | * U cyclic year name (Text,NumFallback) ren-chen (29) | |
| * Q Quarter (Text & Number) Q2 & 02 | | * Q Quarter (Text & Number) Q2 & 02 | |
| * M month in year (Text & Number) July & 07 | | * M month in year (Text & Number) July & 07 | |
| * d day in month (Number) 10 | | * d day in month (Number) 10 | |
| * h hour in am/pm (1~12) (Number) 12 | | * h hour in am/pm (1~12) (Number) 12 | |
| * H hour in day (0~23) (Number) 0 | | * H hour in day (0~23) (Number) 0 | |
| * m minute in hour (Number) 30 | | * m minute in hour (Number) 30 | |
| * s second in minute (Number) 55 | | * s second in minute (Number) 55 | |
| * S fractional second (Number) 978 | | * S fractional second (Number) 978 | |
| * E day of week (Text) Tuesday | | * E day of week (Text) Tuesday | |
| * e day of week (local 1~7) (Text & Number) Tues & 2 | | * e day of week (local 1~7) (Text & Number) Tues & 2 | |
| * D day in year (Number) 189 | | * D day in year (Number) 189 | |
| * F day of week in month (Number) 2 (2nd Wed in July) | | * F day of week in month (Number) 2 (2nd Wed in July) | |
| * w week in year (Number) 27 | | * w week in year (Number) 27 | |
| * W week in month (Number) 2 | | * W week in month (Number) 2 | |
| * a am/pm marker (Text) PM | | * a am/pm marker (Text) PM | |
| * k hour in day (1~24) (Number) 24 | | * k hour in day (1~24) (Number) 24 | |
| * K hour in am/pm (0~11) (Number) 0 | | * K hour in am/pm (0~11) (Number) 0 | |
|
| * z time zone (Time) Pacific Standard Ti | | * z time zone (Text) PST | |
| me | | * zzzz time zone (Text) Pacific Standard Ti | |
| | | me | |
| * Z time zone (RFC 822) (Number) -0800 | | * Z time zone (RFC 822) (Number) -0800 | |
|
| * v time zone (generic) (Text) Pacific Time | | * ZZZZ time zone (RFC 822) (Text & Number) GMT-08:00 | |
| * V time zone (abreviation) (Text) PT | | * ZZZZZ time zone (ISO 8601) (Text & Number) -08:00 & Z | |
| * VVVV time zone (location) (Text) United States (Los | | * v time zone (generic) (Text) PT | |
| Angeles) | | * vvvv time zone (generic) (Text) Pacific Time | |
| | | * V time zone (abreviation) (Text) PST | |
| | | * VVVV time zone (location) (Text) United States Time | |
| | | (Los Angeles) | |
| * g Julian day (Number) 2451334 | | * g Julian day (Number) 2451334 | |
| * A milliseconds in day (Number) 69540000 | | * A milliseconds in day (Number) 69540000 | |
| * q stand alone quarter (Text & Number) Q2 & 02 | | * q stand alone quarter (Text & Number) Q2 & 02 | |
| * L stand alone month (Text & Number) July & 07 | | * L stand alone month (Text & Number) July & 07 | |
| * c stand alone day of week (Text & Number) Tuesday & 2 | | * c stand alone day of week (Text & Number) Tuesday & 2 | |
| * ' escape for text (Delimiter) 'Date=' | | * ' escape for text (Delimiter) 'Date=' | |
| * '' single quote (Literal) 'o''clock' | | * '' single quote (Literal) 'o''clock' | |
| * \endcode | | * \endcode | |
| * </pre> | | * </pre> | |
| * The count of pattern letters determine the format. | | * The count of pattern letters determine the format. | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 125 | |
| * <P> | | * <P> | |
| * (Number): the minimum number of digits. Shorter numbers are zero-padded
to | | * (Number): the minimum number of digits. Shorter numbers are zero-padded
to | |
| * this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is hand
led | | * this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is hand
led | |
| * specially; that is, if the count of 'y' is 2, the Year will be truncated
to 2 digits. | | * specially; that is, if the count of 'y' is 2, the Year will be truncated
to 2 digits. | |
| * (e.g., if "yyyy" produces "1997", "yy" produces "97".) | | * (e.g., if "yyyy" produces "1997", "yy" produces "97".) | |
| * Unlike other fields, fractional seconds are padded on the right with zer
o. | | * Unlike other fields, fractional seconds are padded on the right with zer
o. | |
| * <P> | | * <P> | |
| * (Text & Number): 3 or over, use text, otherwise use number. (e.g., "M"
produces "1", | | * (Text & Number): 3 or over, use text, otherwise use number. (e.g., "M"
produces "1", | |
| * "MM" produces "01", "MMM" produces "Jan", and "MMMM" produces "January".
) | | * "MM" produces "01", "MMM" produces "Jan", and "MMMM" produces "January".
) | |
| * <P> | | * <P> | |
|
| | | * (Text,NumFallback): Behaves like Text if there is supporting data, like | |
| | | * Number otherwise. | |
| | | * <P> | |
| * Any characters in the pattern that are not in the ranges of ['a'..'z'] a
nd | | * Any characters in the pattern that are not in the ranges of ['a'..'z'] a
nd | |
| * ['A'..'Z'] will be treated as quoted text. For instance, characters | | * ['A'..'Z'] will be treated as quoted text. For instance, characters | |
| * like ':', '.', ' ', '#' and '@' will appear in the resulting time text | | * like ':', '.', ' ', '#' and '@' will appear in the resulting time text | |
| * even they are not embraced within single quotes. | | * even they are not embraced within single quotes. | |
| * <P> | | * <P> | |
| * A pattern containing any invalid pattern letter will result in a failing | | * A pattern containing any invalid pattern letter will result in a failing | |
| * UErrorCode result during formatting or parsing. | | * UErrorCode result during formatting or parsing. | |
| * <P> | | * <P> | |
| * Examples using the US locale: | | * Examples using the US locale: | |
| * <pre> | | * <pre> | |
| | | | |
| skipping to change at line 183 | | skipping to change at line 191 | |
| * relative to some century. It does this by adjusting dates to be | | * relative to some century. It does this by adjusting dates to be | |
| * within 80 years before and 20 years after the time the SimpleDateFormat | | * within 80 years before and 20 years after the time the SimpleDateFormat | |
| * instance is created. For example, using a pattern of "MM/dd/yy" and a | | * instance is created. For example, using a pattern of "MM/dd/yy" and a | |
| * SimpleDateFormat instance created on Jan 1, 1997, the string | | * SimpleDateFormat instance created on Jan 1, 1997, the string | |
| * "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/
64" | | * "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/
64" | |
| * would be interpreted as May 4, 1964. | | * would be interpreted as May 4, 1964. | |
| * During parsing, only strings consisting of exactly two digits, as define
d by | | * During parsing, only strings consisting of exactly two digits, as define
d by | |
| * <code>Unicode::isDigit()</code>, will be parsed into the default century
. | | * <code>Unicode::isDigit()</code>, will be parsed into the default century
. | |
| * Any other numeric string, such as a one digit string, a three or more di
git | | * Any other numeric string, such as a one digit string, a three or more di
git | |
| * string, or a two digit string that isn't all digits (for example, "-1"),
is | | * string, or a two digit string that isn't all digits (for example, "-1"),
is | |
|
| * interpreted literally. So "01/02/3" or "01/02/003" are parsed, using th | | * interpreted literally. So "01/02/3" or "01/02/003" are parsed (for the | |
| e | | * Gregorian calendar), using the same pattern, as Jan 2, 3 AD. Likewise ( | |
| * same pattern, as Jan 2, 3 AD. Likewise, "01/02/-3" is parsed as Jan 2, | | but | |
| 4 BC. | | * only in lenient parse mode, the default) "01/02/-3" is parsed as Jan 2, | |
| | | 4 BC. | |
| * | | * | |
| * <p> | | * <p> | |
| * If the year pattern has more than two 'y' characters, the year is | | * If the year pattern has more than two 'y' characters, the year is | |
| * interpreted literally, regardless of the number of digits. So using the | | * interpreted literally, regardless of the number of digits. So using the | |
| * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. | | * pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. | |
| * | | * | |
| * <p> | | * <p> | |
| * When numeric fields abut one another directly, with no intervening delim
iter | | * When numeric fields abut one another directly, with no intervening delim
iter | |
| * characters, they constitute a run of abutting numeric fields. Such runs
are | | * characters, they constitute a run of abutting numeric fields. Such runs
are | |
| * parsed specially. For example, the format "HHmmss" parses the input tex
t | | * parsed specially. For example, the format "HHmmss" parses the input tex
t | |
| | | | |
| skipping to change at line 393 | | skipping to change at line 402 | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param pos The formatting position. On input: an alignment fie
ld, | | * @param pos The formatting position. On input: an alignment fie
ld, | |
| * if desired. On output: the offsets of the alignment
field. | | * if desired. On output: the offsets of the alignment
field. | |
| * @return Reference to 'appendTo' parameter. | | * @return Reference to 'appendTo' parameter. | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| virtual UnicodeString& format( Calendar& cal, | | virtual UnicodeString& format( Calendar& cal, | |
| UnicodeString& appendTo, | | UnicodeString& appendTo, | |
| FieldPosition& pos) const; | | FieldPosition& pos) const; | |
| | | | |
|
| | | /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since | |
| | | it is virtual */ | |
| | | /** | |
| | | * Format a date or time, which is the standard millis since 24:00 GMT, | |
| | | Jan | |
| | | * 1, 1970. Overrides DateFormat pure virtual method. | |
| | | * <P> | |
| | | * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | |
| | | * 1996.07.10 AD at 15:08:56 PDT | |
| | | * | |
| | | * @param cal Calendar set to the date and time to be formatted | |
| | | * into a date/time string. | |
| | | * @param types Array of UDateFormatContextTypes for which the corr | |
| | | esponding | |
| | | * value specified in the next parameter should overri | |
| | | de the | |
| | | * formatter's default value for this call (this does | |
| | | not | |
| | | * change the default value). | |
| | | * @param values Array of UDateFormatContextValues corresponding 1-1 | |
| | | to the | |
| | | * UDateFormatContextTypes in the previous parameter. | |
| | | * @param typesAndValuesCount Number of elements in the types and value | |
| | | s | |
| | | * arrays. | |
| | | * @param appendTo Output parameter to receive result. | |
| | | * Result is appended to existing contents. | |
| | | * @param pos The formatting position. On input: an alignment fie | |
| | | ld, | |
| | | * if desired. On output: the offsets of the alignment | |
| | | field. | |
| | | * @return Reference to 'appendTo' parameter. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | virtual UnicodeString& format( Calendar& cal, | |
| | | const UDateFormatContextType* types, | |
| | | const UDateFormatContextValue* values, | |
| | | int32_t typesAndValuesCount, | |
| | | UnicodeString& appendTo, | |
| | | FieldPosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Format a date or time, which is the standard millis since 24:00 GMT,
Jan | | * Format a date or time, which is the standard millis since 24:00 GMT,
Jan | |
| * 1, 1970. Overrides DateFormat pure virtual method. | | * 1, 1970. Overrides DateFormat pure virtual method. | |
| * <P> | | * <P> | |
| * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | | * Example: using the US locale: "yyyy.MM.dd e 'at' HH:mm:ss zzz" ->> | |
| * 1996.07.10 AD at 15:08:56 PDT | | * 1996.07.10 AD at 15:08:56 PDT | |
| * | | * | |
| * @param cal Calendar set to the date and time to be formatted | | * @param cal Calendar set to the date and time to be formatted | |
| * into a date/time string. | | * into a date/time string. | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| | | | |
| skipping to change at line 528 | | skipping to change at line 569 | |
| | | | |
| /** | | /** | |
| * Parse a date/time string beginning at the given parse position. For | | * Parse a date/time string beginning at the given parse position. For | |
| * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | | * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | |
| * that is equivalent to Date(837039928046). | | * that is equivalent to Date(837039928046). | |
| * <P> | | * <P> | |
| * By default, parsing is lenient: If the input is not in the form used
by | | * By default, parsing is lenient: If the input is not in the form used
by | |
| * this object's format method but can still be parsed as a date, then
the | | * this object's format method but can still be parsed as a date, then
the | |
| * parse succeeds. Clients may insist on strict adherence to the format
by | | * parse succeeds. Clients may insist on strict adherence to the format
by | |
| * calling setLenient(false). | | * calling setLenient(false). | |
|
| | | * @see DateFormat::setLenient(boolean) | |
| * | | * | |
| * @param text The date/time string to be parsed | | * @param text The date/time string to be parsed | |
|
| * @param cal a Calendar set to the date and time to be formatted | | * @param cal A Calendar set on input to the date and time to be used | |
| * into a date/time string. | | for | |
| | | * missing values in the date/time string being parsed, an | |
| | | d set | |
| | | * on output to the parsed date/time. When the calendar ty | |
| | | pe is | |
| | | * different from the internal calendar held by this Simpl | |
| | | eDateFormat | |
| | | * instance, the internal calendar will be cloned to a wor | |
| | | k | |
| | | * calendar set to the same milliseconds and time zone as | |
| | | the | |
| | | * cal parameter, field values will be parsed based on the | |
| | | work | |
| | | * calendar, then the result (milliseconds and time zone) | |
| | | will | |
| | | * be set in this calendar. | |
| * @param pos On input, the position at which to start parsing; on | | * @param pos On input, the position at which to start parsing; on | |
| * output, the position at which parsing terminated, or th
e | | * output, the position at which parsing terminated, or th
e | |
| * start position if the parse failed. | | * start position if the parse failed. | |
| * @return A valid UDate if the input could be parsed. | | * @return A valid UDate if the input could be parsed. | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| virtual void parse( const UnicodeString& text, | | virtual void parse( const UnicodeString& text, | |
| Calendar& cal, | | Calendar& cal, | |
| ParsePosition& pos) const; | | ParsePosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Parse a date/time string starting at the given parse position. For | | * Parse a date/time string starting at the given parse position. For | |
| * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | | * example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Da
te | |
| * that is equivalent to Date(837039928046). | | * that is equivalent to Date(837039928046). | |
| * <P> | | * <P> | |
| * By default, parsing is lenient: If the input is not in the form used
by | | * By default, parsing is lenient: If the input is not in the form used
by | |
| * this object's format method but can still be parsed as a date, then
the | | * this object's format method but can still be parsed as a date, then
the | |
| * parse succeeds. Clients may insist on strict adherence to the format
by | | * parse succeeds. Clients may insist on strict adherence to the format
by | |
| * calling setLenient(false). | | * calling setLenient(false). | |
|
| * | | | |
| * @see DateFormat::setLenient(boolean) | | * @see DateFormat::setLenient(boolean) | |
|
| | | * <P> | |
| | | * Note that the normal date formats associated with some calendars - s | |
| | | uch | |
| | | * as the Chinese lunar calendar - do not specify enough fields to enab | |
| | | le | |
| | | * dates to be parsed unambiguously. In the case of the Chinese lunar | |
| | | * calendar, while the year within the current 60-year cycle is specifi | |
| | | ed, | |
| | | * the number of such cycles since the start date of the calendar (in t | |
| | | he | |
| | | * ERA field of the Calendar object) is not normally part of the format | |
| | | , | |
| | | * and parsing may assume the wrong era. For cases such as this it is | |
| | | * recommended that clients parse using the method | |
| | | * parse(const UnicodeString&, Calendar& cal, ParsePosition&) | |
| | | * with the Calendar passed in set to the current date, or to a date | |
| | | * within the era/cycle that should be assumed if absent in the format. | |
| * | | * | |
| * @param text The date/time string to be parsed | | * @param text The date/time string to be parsed | |
| * @param pos On input, the position at which to start parsing; on | | * @param pos On input, the position at which to start parsing; on | |
| * output, the position at which parsing terminated, or th
e | | * output, the position at which parsing terminated, or th
e | |
| * start position if the parse failed. | | * start position if the parse failed. | |
| * @return A valid UDate if the input could be parsed. | | * @return A valid UDate if the input could be parsed. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UDate parse( const UnicodeString& text, | | UDate parse( const UnicodeString& text, | |
| ParsePosition& pos) const; | | ParsePosition& pos) const; | |
| | | | |
| /** | | /** | |
| * Parse a date/time string. For example, a time text "07/10/96 4:5 PM,
PDT" | | * Parse a date/time string. For example, a time text "07/10/96 4:5 PM,
PDT" | |
| * will be parsed into a UDate that is equivalent to Date(837039928046)
. | | * will be parsed into a UDate that is equivalent to Date(837039928046)
. | |
| * Parsing begins at the beginning of the string and proceeds as far as | | * Parsing begins at the beginning of the string and proceeds as far as | |
| * possible. Assuming no parse errors were encountered, this function | | * possible. Assuming no parse errors were encountered, this function | |
| * doesn't return any information about how much of the string was cons
umed | | * doesn't return any information about how much of the string was cons
umed | |
| * by the parsing. If you need that information, use the version of | | * by the parsing. If you need that information, use the version of | |
| * parse() that takes a ParsePosition. | | * parse() that takes a ParsePosition. | |
|
| | | * <P> | |
| | | * By default, parsing is lenient: If the input is not in the form used | |
| | | by | |
| | | * this object's format method but can still be parsed as a date, then | |
| | | the | |
| | | * parse succeeds. Clients may insist on strict adherence to the format | |
| | | by | |
| | | * calling setLenient(false). | |
| | | * @see DateFormat::setLenient(boolean) | |
| | | * <P> | |
| | | * Note that the normal date formats associated with some calendars - s | |
| | | uch | |
| | | * as the Chinese lunar calendar - do not specify enough fields to enab | |
| | | le | |
| | | * dates to be parsed unambiguously. In the case of the Chinese lunar | |
| | | * calendar, while the year within the current 60-year cycle is specifi | |
| | | ed, | |
| | | * the number of such cycles since the start date of the calendar (in t | |
| | | he | |
| | | * ERA field of the Calendar object) is not normally part of the format | |
| | | , | |
| | | * and parsing may assume the wrong era. For cases such as this it is | |
| | | * recommended that clients parse using the method | |
| | | * parse(const UnicodeString&, Calendar& cal, ParsePosition&) | |
| | | * with the Calendar passed in set to the current date, or to a date | |
| | | * within the era/cycle that should be assumed if absent in the format. | |
| * | | * | |
|
| * @param text The date/time string to be parsed | | * @param text The date/time string to be parsed into a UDate value. | |
| * @param status Filled in with U_ZERO_ERROR if the parse was successfu
l, and with | | * @param status Filled in with U_ZERO_ERROR if the parse was successfu
l, and with | |
| * an error value if there was a parse error. | | * an error value if there was a parse error. | |
| * @return A valid UDate if the input could be parsed. | | * @return A valid UDate if the input could be parsed. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UDate parse( const UnicodeString& text, | | virtual UDate parse( const UnicodeString& text, | |
| UErrorCode& status) const; | | UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Set the start UDate used to interpret two-digit year strings. | | * Set the start UDate used to interpret two-digit year strings. | |
| | | | |
| skipping to change at line 729 | | skipping to change at line 807 | |
| * Set the calendar to be used by this date format. Initially, the defa
ult | | * Set the calendar to be used by this date format. Initially, the defa
ult | |
| * calendar for the specified or default locale is used. The caller sh
ould | | * calendar for the specified or default locale is used. The caller sh
ould | |
| * not delete the Calendar object after it is adopted by this call. | | * not delete the Calendar object after it is adopted by this call. | |
| * Adopting a new calendar will change to the default symbols. | | * Adopting a new calendar will change to the default symbols. | |
| * | | * | |
| * @param calendarToAdopt Calendar object to be adopted. | | * @param calendarToAdopt Calendar object to be adopted. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual void adoptCalendar(Calendar* calendarToAdopt); | | virtual void adoptCalendar(Calendar* calendarToAdopt); | |
| | | | |
|
| | | /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since | |
| | | it is virtual */ | |
| | | /** | |
| | | * Set the formatter's default value for a particular context type, | |
| | | * such as UDAT_CAPITALIZATION. | |
| | | * @param type The context type for which the default value should be s | |
| | | et. | |
| | | * @param value The default value to set for the specified context type | |
| | | . | |
| | | * @param status Input/output status. If at entry this indicates a fail | |
| | | ure | |
| | | * status, the function will do nothing; otherwise this w | |
| | | ill be | |
| | | * updated with any new status from the function. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | virtual void setDefaultContext(UDateFormatContextType type, UDateFormat | |
| | | ContextValue value, | |
| | | UErrorCode& status); | |
| | | | |
| | | /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since | |
| | | it is virtual */ | |
| | | /** | |
| | | * Get the formatter's default value for a particular context type, | |
| | | * such as UDAT_CAPITALIZATION. | |
| | | * @param type The context type for which the default value should be o | |
| | | btained. | |
| | | * @param status Input/output status. If at entry this indicates a fail | |
| | | ure | |
| | | * status, the function will do nothing; otherwise this w | |
| | | ill be | |
| | | * updated with any new status from the function. | |
| | | * @return The current default value for the specified context type. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | virtual int32_t getDefaultContext(UDateFormatContextType type, UErrorCo | |
| | | de& status) const; | |
| | | | |
| | | #ifndef U_HIDE_INTERNAL_API | |
| | | /** | |
| | | * Sets the TimeZoneFormat to be used by this date/time formatter. | |
| | | * The caller should not delete the TimeZoneFormat object after | |
| | | * it is adopted by this call. | |
| | | * @param timeZoneFormatToAdopt The TimeZoneFormat object to be adopted | |
| | | . | |
| | | * @internal ICU 49 technology preview | |
| | | */ | |
| | | virtual void adoptTimeZoneFormat(TimeZoneFormat* timeZoneFormatToAdopt) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * Sets the TimeZoneFormat to be used by this date/time formatter. | |
| | | * @param newTimeZoneFormat The TimeZoneFormat object to copy. | |
| | | * @internal ICU 49 technology preview | |
| | | */ | |
| | | virtual void setTimeZoneFormat(const TimeZoneFormat& newTimeZoneFormat) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * Gets the time zone format object associated with this date/time form | |
| | | atter. | |
| | | * @return the time zone format associated with this date/time formatte | |
| | | r. | |
| | | * @internal ICU 49 technology preview | |
| | | */ | |
| | | virtual const TimeZoneFormat* getTimeZoneFormat(void) const; | |
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * This is for ICU internal use only. Please do not use. | | * This is for ICU internal use only. Please do not use. | |
| * Check whether the 'field' is smaller than all the fields covered in | | * Check whether the 'field' is smaller than all the fields covered in | |
| * pattern, return TRUE if it is. The sequence of calendar field, | | * pattern, return TRUE if it is. The sequence of calendar field, | |
| * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,
... | | * from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,
... | |
| * @param field the calendar field need to check against | | * @param field the calendar field need to check against | |
| * @return TRUE if the 'field' is smaller than all the fields | | * @return TRUE if the 'field' is smaller than all the fields | |
| * covered in pattern. FALSE otherwise. | | * covered in pattern. FALSE otherwise. | |
| * @internal ICU 4.0 | | * @internal ICU 4.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 764 | | skipping to change at line 895 | |
| | | | |
| /** | | /** | |
| * This is for ICU internal use only. Please do not use. | | * This is for ICU internal use only. Please do not use. | |
| * Get the locale of this simple date formatter. | | * Get the locale of this simple date formatter. | |
| * It is used in DateIntervalFormat. | | * It is used in DateIntervalFormat. | |
| * | | * | |
| * @return locale in this simple date formatter | | * @return locale in this simple date formatter | |
| * @internal ICU 4.0 | | * @internal ICU 4.0 | |
| */ | | */ | |
| const Locale& getSmpFmtLocale(void) const; | | const Locale& getSmpFmtLocale(void) const; | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| private: | | private: | |
| friend class DateFormat; | | friend class DateFormat; | |
| | | | |
| void initializeDefaultCentury(void); | | void initializeDefaultCentury(void); | |
| | | | |
| SimpleDateFormat(); // default constructor not implemented | | SimpleDateFormat(); // default constructor not implemented | |
| | | | |
| /** | | /** | |
| * Used by the DateFormat factory methods to construct a SimpleDateForm
at. | | * Used by the DateFormat factory methods to construct a SimpleDateForm
at. | |
| | | | |
| skipping to change at line 795 | | skipping to change at line 927 | |
| * This is an internal method, called by DateFormat. It should never f
ail. | | * This is an internal method, called by DateFormat. It should never f
ail. | |
| * @param locale the given locale. | | * @param locale the given locale. | |
| * @param status Output param set to success/failure code on | | * @param status Output param set to success/failure code on | |
| * exit. | | * exit. | |
| */ | | */ | |
| SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa
ult pattern | | SimpleDateFormat(const Locale& locale, UErrorCode& status); // Use defa
ult pattern | |
| | | | |
| /** | | /** | |
| * Hook called by format(... FieldPosition& ...) and format(...FieldPos
itionIterator&...) | | * Hook called by format(... FieldPosition& ...) and format(...FieldPos
itionIterator&...) | |
| */ | | */ | |
|
| UnicodeString& _format(Calendar& cal, UnicodeString& appendTo, FieldPos | | UnicodeString& _format(Calendar& cal, UDateFormatContextValue capitaliz | |
| itionHandler& handler, | | ationContext, | |
| UErrorCode& status) const; | | UnicodeString& appendTo, FieldPositionHandler& h | |
| | | andler, UErrorCode& status) const; | |
| | | | |
| /** | | /** | |
| * Called by format() to format a single field. | | * Called by format() to format a single field. | |
| * | | * | |
| * @param appendTo Output parameter to receive result. | | * @param appendTo Output parameter to receive result. | |
| * Result is appended to existing contents. | | * Result is appended to existing contents. | |
| * @param ch The format character we encountered in the pattern. | | * @param ch The format character we encountered in the pattern. | |
| * @param count Number of characters in the current pattern symbol
(e.g., | | * @param count Number of characters in the current pattern symbol
(e.g., | |
| * "yyyy" in the pattern would result in a call to thi
s function | | * "yyyy" in the pattern would result in a call to thi
s function | |
| * with ch equal to 'y' and count equal to 4) | | * with ch equal to 'y' and count equal to 4) | |
|
| | | * @param capitalizationContext Capitalization context for this date fo | |
| | | rmat. | |
| | | * @param fieldNum Zero-based numbering of current field within the ov | |
| | | erall format. | |
| * @param handler Records information about field positions. | | * @param handler Records information about field positions. | |
| * @param cal Calendar to use | | * @param cal Calendar to use | |
| * @param status Receives a status code, which will be U_ZERO_ERROR
if the operation | | * @param status Receives a status code, which will be U_ZERO_ERROR
if the operation | |
| * succeeds. | | * succeeds. | |
| */ | | */ | |
| void subFormat(UnicodeString &appendTo, | | void subFormat(UnicodeString &appendTo, | |
| UChar ch, | | UChar ch, | |
| int32_t count, | | int32_t count, | |
|
| | | UDateFormatContextValue capitalizationContext, | |
| | | int32_t fieldNum, | |
| FieldPositionHandler& handler, | | FieldPositionHandler& handler, | |
| Calendar& cal, | | Calendar& cal, | |
| UErrorCode& status) const; // in case of illegal argumen
t | | UErrorCode& status) const; // in case of illegal argumen
t | |
| | | | |
| /** | | /** | |
| * Used by subFormat() to format a numeric value. | | * Used by subFormat() to format a numeric value. | |
| * Appends to toAppendTo a string representation of "value" | | * Appends to toAppendTo a string representation of "value" | |
| * having a number of digits between "minDigits" and | | * having a number of digits between "minDigits" and | |
| * "maxDigits". Uses the DateFormat's NumberFormat. | | * "maxDigits". Uses the DateFormat's NumberFormat. | |
| * | | * | |
| | | | |
| skipping to change at line 887 | | skipping to change at line 1023 | |
| */ | | */ | |
| void initialize(const Locale& locale, UErrorCode& status); | | void initialize(const Locale& locale, UErrorCode& status); | |
| | | | |
| /** | | /** | |
| * Private code-size reduction function used by subParse. | | * Private code-size reduction function used by subParse. | |
| * @param text the time text being parsed. | | * @param text the time text being parsed. | |
| * @param start where to start parsing. | | * @param start where to start parsing. | |
| * @param field the date field being parsed. | | * @param field the date field being parsed. | |
| * @param stringArray the string array to parsed. | | * @param stringArray the string array to parsed. | |
| * @param stringArrayCount the size of the array. | | * @param stringArrayCount the size of the array. | |
|
| | | * @param monthPattern pointer to leap month pattern, or NULL if none. | |
| * @param cal a Calendar set to the date and time to be formatted | | * @param cal a Calendar set to the date and time to be formatted | |
| * into a date/time string. | | * into a date/time string. | |
| * @return the new start position if matching succeeded; a negative num
ber | | * @return the new start position if matching succeeded; a negative num
ber | |
| * indicating matching failure, otherwise. | | * indicating matching failure, otherwise. | |
| */ | | */ | |
| int32_t matchString(const UnicodeString& text, int32_t start, UCalendar
DateFields field, | | int32_t matchString(const UnicodeString& text, int32_t start, UCalendar
DateFields field, | |
|
| const UnicodeString* stringArray, int32_t stringArr | | const UnicodeString* stringArray, int32_t stringArr | |
| ayCount, Calendar& cal) const; | | ayCount, | |
| | | const UnicodeString* monthPattern, Calendar& cal) c | |
| | | onst; | |
| | | | |
| /** | | /** | |
| * Private code-size reduction function used by subParse. | | * Private code-size reduction function used by subParse. | |
| * @param text the time text being parsed. | | * @param text the time text being parsed. | |
| * @param start where to start parsing. | | * @param start where to start parsing. | |
| * @param field the date field being parsed. | | * @param field the date field being parsed. | |
| * @param stringArray the string array to parsed. | | * @param stringArray the string array to parsed. | |
| * @param stringArrayCount the size of the array. | | * @param stringArrayCount the size of the array. | |
| * @param cal a Calendar set to the date and time to be formatted | | * @param cal a Calendar set to the date and time to be formatted | |
| * into a date/time string. | | * into a date/time string. | |
| | | | |
| skipping to change at line 940 | | skipping to change at line 1078 | |
| * @param start where to start parsing. | | * @param start where to start parsing. | |
| * @param ch the pattern character for the date field text to be parsed
. | | * @param ch the pattern character for the date field text to be parsed
. | |
| * @param count the count of a pattern character. | | * @param count the count of a pattern character. | |
| * @param obeyCount if true then the count is strictly obeyed. | | * @param obeyCount if true then the count is strictly obeyed. | |
| * @param allowNegative | | * @param allowNegative | |
| * @param ambiguousYear If true then the two-digit year == the default
start year. | | * @param ambiguousYear If true then the two-digit year == the default
start year. | |
| * @param saveHebrewMonth Used to hang onto month until year is known. | | * @param saveHebrewMonth Used to hang onto month until year is known. | |
| * @param cal a Calendar set to the date and time to be formatted | | * @param cal a Calendar set to the date and time to be formatted | |
| * into a date/time string. | | * into a date/time string. | |
| * @param patLoc | | * @param patLoc | |
|
| | | * @param numericLeapMonthFormatter If non-null, used to parse numeric
leap months. | |
| * @return the new start position if matching succeeded; a negative num
ber | | * @return the new start position if matching succeeded; a negative num
ber | |
| * indicating matching failure, otherwise. | | * indicating matching failure, otherwise. | |
| */ | | */ | |
| int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i
nt32_t count, | | int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, i
nt32_t count, | |
| UBool obeyCount, UBool allowNegative, UBool ambiguousY
ear[], int32_t& saveHebrewMonth, Calendar& cal, | | UBool obeyCount, UBool allowNegative, UBool ambiguousY
ear[], int32_t& saveHebrewMonth, Calendar& cal, | |
|
| int32_t patLoc) const; | | int32_t patLoc, MessageFormat * numericLeapMonthFormat
ter) const; | |
| | | | |
| void parseInt(const UnicodeString& text, | | void parseInt(const UnicodeString& text, | |
| Formattable& number, | | Formattable& number, | |
| ParsePosition& pos, | | ParsePosition& pos, | |
| UBool allowNegative, | | UBool allowNegative, | |
| NumberFormat *fmt) const; | | NumberFormat *fmt) const; | |
| | | | |
| void parseInt(const UnicodeString& text, | | void parseInt(const UnicodeString& text, | |
| Formattable& number, | | Formattable& number, | |
| int32_t maxDigits, | | int32_t maxDigits, | |
| | | | |
| skipping to change at line 1016 | | skipping to change at line 1155 | |
| */ | | */ | |
| int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) c
onst; | | int32_t skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) c
onst; | |
| | | | |
| /** | | /** | |
| * Skip over a run of zero or more isUWhiteSpace() characters at pos | | * Skip over a run of zero or more isUWhiteSpace() characters at pos | |
| * in text. | | * in text. | |
| */ | | */ | |
| int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const; | | int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const; | |
| | | | |
| /** | | /** | |
|
| * Private methods for formatting/parsing GMT string | | | |
| */ | | | |
| void appendGMT(NumberFormat *currentNumberFormat,UnicodeString &appendT | | | |
| o, Calendar& cal, UErrorCode& status) const; | | | |
| void formatGMTDefault(NumberFormat *currentNumberFormat,UnicodeString & | | | |
| appendTo, int32_t offset) const; | | | |
| int32_t parseGMT(const UnicodeString &text, ParsePosition &pos) const; | | | |
| int32_t parseGMTDefault(const UnicodeString &text, ParsePosition &pos) | | | |
| const; | | | |
| UBool isDefaultGMTFormat() const; | | | |
| | | | |
| void formatRFC822TZ(UnicodeString &appendTo, int32_t offset) const; | | | |
| | | | |
| /** | | | |
| * Initialize MessageFormat instances used for GMT formatting/parsing | | | |
| */ | | | |
| void initGMTFormatters(UErrorCode &status); | | | |
| | | | |
| /** | | | |
| * Initialize NumberFormat instances used for numbering system override
s. | | * Initialize NumberFormat instances used for numbering system override
s. | |
| */ | | */ | |
| void initNumberFormatters(const Locale &locale,UErrorCode &status); | | void initNumberFormatters(const Locale &locale,UErrorCode &status); | |
| | | | |
| /** | | /** | |
| * Get the numbering system to be used for a particular field. | | * Get the numbering system to be used for a particular field. | |
| */ | | */ | |
| NumberFormat * getNumberFormatByIndex(UDateFormatField index) const; | | NumberFormat * getNumberFormatByIndex(UDateFormatField index) const; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 1116 | | skipping to change at line 1239 | |
| * defaultCenturyStartYear are only used if explicitly set by the user | | * defaultCenturyStartYear are only used if explicitly set by the user | |
| * through the API method parseAmbiguousDatesAsAfter(). | | * through the API method parseAmbiguousDatesAsAfter(). | |
| */ | | */ | |
| UDate fDefaultCenturyStart; | | UDate fDefaultCenturyStart; | |
| | | | |
| /** | | /** | |
| * See documentation for defaultCenturyStart. | | * See documentation for defaultCenturyStart. | |
| */ | | */ | |
| /*transient*/ int32_t fDefaultCenturyStartYear; | | /*transient*/ int32_t fDefaultCenturyStartYear; | |
| | | | |
|
| enum ParsedTZType { | | int32_t tztype; // here to avoid api change | |
| TZTYPE_UNK, | | | |
| TZTYPE_STD, | | | |
| TZTYPE_DST | | | |
| }; | | | |
| | | | |
| ParsedTZType tztype; // here to avoid api change | | | |
| | | | |
| typedef struct NSOverride { | | typedef struct NSOverride { | |
| NumberFormat *nf; | | NumberFormat *nf; | |
| int32_t hash; | | int32_t hash; | |
| NSOverride *next; | | NSOverride *next; | |
| } NSOverride; | | } NSOverride; | |
| | | | |
|
| /* | | | |
| * MessageFormat instances used for localized GMT format | | | |
| */ | | | |
| enum { | | | |
| kGMTNegativeHMS = 0, | | | |
| kGMTNegativeHM, | | | |
| kGMTPositiveHMS, | | | |
| kGMTPositiveHM, | | | |
| | | | |
| kNumGMTFormatters | | | |
| }; | | | |
| enum { | | | |
| kGMTNegativeHMSMinLenIdx = 0, | | | |
| kGMTPositiveHMSMinLenIdx, | | | |
| | | | |
| kNumGMTFormatMinLengths | | | |
| }; | | | |
| | | | |
| MessageFormat **fGMTFormatters; | | | |
| // If a GMT hour format has a second field, we need to make sure | | | |
| // the length of input localized GMT string must match the expected | | | |
| // length. Otherwise, sub DateForamt handling offset format may | | | |
| // unexpectedly success parsing input GMT string without second field. | | | |
| // See #6880 about this issue. | | | |
| // TODO: SimpleDateFormat should provide an option to invalidate | | | |
| // | | | |
| int32_t fGMTFormatHmsMinLen[kNumGMTFormatMinLengths]; | | | |
| | | | |
| NumberFormat **fNumberFormatters; | | NumberFormat **fNumberFormatters; | |
| | | | |
| NSOverride *fOverrideList; | | NSOverride *fOverrideList; | |
| | | | |
| UBool fHaveDefaultCentury; | | UBool fHaveDefaultCentury; | |
|
| | | | |
| | | UDateFormatContextValue fDefaultCapitalizationContext; | |
| }; | | }; | |
| | | | |
| inline UDate | | inline UDate | |
| SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const | | SimpleDateFormat::get2DigitYearStart(UErrorCode& /*status*/) const | |
| { | | { | |
| return fDefaultCenturyStart; | | return fDefaultCenturyStart; | |
| } | | } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| SimpleDateFormat::format(const Formattable& obj, | | SimpleDateFormat::format(const Formattable& obj, | |
| | | | |
End of changes. 26 change blocks. |
| 75 lines changed or deleted | | 213 lines changed or added | |
|
| timezone.h | | timezone.h | |
| /************************************************************************* | | /************************************************************************* | |
|
| * Copyright (c) 1997-2011, International Business Machines Corporation | | * Copyright (c) 1997-2012, International Business Machines Corporation | |
| * and others. All Rights Reserved. | | * and others. All Rights Reserved. | |
| ************************************************************************** | | ************************************************************************** | |
| * | | * | |
| * File TIMEZONE.H | | * File TIMEZONE.H | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 04/21/97 aliu Overhauled header. | | * 04/21/97 aliu Overhauled header. | |
| * 07/09/97 helena Changed createInstance to createDefault. | | * 07/09/97 helena Changed createInstance to createDefault. | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 70 | |
| * You can also get a <code>TimeZone</code> using <code>createTimeZone</cod
e> along | | * You can also get a <code>TimeZone</code> using <code>createTimeZone</cod
e> along | |
| * with a time zone ID. For instance, the time zone ID for the US Pacific | | * with a time zone ID. For instance, the time zone ID for the US Pacific | |
| * Time zone is "America/Los_Angeles". So, you can get a Pacific Time <code
>TimeZone</code> object | | * Time zone is "America/Los_Angeles". So, you can get a Pacific Time <code
>TimeZone</code> object | |
| * with: | | * with: | |
| * \htmlonly<blockquote>\endhtmlonly | | * \htmlonly<blockquote>\endhtmlonly | |
| * <pre> | | * <pre> | |
| * TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles"); | | * TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles"); | |
| * </pre> | | * </pre> | |
| * \htmlonly</blockquote>\endhtmlonly | | * \htmlonly</blockquote>\endhtmlonly | |
| * You can use <code>getAvailableIDs</code> method to iterate through | | * You can use <code>getAvailableIDs</code> method to iterate through | |
|
| * all the supported time zone IDs. You can then choose a | | * all the supported time zone IDs, or getCanonicalID method to check | |
| | | * if a time zone ID is supported or not. You can then choose a | |
| * supported ID to get a <code>TimeZone</code>. | | * supported ID to get a <code>TimeZone</code>. | |
| * If the time zone you want is not represented by one of the | | * If the time zone you want is not represented by one of the | |
| * supported IDs, then you can create a custom time zone ID with | | * supported IDs, then you can create a custom time zone ID with | |
| * the following syntax: | | * the following syntax: | |
| * | | * | |
| * \htmlonly<blockquote>\endhtmlonly | | * \htmlonly<blockquote>\endhtmlonly | |
| * <pre> | | * <pre> | |
| * GMT[+|-]hh[[:]mm] | | * GMT[+|-]hh[[:]mm] | |
| * </pre> | | * </pre> | |
| * \htmlonly</blockquote>\endhtmlonly | | * \htmlonly</blockquote>\endhtmlonly | |
| * | | * | |
| * For example, you might specify GMT+14:00 as a custom | | * For example, you might specify GMT+14:00 as a custom | |
| * time zone ID. The <code>TimeZone</code> that is returned | | * time zone ID. The <code>TimeZone</code> that is returned | |
|
| * when you specify a custom time zone ID does not include | | * when you specify a custom time zone ID uses the specified | |
| * daylight savings time. | | * offset from GMT(=UTC) and does not observe daylight saving | |
| | | * time. For example, you might specify GMT+14:00 as a custom | |
| | | * time zone ID to create a TimeZone representing 14 hours ahead | |
| | | * of GMT (with no daylight saving time). In addition, | |
| | | * <code>getCanonicalID</code> can also be used to | |
| | | * normalize a custom time zone ID. | |
| * | | * | |
| * TimeZone is an abstract class representing a time zone. A TimeZone is n
eeded for | | * TimeZone is an abstract class representing a time zone. A TimeZone is n
eeded for | |
| * Calendar to produce local time for a particular time zone. A TimeZone c
omprises | | * Calendar to produce local time for a particular time zone. A TimeZone c
omprises | |
| * three basic pieces of information: | | * three basic pieces of information: | |
| * <ul> | | * <ul> | |
| * <li>A time zone offset; that, is the number of milliseconds to add or
subtract | | * <li>A time zone offset; that, is the number of milliseconds to add or
subtract | |
| * from a time expressed in terms of GMT to convert it to the same tim
e in that | | * from a time expressed in terms of GMT to convert it to the same tim
e in that | |
| * time zone (without taking daylight savings time into account).</li> | | * time zone (without taking daylight savings time into account).</li> | |
| * <li>Logic necessary to take daylight savings time into account if day
light savings | | * <li>Logic necessary to take daylight savings time into account if day
light savings | |
| * time is observed in that time zone (e.g., the days and hours on whi
ch daylight | | * time is observed in that time zone (e.g., the days and hours on whi
ch daylight | |
| * savings time begins and ends).</li> | | * savings time begins and ends).</li> | |
| * <li>An ID. This is a text string that uniquely identifies the time z
one.</li> | | * <li>An ID. This is a text string that uniquely identifies the time z
one.</li> | |
| * </ul> | | * </ul> | |
| * | | * | |
| * (Only the ID is actually implemented in TimeZone; subclasses of TimeZone
may handle | | * (Only the ID is actually implemented in TimeZone; subclasses of TimeZone
may handle | |
|
| * daylight savings time and GMT offset in different ways. Currently we on | | * daylight savings time and GMT offset in different ways. Currently we ha | |
| ly have one | | ve the following | |
| * TimeZone subclass: SimpleTimeZone.) | | * TimeZone subclasses: RuleBasedTimeZone, SimpleTimeZone, and VTimeZone.) | |
| * <P> | | * <P> | |
| * The TimeZone class contains a static list containing a TimeZone object f
or every | | * The TimeZone class contains a static list containing a TimeZone object f
or every | |
| * combination of GMT offset and daylight-savings time rules currently in u
se in the | | * combination of GMT offset and daylight-savings time rules currently in u
se in the | |
| * world, each with a unique ID. Each ID consists of a region (usually a c
ontinent or | | * world, each with a unique ID. Each ID consists of a region (usually a c
ontinent or | |
| * ocean) and a city in that region, separated by a slash, (for example, US
Pacific | | * ocean) and a city in that region, separated by a slash, (for example, US
Pacific | |
| * Time is "America/Los_Angeles.") Because older versions of this class us
ed | | * Time is "America/Los_Angeles.") Because older versions of this class us
ed | |
| * three- or four-letter abbreviations instead, there is also a table that
maps the older | | * three- or four-letter abbreviations instead, there is also a table that
maps the older | |
| * abbreviations to the newer ones (for example, "PST" maps to "America/Los
_Angeles"). | | * abbreviations to the newer ones (for example, "PST" maps to "America/Los
_Angeles"). | |
| * Anywhere the API requires an ID, you can use either form. | | * Anywhere the API requires an ID, you can use either form. | |
| * <P> | | * <P> | |
| | | | |
| skipping to change at line 130 | | skipping to change at line 136 | |
| * your machine is set up correctly), TimeZone::createDefault() will return
a TimeZone | | * your machine is set up correctly), TimeZone::createDefault() will return
a TimeZone | |
| * for Japanese Standard Time ("Asia/Tokyo"). | | * for Japanese Standard Time ("Asia/Tokyo"). | |
| */ | | */ | |
| class U_I18N_API TimeZone : public UObject { | | class U_I18N_API TimeZone : public UObject { | |
| public: | | public: | |
| /** | | /** | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual ~TimeZone(); | | virtual ~TimeZone(); | |
| | | | |
|
| | | #ifndef U_HIDE_DRAFT_API | |
| /** | | /** | |
|
| * The GMT time zone has a raw offset of zero and does not use daylight | | * Returns the "unknown" time zone. | |
| | | * It behaves like the GMT/UTC time zone but has the | |
| | | * <code>UCAL_UNKNOWN_ZONE_ID</code> = "Etc/Unknown". | |
| | | * createTimeZone() returns a mutable clone of this time zone if the in | |
| | | put ID is not recognized. | |
| | | * | |
| | | * @return the "unknown" time zone. | |
| | | * @see UCAL_UNKNOWN_ZONE_ID | |
| | | * @see createTimeZone | |
| | | * @see getGMT | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | static const TimeZone& U_EXPORT2 getUnknown(); | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| | | /** | |
| | | * The GMT (=UTC) time zone has a raw offset of zero and does not use d | |
| | | aylight | |
| * savings time. This is a commonly used time zone. | | * savings time. This is a commonly used time zone. | |
|
| * @return the GMT time zone. | | * | |
| | | * <p>Note: For backward compatibility reason, the ID used by the time | |
| | | * zone returned by this method is "GMT", although the ICU's canonical | |
| | | * ID for the GMT time zone is "Etc/GMT". | |
| | | * | |
| | | * @return the GMT/UTC time zone. | |
| | | * @see getUnknown | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| static const TimeZone* U_EXPORT2 getGMT(void); | | static const TimeZone* U_EXPORT2 getGMT(void); | |
| | | | |
| /** | | /** | |
| * Creates a <code>TimeZone</code> for the given ID. | | * Creates a <code>TimeZone</code> for the given ID. | |
| * @param ID the ID for a <code>TimeZone</code>, such as "America/Los_A
ngeles", | | * @param ID the ID for a <code>TimeZone</code>, such as "America/Los_A
ngeles", | |
| * or a custom ID such as "GMT-8:00". | | * or a custom ID such as "GMT-8:00". | |
|
| * @return the specified <code>TimeZone</code>, or the GMT zone with ID | | * @return the specified <code>TimeZone</code>, or a mutable clone of g | |
| * <code>UCAL_UNKNOWN_ZONE_ID</code> ("Etc/Unknown") if the given ID ca | | etUnknown() | |
| nnot be understood. | | * if the given ID cannot be understood or if the given ID is "Etc/Unkn | |
| * Return result guaranteed to be non-null. If you require that the spe | | own". | |
| cific zone asked | | * The return result is guaranteed to be non-NULL. | |
| * for be returned, check the ID of the return result. | | * If you require that the specific zone asked for be returned, | |
| | | * compare the result with getUnknown() or check the ID of the return r | |
| | | esult. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); | | static TimeZone* U_EXPORT2 createTimeZone(const UnicodeString& ID); | |
| | | | |
| /** | | /** | |
| * Returns an enumeration over system time zone IDs with the given | | * Returns an enumeration over system time zone IDs with the given | |
| * filter conditions. | | * filter conditions. | |
| * @param zoneType The system time zone type. | | * @param zoneType The system time zone type. | |
| * @param region The ISO 3166 two-letter country code or UN M.49 | | * @param region The ISO 3166 two-letter country code or UN M.49 | |
| * three-digit area code. When NULL, no filtering | | * three-digit area code. When NULL, no filtering | |
| * done by region. | | * done by region. | |
| * @param rawOffset An offset from GMT in milliseconds, ignoring | | * @param rawOffset An offset from GMT in milliseconds, ignoring | |
| * the effect of daylight savings time, if any. | | * the effect of daylight savings time, if any. | |
| * When NULL, no filtering done by zone offset. | | * When NULL, no filtering done by zone offset. | |
| * @param ec Output param to filled in with a success or | | * @param ec Output param to filled in with a success or | |
| * an error. | | * an error. | |
| * @return an enumeration object, owned by the caller. | | * @return an enumeration object, owned by the caller. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration( | | static StringEnumeration* U_EXPORT2 createTimeZoneIDEnumeration( | |
| USystemTimeZoneType zoneType, | | USystemTimeZoneType zoneType, | |
| const char* region, | | const char* region, | |
| const int32_t* rawOffset, | | const int32_t* rawOffset, | |
| UErrorCode& ec); | | UErrorCode& ec); | |
| | | | |
| /** | | /** | |
| * Returns an enumeration over all recognized time zone IDs. (i.e., | | * Returns an enumeration over all recognized time zone IDs. (i.e., | |
| * all strings that createTimeZone() accepts) | | * all strings that createTimeZone() accepts) | |
| | | | |
| skipping to change at line 274 | | skipping to change at line 303 | |
| * Sets the default time zone (i.e., what's returned by createDefault()
) to be the | | * Sets the default time zone (i.e., what's returned by createDefault()
) to be the | |
| * specified time zone. If NULL is specified for the time zone, the de
fault time | | * specified time zone. If NULL is specified for the time zone, the de
fault time | |
| * zone is set to the default host time zone. This call adopts the Tim
eZone object | | * zone is set to the default host time zone. This call adopts the Tim
eZone object | |
| * passed in; the clent is no longer responsible for deleting it. | | * passed in; the clent is no longer responsible for deleting it. | |
| * | | * | |
| * @param zone A pointer to the new TimeZone object to use as the defa
ult. | | * @param zone A pointer to the new TimeZone object to use as the defa
ult. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| static void U_EXPORT2 adoptDefault(TimeZone* zone); | | static void U_EXPORT2 adoptDefault(TimeZone* zone); | |
| | | | |
|
| | | #ifndef U_HIDE_SYSTEM_API | |
| /** | | /** | |
| * Same as adoptDefault(), except that the TimeZone object passed in is
NOT adopted; | | * Same as adoptDefault(), except that the TimeZone object passed in is
NOT adopted; | |
| * the caller remains responsible for deleting it. | | * the caller remains responsible for deleting it. | |
| * | | * | |
| * @param zone The given timezone. | | * @param zone The given timezone. | |
| * @system | | * @system | |
|
| | | * @stable ICU 2.0 | |
| */ | | */ | |
| static void U_EXPORT2 setDefault(const TimeZone& zone); | | static void U_EXPORT2 setDefault(const TimeZone& zone); | |
|
| | | #endif /* U_HIDE_SYSTEM_API */ | |
| | | | |
| /** | | /** | |
| * Returns the timezone data version currently used by ICU. | | * Returns the timezone data version currently used by ICU. | |
| * @param status Output param to filled in with a success or an error. | | * @param status Output param to filled in with a success or an error. | |
| * @return the version string, such as "2007f" | | * @return the version string, such as "2007f" | |
| * @stable ICU 3.8 | | * @stable ICU 3.8 | |
| */ | | */ | |
| static const char* U_EXPORT2 getTZDataVersion(UErrorCode& status); | | static const char* U_EXPORT2 getTZDataVersion(UErrorCode& status); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 589 | | skipping to change at line 621 | |
| * <p><strong>Note:</strong>The default implementation of | | * <p><strong>Note:</strong>The default implementation of | |
| * ICU TimeZone uses the tz database, which supports historic | | * ICU TimeZone uses the tz database, which supports historic | |
| * rule changes, for system time zones. With the implementation, | | * rule changes, for system time zones. With the implementation, | |
| * there are time zones that used daylight savings time in the | | * there are time zones that used daylight savings time in the | |
| * past, but no longer used currently. For example, Asia/Tokyo has | | * past, but no longer used currently. For example, Asia/Tokyo has | |
| * never used daylight savings time since 1951. Most clients would | | * never used daylight savings time since 1951. Most clients would | |
| * expect that this method to return <code>FALSE</code> for such case. | | * expect that this method to return <code>FALSE</code> for such case. | |
| * The default implementation of this method returns <code>TRUE</code> | | * The default implementation of this method returns <code>TRUE</code> | |
| * when the time zone uses daylight savings time in the current | | * when the time zone uses daylight savings time in the current | |
| * (Gregorian) calendar year. | | * (Gregorian) calendar year. | |
|
| | | * <p>In Java 7, <code>observesDaylightTime()</code> was added in | |
| | | * addition to <code>useDaylightTime()</code>. In Java, <code>useDaylig | |
| | | htTime()</code> | |
| | | * only checks if daylight saving time is observed by the last known | |
| | | * rule. This specification might not be what most users would expect | |
| | | * if daylight saving time is currently observed, but not scheduled | |
| | | * in future. In this case, Java's <code>userDaylightTime()</code> retu | |
| | | rns | |
| | | * <code>false</code>. To resolve the issue, Java 7 added <code>observe | |
| | | sDaylightTime()</code>, | |
| | | * which takes the current rule into account. The method <code>observes | |
| | | DaylightTime()</code> | |
| | | * was added in ICU4J for supporting API signature compatibility with J | |
| | | DK. | |
| | | * In general, ICU4C also provides JDK compatible methods, but the curr | |
| | | ent | |
| | | * implementation <code>userDaylightTime()</code> serves the purpose | |
| | | * (takes the current rule into account), <code>observesDaylightTime()< | |
| | | /code> | |
| | | * is not added in ICU4C. In addition to <code>useDaylightTime()</code> | |
| | | , ICU4C | |
| | | * <code>BasicTimeZone</code> class (Note that <code>TimeZone::createTi | |
| | | meZone(const UnicodeString &ID)</code> | |
| | | * always returns a <code>BasicTimeZone</code>) provides a series of me | |
| | | thods allowing | |
| | | * historic and future time zone rule iteration, so you can check if da | |
| | | ylight saving | |
| | | * time is observed or not within a given period. | |
| | | * | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| virtual UBool useDaylightTime(void) const = 0; | | virtual UBool useDaylightTime(void) const = 0; | |
| | | | |
| /** | | /** | |
| * Queries if the given date is in daylight savings time in | | * Queries if the given date is in daylight savings time in | |
| * this time zone. | | * this time zone. | |
| * This method is wasteful since it creates a new GregorianCalendar and | | * This method is wasteful since it creates a new GregorianCalendar and | |
| * deletes it each time it is called. This is a deprecated method | | * deletes it each time it is called. This is a deprecated method | |
| * and provided only for Java compatibility. | | * and provided only for Java compatibility. | |
| | | | |
| skipping to change at line 680 | | skipping to change at line 730 | |
| * for example - "Etc/UTC", "EST5EDT", then this method returns | | * for example - "Etc/UTC", "EST5EDT", then this method returns | |
| * "001" (UN M.49 area code for World). | | * "001" (UN M.49 area code for World). | |
| * | | * | |
| * @param id The system time zone ID. | | * @param id The system time zone ID. | |
| * @param region Output buffer for receiving the region code. | | * @param region Output buffer for receiving the region code. | |
| * @param capacity The size of the output buffer. | | * @param capacity The size of the output buffer. | |
| * @param status Receives the status. When the given time zone
ID | | * @param status Receives the status. When the given time zone
ID | |
| * is not a known system time zone ID, | | * is not a known system time zone ID, | |
| * U_ILLEGAL_ARGUMENT_ERROR is set. | | * U_ILLEGAL_ARGUMENT_ERROR is set. | |
| * @return The length of the output region code. | | * @return The length of the output region code. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| static int32_t U_EXPORT2 getRegion(const UnicodeString& id, | | static int32_t U_EXPORT2 getRegion(const UnicodeString& id, | |
| char *region, int32_t capacity, UErrorCode& status); | | char *region, int32_t capacity, UErrorCode& status); | |
| | | | |
| protected: | | protected: | |
| | | | |
| /** | | /** | |
| * Default constructor. ID is initialized to the empty string. | | * Default constructor. ID is initialized to the empty string. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 714 | | skipping to change at line 764 | |
| */ | | */ | |
| TimeZone(const TimeZone& source); | | TimeZone(const TimeZone& source); | |
| | | | |
| /** | | /** | |
| * Default assignment operator. | | * Default assignment operator. | |
| * @param right the object to be copied. | | * @param right the object to be copied. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| TimeZone& operator=(const TimeZone& right); | | TimeZone& operator=(const TimeZone& right); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Utility function. For internally loading rule data. | | * Utility function. For internally loading rule data. | |
| * @param top Top resource bundle for tz data | | * @param top Top resource bundle for tz data | |
| * @param ruleid ID of rule to load | | * @param ruleid ID of rule to load | |
| * @param oldbundle Old bundle to reuse or NULL | | * @param oldbundle Old bundle to reuse or NULL | |
| * @param status Status parameter | | * @param status Status parameter | |
| * @return either a new bundle or *oldbundle | | * @return either a new bundle or *oldbundle | |
| * @internal | | * @internal | |
| */ | | */ | |
| static UResourceBundle* loadRule(const UResourceBundle* top, const Unic
odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status); | | static UResourceBundle* loadRule(const UResourceBundle* top, const Unic
odeString& ruleid, UResourceBundle* oldbundle, UErrorCode&status); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| private: | | private: | |
| friend class ZoneMeta; | | friend class ZoneMeta; | |
| | | | |
| static TimeZone* createCustomTimeZone(const UnicodeString&); //
Creates a time zone based on the string. | | static TimeZone* createCustomTimeZone(const UnicodeString&); //
Creates a time zone based on the string. | |
| | | | |
| /** | | /** | |
| * Finds the given ID in the Olson tzdata. If the given ID is found in
the tzdata, | | * Finds the given ID in the Olson tzdata. If the given ID is found in
the tzdata, | |
| * returns the pointer to the ID resource. This method is exposed throu
gh ZoneMeta class | | * returns the pointer to the ID resource. This method is exposed throu
gh ZoneMeta class | |
| * for ICU internal implementation and useful for building hashtable us
ing a time zone | | * for ICU internal implementation and useful for building hashtable us
ing a time zone | |
| | | | |
End of changes. 16 change blocks. |
| 17 lines changed or deleted | | 83 lines changed or added | |
|
| uchar.h | | uchar.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 1997-2010, International Business Machines | | * Copyright (C) 1997-2011, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * | | * | |
| * File UCHAR.H | | * File UCHAR.H | |
| * | | * | |
| * Modification History: | | * Modification History: | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 04/02/97 aliu Creation. | | * 04/02/97 aliu Creation. | |
| * 03/29/99 helena Updated for C APIs. | | * 03/29/99 helena Updated for C APIs. | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| /*=========================================================================
=*/ | | /*=========================================================================
=*/ | |
| /** | | /** | |
| * Unicode version number, default for the current ICU version. | | * Unicode version number, default for the current ICU version. | |
| * The actual Unicode Character Database (UCD) data is stored in uprops.dat | | * The actual Unicode Character Database (UCD) data is stored in uprops.dat | |
| * and may be generated from UCD files from a different Unicode version. | | * and may be generated from UCD files from a different Unicode version. | |
| * Call u_getUnicodeVersion to get the actual Unicode version of the data. | | * Call u_getUnicodeVersion to get the actual Unicode version of the data. | |
| * | | * | |
| * @see u_getUnicodeVersion | | * @see u_getUnicodeVersion | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #define U_UNICODE_VERSION "6.0" | | #define U_UNICODE_VERSION "6.1" | |
| | | | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C API: Unicode Properties | | * \brief C API: Unicode Properties | |
| * | | * | |
| * This C API provides low-level access to the Unicode Character Database. | | * This C API provides low-level access to the Unicode Character Database. | |
| * In addition to raw property values, some convenience functions calculate | | * In addition to raw property values, some convenience functions calculate | |
| * derived properties, for example for Java-style programming. | | * derived properties, for example for Java-style programming. | |
| * | | * | |
| * Unicode assigns each code point (not just assigned character) values for | | * Unicode assigns each code point (not just assigned character) values for | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 142 | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| #define UCHAR_MAX_VALUE 0x10ffff | | #define UCHAR_MAX_VALUE 0x10ffff | |
| | | | |
| /** | | /** | |
| * Get a single-bit bit set (a flag) from a bit number 0..31. | | * Get a single-bit bit set (a flag) from a bit number 0..31. | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| #define U_MASK(x) ((uint32_t)1<<(x)) | | #define U_MASK(x) ((uint32_t)1<<(x)) | |
| | | | |
|
| /* | | | |
| * !! Note: Several comments in this file are machine-read by the | | | |
| * genpname tool. These comments describe the correspondence between | | | |
| * icu enum constants and UCD entities. Do not delete them. Update | | | |
| * these comments as needed. | | | |
| * | | | |
| * Any comment of the form "/ *[name]* /" (spaces added) is such | | | |
| * a comment. | | | |
| * | | | |
| * The U_JG_* and U_GC_*_MASK constants are matched by their symbolic | | | |
| * name, which must match PropertyValueAliases.txt. | | | |
| */ | | | |
| | | | |
| /** | | /** | |
| * Selection constants for Unicode properties. | | * Selection constants for Unicode properties. | |
| * These constants are used in functions like u_hasBinaryProperty to select | | * These constants are used in functions like u_hasBinaryProperty to select | |
| * one of the Unicode properties. | | * one of the Unicode properties. | |
| * | | * | |
| * The properties APIs are intended to reflect Unicode properties as define
d | | * The properties APIs are intended to reflect Unicode properties as define
d | |
| * in the Unicode Character Database (UCD) and Unicode Technical Reports (U
TR). | | * in the Unicode Character Database (UCD) and Unicode Technical Reports (U
TR). | |
| * For details about the properties see http://www.unicode.org/ucd/ . | | * For details about the properties see http://www.unicode.org/ucd/ . | |
| * For names of Unicode properties see the UCD file PropertyAliases.txt. | | * For names of Unicode properties see the UCD file PropertyAliases.txt. | |
| * | | * | |
| * Important: If ICU is built with UCD files from Unicode versions below, e
.g., 3.2, | | * Important: If ICU is built with UCD files from Unicode versions below, e
.g., 3.2, | |
| * then properties marked with "new in Unicode 3.2" are not or not fully av
ailable. | | * then properties marked with "new in Unicode 3.2" are not or not fully av
ailable. | |
| * Check u_getUnicodeVersion to be sure. | | * Check u_getUnicodeVersion to be sure. | |
| * | | * | |
| * @see u_hasBinaryProperty | | * @see u_hasBinaryProperty | |
| * @see u_getIntPropertyValue | | * @see u_getIntPropertyValue | |
| * @see u_getUnicodeVersion | | * @see u_getUnicodeVersion | |
| * @stable ICU 2.1 | | * @stable ICU 2.1 | |
| */ | | */ | |
| typedef enum UProperty { | | typedef enum UProperty { | |
|
| /* See note !!. Comments of the form "Binary property Dash", | | /* | |
| "Enumerated property Script", "Double property Numeric_Value", | | * Note: UProperty constants are parsed by preparseucd.py. | |
| and "String property Age" are read by genpname. */ | | * It matches lines like | |
| | | * UCHAR_<Unicode property name>=<integer>, | |
| | | */ | |
| | | | |
| /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that | | /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that | |
| debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, | | debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, | |
| rather than UCHAR_BINARY_START. Likewise for other *_START | | rather than UCHAR_BINARY_START. Likewise for other *_START | |
| identifiers. */ | | identifiers. */ | |
| | | | |
| /** Binary property Alphabetic. Same as u_isUAlphabetic, different from
u_isalpha. | | /** Binary property Alphabetic. Same as u_isUAlphabetic, different from
u_isalpha. | |
| Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ | | Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ | |
| UCHAR_ALPHABETIC=0, | | UCHAR_ALPHABETIC=0, | |
| /** First constant for binary Unicode properties. @stable ICU 2.1 */ | | /** First constant for binary Unicode properties. @stable ICU 2.1 */ | |
| | | | |
| skipping to change at line 530 | | skipping to change at line 519 | |
| Corresponds to u_charAge. @stable ICU 2.4 */ | | Corresponds to u_charAge. @stable ICU 2.4 */ | |
| UCHAR_AGE=0x4000, | | UCHAR_AGE=0x4000, | |
| /** First constant for string Unicode properties. @stable ICU 2.4 */ | | /** First constant for string Unicode properties. @stable ICU 2.4 */ | |
| UCHAR_STRING_START=UCHAR_AGE, | | UCHAR_STRING_START=UCHAR_AGE, | |
| /** String property Bidi_Mirroring_Glyph. | | /** String property Bidi_Mirroring_Glyph. | |
| Corresponds to u_charMirror. @stable ICU 2.4 */ | | Corresponds to u_charMirror. @stable ICU 2.4 */ | |
| UCHAR_BIDI_MIRRORING_GLYPH=0x4001, | | UCHAR_BIDI_MIRRORING_GLYPH=0x4001, | |
| /** String property Case_Folding. | | /** String property Case_Folding. | |
| Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ | | Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ | |
| UCHAR_CASE_FOLDING=0x4002, | | UCHAR_CASE_FOLDING=0x4002, | |
|
| /** String property ISO_Comment. | | /** Deprecated string property ISO_Comment. | |
| Corresponds to u_getISOComment. @stable ICU 2.4 */ | | Corresponds to u_getISOComment. @deprecated ICU 49 */ | |
| UCHAR_ISO_COMMENT=0x4003, | | UCHAR_ISO_COMMENT=0x4003, | |
| /** String property Lowercase_Mapping. | | /** String property Lowercase_Mapping. | |
| Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ | | Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ | |
| UCHAR_LOWERCASE_MAPPING=0x4004, | | UCHAR_LOWERCASE_MAPPING=0x4004, | |
| /** String property Name. | | /** String property Name. | |
| Corresponds to u_charName. @stable ICU 2.4 */ | | Corresponds to u_charName. @stable ICU 2.4 */ | |
| UCHAR_NAME=0x4005, | | UCHAR_NAME=0x4005, | |
| /** String property Simple_Case_Folding. | | /** String property Simple_Case_Folding. | |
| Corresponds to u_foldCase. @stable ICU 2.4 */ | | Corresponds to u_foldCase. @stable ICU 2.4 */ | |
| UCHAR_SIMPLE_CASE_FOLDING=0x4006, | | UCHAR_SIMPLE_CASE_FOLDING=0x4006, | |
| | | | |
| skipping to change at line 555 | | skipping to change at line 544 | |
| /** String property Simple_Titlecase_Mapping. | | /** String property Simple_Titlecase_Mapping. | |
| Corresponds to u_totitle. @stable ICU 2.4 */ | | Corresponds to u_totitle. @stable ICU 2.4 */ | |
| UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, | | UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, | |
| /** String property Simple_Uppercase_Mapping. | | /** String property Simple_Uppercase_Mapping. | |
| Corresponds to u_toupper. @stable ICU 2.4 */ | | Corresponds to u_toupper. @stable ICU 2.4 */ | |
| UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, | | UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, | |
| /** String property Titlecase_Mapping. | | /** String property Titlecase_Mapping. | |
| Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ | | Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ | |
| UCHAR_TITLECASE_MAPPING=0x400A, | | UCHAR_TITLECASE_MAPPING=0x400A, | |
| /** String property Unicode_1_Name. | | /** String property Unicode_1_Name. | |
|
| Corresponds to u_charName. @stable ICU 2.4 */ | | This property is of little practical value. | |
| | | Beginning with ICU 49, ICU APIs return an empty string for this pro | |
| | | perty. | |
| | | Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU | |
| | | 49 */ | |
| UCHAR_UNICODE_1_NAME=0x400B, | | UCHAR_UNICODE_1_NAME=0x400B, | |
| /** String property Uppercase_Mapping. | | /** String property Uppercase_Mapping. | |
| Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ | | Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ | |
| UCHAR_UPPERCASE_MAPPING=0x400C, | | UCHAR_UPPERCASE_MAPPING=0x400C, | |
| /** One more than the last constant for string Unicode properties. @sta
ble ICU 2.4 */ | | /** One more than the last constant for string Unicode properties. @sta
ble ICU 2.4 */ | |
| UCHAR_STRING_LIMIT=0x400D, | | UCHAR_STRING_LIMIT=0x400D, | |
| | | | |
|
| | | #ifndef U_HIDE_DRAFT_API | |
| /** Provisional property Script_Extensions (new in Unicode 6.0). | | /** Provisional property Script_Extensions (new in Unicode 6.0). | |
| As a provisional property, it may be modified or removed | | As a provisional property, it may be modified or removed | |
| in future versions of the Unicode Standard, and thus in ICU. | | in future versions of the Unicode Standard, and thus in ICU. | |
| Some characters are commonly used in multiple scripts. | | Some characters are commonly used in multiple scripts. | |
| For more information, see UAX #24: http://www.unicode.org/reports/t
r24/. | | For more information, see UAX #24: http://www.unicode.org/reports/t
r24/. | |
| Corresponds to uscript_hasScript and uscript_getScriptExtensions in
uscript.h. | | Corresponds to uscript_hasScript and uscript_getScriptExtensions in
uscript.h. | |
| @draft ICU 4.6 */ | | @draft ICU 4.6 */ | |
| UCHAR_SCRIPT_EXTENSIONS=0x7000, | | UCHAR_SCRIPT_EXTENSIONS=0x7000, | |
| /** First constant for Unicode properties with unusual value types. @dr
aft ICU 4.6 */ | | /** First constant for Unicode properties with unusual value types. @dr
aft ICU 4.6 */ | |
| UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, | | UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, | |
| /** One more than the last constant for Unicode properties with unusual
value types. | | /** One more than the last constant for Unicode properties with unusual
value types. | |
| * @draft ICU 4.6 */ | | * @draft ICU 4.6 */ | |
| UCHAR_OTHER_PROPERTY_LIMIT=0x7001, | | UCHAR_OTHER_PROPERTY_LIMIT=0x7001, | |
|
| | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| /** Represents a nonexistent or invalid property or property value. @st
able ICU 2.4 */ | | /** Represents a nonexistent or invalid property or property value. @st
able ICU 2.4 */ | |
| UCHAR_INVALID_CODE = -1 | | UCHAR_INVALID_CODE = -1 | |
| } UProperty; | | } UProperty; | |
| | | | |
| /** | | /** | |
| * Data for enumerated Unicode general category types. | | * Data for enumerated Unicode general category types. | |
| * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . | | * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum UCharCategory | | typedef enum UCharCategory | |
| { | | { | |
|
| /** See note !!. Comments of the form "Cn" are read by genpname. */ | | /* | |
| | | * Note: UCharCategory constants and their API comments are parsed by p | |
| | | reparseucd.py. | |
| | | * It matches pairs of lines like | |
| | | * / ** <Unicode 2-letter General_Category value> comment... * / | |
| | | * U_<[A-Z_]+> = <integer>, | |
| | | */ | |
| | | | |
| /** Non-category for unassigned and non-character code points. @stable
ICU 2.0 */ | | /** Non-category for unassigned and non-character code points. @stable
ICU 2.0 */ | |
| U_UNASSIGNED = 0, | | U_UNASSIGNED = 0, | |
| /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have th
is property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ | | /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have th
is property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ | |
| U_GENERAL_OTHER_TYPES = 0, | | U_GENERAL_OTHER_TYPES = 0, | |
| /** Lu @stable ICU 2.0 */ | | /** Lu @stable ICU 2.0 */ | |
| U_UPPERCASE_LETTER = 1, | | U_UPPERCASE_LETTER = 1, | |
| /** Ll @stable ICU 2.0 */ | | /** Ll @stable ICU 2.0 */ | |
| U_LOWERCASE_LETTER = 2, | | U_LOWERCASE_LETTER = 2, | |
| /** Lt @stable ICU 2.0 */ | | /** Lt @stable ICU 2.0 */ | |
| | | | |
| skipping to change at line 772 | | skipping to change at line 770 | |
| U_GC_PI_MASK|U_GC_PF_MASK) | | U_GC_PI_MASK|U_GC_PF_MASK) | |
| | | | |
| /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU
2.1 */ | | /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU
2.1 */ | |
| #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) | | #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) | |
| | | | |
| /** | | /** | |
| * This specifies the language directional property of a character set. | | * This specifies the language directional property of a character set. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum UCharDirection { | | typedef enum UCharDirection { | |
|
| /** See note !!. Comments of the form "EN" are read by genpname. */ | | /* | |
| | | * Note: UCharDirection constants and their API comments are parsed by | |
| | | preparseucd.py. | |
| | | * It matches pairs of lines like | |
| | | * / ** <Unicode 1..3-letter Bidi_Class value> comment... * / | |
| | | * U_<[A-Z_]+> = <integer>, | |
| | | */ | |
| | | | |
| /** L @stable ICU 2.0 */ | | /** L @stable ICU 2.0 */ | |
| U_LEFT_TO_RIGHT = 0, | | U_LEFT_TO_RIGHT = 0, | |
| /** R @stable ICU 2.0 */ | | /** R @stable ICU 2.0 */ | |
| U_RIGHT_TO_LEFT = 1, | | U_RIGHT_TO_LEFT = 1, | |
| /** EN @stable ICU 2.0 */ | | /** EN @stable ICU 2.0 */ | |
| U_EUROPEAN_NUMBER = 2, | | U_EUROPEAN_NUMBER = 2, | |
| /** ES @stable ICU 2.0 */ | | /** ES @stable ICU 2.0 */ | |
| U_EUROPEAN_NUMBER_SEPARATOR = 3, | | U_EUROPEAN_NUMBER_SEPARATOR = 3, | |
| /** ET @stable ICU 2.0 */ | | /** ET @stable ICU 2.0 */ | |
| | | | |
| skipping to change at line 821 | | skipping to change at line 824 | |
| U_BOUNDARY_NEUTRAL = 18, | | U_BOUNDARY_NEUTRAL = 18, | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| U_CHAR_DIRECTION_COUNT | | U_CHAR_DIRECTION_COUNT | |
| } UCharDirection; | | } UCharDirection; | |
| | | | |
| /** | | /** | |
| * Constants for Unicode blocks, see the Unicode Data file Blocks.txt | | * Constants for Unicode blocks, see the Unicode Data file Blocks.txt | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| enum UBlockCode { | | enum UBlockCode { | |
|
| | | /* | |
| | | * Note: UBlockCode constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * UBLOCK_<Unicode Block value name> = <integer>, | |
| | | */ | |
| | | | |
| /** New No_Block value in Unicode 4. @stable ICU 2.6 */ | | /** New No_Block value in Unicode 4. @stable ICU 2.6 */ | |
| UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ | | UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_BASIC_LATIN = 1, /*[0000]*/ /*See note !!*/ | | UBLOCK_BASIC_LATIN = 1, /*[0000]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ | | UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ | | UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ | | UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ | |
| | | | |
| | | | |
| skipping to change at line 1063 | | skipping to change at line 1071 | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ | | UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ | | UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ | | UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ | |
| | | | |
| /** | | /** | |
|
| * Same as UBLOCK_PRIVATE_USE_AREA. | | * Same as UBLOCK_PRIVATE_USE. | |
| * Until Unicode 3.1.1, the corresponding block name was "Private Use", | | * Until Unicode 3.1.1, the corresponding block name was "Private Use", | |
| * and multiple code point ranges had this block. | | * and multiple code point ranges had this block. | |
| * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area"
and | | * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area"
and | |
| * adds separate blocks for the supplementary PUAs. | | * adds separate blocks for the supplementary PUAs. | |
| * | | * | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| UBLOCK_PRIVATE_USE = 78, | | UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/ | |
| /** | | /** | |
|
| * Same as UBLOCK_PRIVATE_USE. | | * Same as UBLOCK_PRIVATE_USE_AREA. | |
| * Until Unicode 3.1.1, the corresponding block name was "Private Use", | | * Until Unicode 3.1.1, the corresponding block name was "Private Use", | |
| * and multiple code point ranges had this block. | | * and multiple code point ranges had this block. | |
| * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area"
and | | * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area"
and | |
| * adds separate blocks for the supplementary PUAs. | | * adds separate blocks for the supplementary PUAs. | |
| * | | * | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| UBLOCK_PRIVATE_USE_AREA =UBLOCK_PRIVATE_USE, /*[E000]*/ | | UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA, | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ | | UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ | | UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ | | UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ | |
| | | | |
| | | | |
| skipping to change at line 1113 | | skipping to change at line 1121 | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_SPECIALS =86, /*[FFF0]*/ | | UBLOCK_SPECIALS =86, /*[FFF0]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ | | UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ | |
| | | | |
| /* New blocks in Unicode 3.1 */ | | /* New blocks in Unicode 3.1 */ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_OLD_ITALIC = 88 , /*[10300]*/ | | UBLOCK_OLD_ITALIC = 88, /*[10300]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_GOTHIC = 89 , /*[10330]*/ | | UBLOCK_GOTHIC = 89, /*[10330]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_DESERET = 90 , /*[10400]*/ | | UBLOCK_DESERET = 90, /*[10400]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91 , /*[1D000]*/ | | UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_MUSICAL_SYMBOLS = 92 , /*[1D100]*/ | | UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93 , /*[1D400]*/ | | UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94 , /*[20000]*/ | | UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94, /*[20000]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95 , /*[2F800]*/ | | UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/ | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_TAGS = 96, /*[E0000]*/ | | UBLOCK_TAGS = 96, /*[E0000]*/ | |
| | | | |
| /* New blocks in Unicode 3.2 */ | | /* New blocks in Unicode 3.2 */ | |
| | | | |
|
| | | /** @stable ICU 3.0 */ | |
| | | UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/ | |
| /** | | /** | |
| * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrilli
c Supplement". | | * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrilli
c Supplement". | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
|
| UBLOCK_CYRILLIC_SUPPLEMENTARY = 97, | | UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT, | |
| /** @stable ICU 3.0 */ | | | |
| UBLOCK_CYRILLIC_SUPPLEMENT = UBLOCK_CYRILLIC_SUPPLEMENTARY, /*[0500]*/ | | | |
| /** @stable ICU 2.2 */ | | /** @stable ICU 2.2 */ | |
| UBLOCK_TAGALOG = 98, /*[1700]*/ | | UBLOCK_TAGALOG = 98, /*[1700]*/ | |
| /** @stable ICU 2.2 */ | | /** @stable ICU 2.2 */ | |
| UBLOCK_HANUNOO = 99, /*[1720]*/ | | UBLOCK_HANUNOO = 99, /*[1720]*/ | |
| /** @stable ICU 2.2 */ | | /** @stable ICU 2.2 */ | |
| UBLOCK_BUHID = 100, /*[1740]*/ | | UBLOCK_BUHID = 100, /*[1740]*/ | |
| /** @stable ICU 2.2 */ | | /** @stable ICU 2.2 */ | |
| UBLOCK_TAGBANWA = 101, /*[1760]*/ | | UBLOCK_TAGBANWA = 101, /*[1760]*/ | |
| /** @stable ICU 2.2 */ | | /** @stable ICU 2.2 */ | |
| UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ | | UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ | |
| | | | |
| skipping to change at line 1383 | | skipping to change at line 1391 | |
| UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ | | UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ | |
| /** @stable ICU 4.6 */ | | /** @stable ICU 4.6 */ | |
| UBLOCK_EMOTICONS = 206, /*[1F600]*/ | | UBLOCK_EMOTICONS = 206, /*[1F600]*/ | |
| /** @stable ICU 4.6 */ | | /** @stable ICU 4.6 */ | |
| UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ | | UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ | |
| /** @stable ICU 4.6 */ | | /** @stable ICU 4.6 */ | |
| UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ | | UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ | |
| /** @stable ICU 4.6 */ | | /** @stable ICU 4.6 */ | |
| UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ | | UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ | |
| | | | |
|
| | | /* New blocks in Unicode 6.1 */ | |
| | | | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_CHAKMA = 212, /*[11100]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_MIAO = 216, /*[16F00]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_SHARADA = 217, /*[11180]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/ | |
| | | /** @stable ICU 49 */ | |
| | | UBLOCK_TAKRI = 220, /*[11680]*/ | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
|
| UBLOCK_COUNT = 210, | | UBLOCK_COUNT = 221, | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| UBLOCK_INVALID_CODE=-1 | | UBLOCK_INVALID_CODE=-1 | |
| }; | | }; | |
| | | | |
| /** @stable ICU 2.0 */ | | /** @stable ICU 2.0 */ | |
| typedef enum UBlockCode UBlockCode; | | typedef enum UBlockCode UBlockCode; | |
| | | | |
| /** | | /** | |
| * East Asian Width constants. | | * East Asian Width constants. | |
| * | | * | |
| * @see UCHAR_EAST_ASIAN_WIDTH | | * @see UCHAR_EAST_ASIAN_WIDTH | |
| * @see u_getIntPropertyValue | | * @see u_getIntPropertyValue | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UEastAsianWidth { | | typedef enum UEastAsianWidth { | |
|
| U_EA_NEUTRAL, /*[N]*/ /*See note !!*/ | | /* | |
| | | * Note: UEastAsianWidth constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_EA_<Unicode East_Asian_Width value name> | |
| | | */ | |
| | | | |
| | | U_EA_NEUTRAL, /*[N]*/ | |
| U_EA_AMBIGUOUS, /*[A]*/ | | U_EA_AMBIGUOUS, /*[A]*/ | |
| U_EA_HALFWIDTH, /*[H]*/ | | U_EA_HALFWIDTH, /*[H]*/ | |
| U_EA_FULLWIDTH, /*[F]*/ | | U_EA_FULLWIDTH, /*[F]*/ | |
| U_EA_NARROW, /*[Na]*/ | | U_EA_NARROW, /*[Na]*/ | |
| U_EA_WIDE, /*[W]*/ | | U_EA_WIDE, /*[W]*/ | |
| U_EA_COUNT | | U_EA_COUNT | |
| } UEastAsianWidth; | | } UEastAsianWidth; | |
|
| /* | | | |
| * Implementation note: | | | |
| * Keep UEastAsianWidth constant values in sync with names list in genprops | | | |
| /props2.c. | | | |
| */ | | | |
| | | | |
| /** | | /** | |
| * Selector constants for u_charName(). | | * Selector constants for u_charName(). | |
| * u_charName() returns the "modern" name of a | | * u_charName() returns the "modern" name of a | |
| * Unicode character; or the name that was defined in | | * Unicode character; or the name that was defined in | |
| * Unicode version 1.0, before the Unicode standard merged | | * Unicode version 1.0, before the Unicode standard merged | |
| * with ISO-10646; or an "extended" name that gives each | | * with ISO-10646; or an "extended" name that gives each | |
| * Unicode code point a unique name. | | * Unicode code point a unique name. | |
| * | | * | |
| * @see u_charName | | * @see u_charName | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| typedef enum UCharNameChoice { | | typedef enum UCharNameChoice { | |
|
| | | /** Unicode character name (Name property). @stable ICU 2.0 */ | |
| U_UNICODE_CHAR_NAME, | | U_UNICODE_CHAR_NAME, | |
|
| | | /** | |
| | | * The Unicode_1_Name property value which is of little practical value | |
| | | . | |
| | | * Beginning with ICU 49, ICU APIs return an empty string for this name | |
| | | choice. | |
| | | * @deprecated ICU 49 | |
| | | */ | |
| U_UNICODE_10_CHAR_NAME, | | U_UNICODE_10_CHAR_NAME, | |
|
| | | /** Standard or synthetic character name. @stable ICU 2.0 */ | |
| U_EXTENDED_CHAR_NAME, | | U_EXTENDED_CHAR_NAME, | |
|
| U_CHAR_NAME_ALIAS, /**< Corrected name from NameAliases.txt. @ | | /** Corrected name from NameAliases.txt. @stable ICU 4.4 */ | |
| stable ICU 4.4 */ | | U_CHAR_NAME_ALIAS, | |
| | | /** @stable ICU 2.0 */ | |
| U_CHAR_NAME_CHOICE_COUNT | | U_CHAR_NAME_CHOICE_COUNT | |
| } UCharNameChoice; | | } UCharNameChoice; | |
| | | | |
| /** | | /** | |
| * Selector constants for u_getPropertyName() and | | * Selector constants for u_getPropertyName() and | |
| * u_getPropertyValueName(). These selectors are used to choose which | | * u_getPropertyValueName(). These selectors are used to choose which | |
| * name is returned for a given property or value. All properties and | | * name is returned for a given property or value. All properties and | |
| * values have a long name. Most have a short name, but some do not. | | * values have a long name. Most have a short name, but some do not. | |
| * Unicode allows for additional names, beyond the long and short | | * Unicode allows for additional names, beyond the long and short | |
| * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where | | * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where | |
| | | | |
| skipping to change at line 1459 | | skipping to change at line 1503 | |
| U_PROPERTY_NAME_CHOICE_COUNT | | U_PROPERTY_NAME_CHOICE_COUNT | |
| } UPropertyNameChoice; | | } UPropertyNameChoice; | |
| | | | |
| /** | | /** | |
| * Decomposition Type constants. | | * Decomposition Type constants. | |
| * | | * | |
| * @see UCHAR_DECOMPOSITION_TYPE | | * @see UCHAR_DECOMPOSITION_TYPE | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UDecompositionType { | | typedef enum UDecompositionType { | |
|
| U_DT_NONE, /*[none]*/ /*See note !!*/ | | /* | |
| | | * Note: UDecompositionType constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_DT_<Unicode Decomposition_Type value name> | |
| | | */ | |
| | | | |
| | | U_DT_NONE, /*[none]*/ | |
| U_DT_CANONICAL, /*[can]*/ | | U_DT_CANONICAL, /*[can]*/ | |
| U_DT_COMPAT, /*[com]*/ | | U_DT_COMPAT, /*[com]*/ | |
| U_DT_CIRCLE, /*[enc]*/ | | U_DT_CIRCLE, /*[enc]*/ | |
| U_DT_FINAL, /*[fin]*/ | | U_DT_FINAL, /*[fin]*/ | |
| U_DT_FONT, /*[font]*/ | | U_DT_FONT, /*[font]*/ | |
| U_DT_FRACTION, /*[fra]*/ | | U_DT_FRACTION, /*[fra]*/ | |
| U_DT_INITIAL, /*[init]*/ | | U_DT_INITIAL, /*[init]*/ | |
| U_DT_ISOLATED, /*[iso]*/ | | U_DT_ISOLATED, /*[iso]*/ | |
| U_DT_MEDIAL, /*[med]*/ | | U_DT_MEDIAL, /*[med]*/ | |
| U_DT_NARROW, /*[nar]*/ | | U_DT_NARROW, /*[nar]*/ | |
| | | | |
| skipping to change at line 1487 | | skipping to change at line 1537 | |
| U_DT_COUNT /* 18 */ | | U_DT_COUNT /* 18 */ | |
| } UDecompositionType; | | } UDecompositionType; | |
| | | | |
| /** | | /** | |
| * Joining Type constants. | | * Joining Type constants. | |
| * | | * | |
| * @see UCHAR_JOINING_TYPE | | * @see UCHAR_JOINING_TYPE | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UJoiningType { | | typedef enum UJoiningType { | |
|
| U_JT_NON_JOINING, /*[U]*/ /*See note !!*/ | | /* | |
| | | * Note: UJoiningType constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_JT_<Unicode Joining_Type value name> | |
| | | */ | |
| | | | |
| | | U_JT_NON_JOINING, /*[U]*/ | |
| U_JT_JOIN_CAUSING, /*[C]*/ | | U_JT_JOIN_CAUSING, /*[C]*/ | |
| U_JT_DUAL_JOINING, /*[D]*/ | | U_JT_DUAL_JOINING, /*[D]*/ | |
| U_JT_LEFT_JOINING, /*[L]*/ | | U_JT_LEFT_JOINING, /*[L]*/ | |
| U_JT_RIGHT_JOINING, /*[R]*/ | | U_JT_RIGHT_JOINING, /*[R]*/ | |
| U_JT_TRANSPARENT, /*[T]*/ | | U_JT_TRANSPARENT, /*[T]*/ | |
| U_JT_COUNT /* 6 */ | | U_JT_COUNT /* 6 */ | |
| } UJoiningType; | | } UJoiningType; | |
| | | | |
| /** | | /** | |
| * Joining Group constants. | | * Joining Group constants. | |
| * | | * | |
| * @see UCHAR_JOINING_GROUP | | * @see UCHAR_JOINING_GROUP | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UJoiningGroup { | | typedef enum UJoiningGroup { | |
|
| | | /* | |
| | | * Note: UJoiningGroup constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_JG_<Unicode Joining_Group value name> | |
| | | */ | |
| | | | |
| U_JG_NO_JOINING_GROUP, | | U_JG_NO_JOINING_GROUP, | |
| U_JG_AIN, | | U_JG_AIN, | |
| U_JG_ALAPH, | | U_JG_ALAPH, | |
| U_JG_ALEF, | | U_JG_ALEF, | |
| U_JG_BEH, | | U_JG_BEH, | |
| U_JG_BETH, | | U_JG_BETH, | |
| U_JG_DAL, | | U_JG_DAL, | |
| U_JG_DALATH_RISH, | | U_JG_DALATH_RISH, | |
| U_JG_E, | | U_JG_E, | |
| U_JG_FEH, | | U_JG_FEH, | |
| | | | |
| skipping to change at line 1561 | | skipping to change at line 1623 | |
| U_JG_YEH_WITH_TAIL, | | U_JG_YEH_WITH_TAIL, | |
| U_JG_YUDH, | | U_JG_YUDH, | |
| U_JG_YUDH_HE, | | U_JG_YUDH_HE, | |
| U_JG_ZAIN, | | U_JG_ZAIN, | |
| U_JG_FE, /**< @stable ICU 2.6 */ | | U_JG_FE, /**< @stable ICU 2.6 */ | |
| U_JG_KHAPH, /**< @stable ICU 2.6 */ | | U_JG_KHAPH, /**< @stable ICU 2.6 */ | |
| U_JG_ZHAIN, /**< @stable ICU 2.6 */ | | U_JG_ZHAIN, /**< @stable ICU 2.6 */ | |
| U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ | | U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ | |
| U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ | | U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ | |
| U_JG_NYA, /**< @stable ICU 4.4 */ | | U_JG_NYA, /**< @stable ICU 4.4 */ | |
|
| | | U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */ | |
| U_JG_COUNT | | U_JG_COUNT | |
| } UJoiningGroup; | | } UJoiningGroup; | |
| | | | |
| /** | | /** | |
| * Grapheme Cluster Break constants. | | * Grapheme Cluster Break constants. | |
| * | | * | |
| * @see UCHAR_GRAPHEME_CLUSTER_BREAK | | * @see UCHAR_GRAPHEME_CLUSTER_BREAK | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| typedef enum UGraphemeClusterBreak { | | typedef enum UGraphemeClusterBreak { | |
|
| U_GCB_OTHER = 0, /*[XX]*/ /*See note !!*/ | | /* | |
| | | * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_GCB_<Unicode Grapheme_Cluster_Break value name> | |
| | | */ | |
| | | | |
| | | U_GCB_OTHER = 0, /*[XX]*/ | |
| U_GCB_CONTROL = 1, /*[CN]*/ | | U_GCB_CONTROL = 1, /*[CN]*/ | |
| U_GCB_CR = 2, /*[CR]*/ | | U_GCB_CR = 2, /*[CR]*/ | |
| U_GCB_EXTEND = 3, /*[EX]*/ | | U_GCB_EXTEND = 3, /*[EX]*/ | |
| U_GCB_L = 4, /*[L]*/ | | U_GCB_L = 4, /*[L]*/ | |
| U_GCB_LF = 5, /*[LF]*/ | | U_GCB_LF = 5, /*[LF]*/ | |
| U_GCB_LV = 6, /*[LV]*/ | | U_GCB_LV = 6, /*[LV]*/ | |
| U_GCB_LVT = 7, /*[LVT]*/ | | U_GCB_LVT = 7, /*[LVT]*/ | |
| U_GCB_T = 8, /*[T]*/ | | U_GCB_T = 8, /*[T]*/ | |
| U_GCB_V = 9, /*[V]*/ | | U_GCB_V = 9, /*[V]*/ | |
| U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | | U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | |
| | | | |
| skipping to change at line 1594 | | skipping to change at line 1663 | |
| } UGraphemeClusterBreak; | | } UGraphemeClusterBreak; | |
| | | | |
| /** | | /** | |
| * Word Break constants. | | * Word Break constants. | |
| * (UWordBreak is a pre-existing enum type in ubrk.h for word break status
tags.) | | * (UWordBreak is a pre-existing enum type in ubrk.h for word break status
tags.) | |
| * | | * | |
| * @see UCHAR_WORD_BREAK | | * @see UCHAR_WORD_BREAK | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| typedef enum UWordBreakValues { | | typedef enum UWordBreakValues { | |
|
| U_WB_OTHER = 0, /*[XX]*/ /*See note !!*/ | | /* | |
| | | * Note: UWordBreakValues constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_WB_<Unicode Word_Break value name> | |
| | | */ | |
| | | | |
| | | U_WB_OTHER = 0, /*[XX]*/ | |
| U_WB_ALETTER = 1, /*[LE]*/ | | U_WB_ALETTER = 1, /*[LE]*/ | |
| U_WB_FORMAT = 2, /*[FO]*/ | | U_WB_FORMAT = 2, /*[FO]*/ | |
| U_WB_KATAKANA = 3, /*[KA]*/ | | U_WB_KATAKANA = 3, /*[KA]*/ | |
| U_WB_MIDLETTER = 4, /*[ML]*/ | | U_WB_MIDLETTER = 4, /*[ML]*/ | |
| U_WB_MIDNUM = 5, /*[MN]*/ | | U_WB_MIDNUM = 5, /*[MN]*/ | |
| U_WB_NUMERIC = 6, /*[NU]*/ | | U_WB_NUMERIC = 6, /*[NU]*/ | |
| U_WB_EXTENDNUMLET = 7, /*[EX]*/ | | U_WB_EXTENDNUMLET = 7, /*[EX]*/ | |
| U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | | U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.
1/ICU 4.0 */ | |
| U_WB_EXTEND = 9, /*[Extend]*/ | | U_WB_EXTEND = 9, /*[Extend]*/ | |
| U_WB_LF = 10, /*[LF]*/ | | U_WB_LF = 10, /*[LF]*/ | |
| | | | |
| skipping to change at line 1617 | | skipping to change at line 1692 | |
| U_WB_COUNT = 13 | | U_WB_COUNT = 13 | |
| } UWordBreakValues; | | } UWordBreakValues; | |
| | | | |
| /** | | /** | |
| * Sentence Break constants. | | * Sentence Break constants. | |
| * | | * | |
| * @see UCHAR_SENTENCE_BREAK | | * @see UCHAR_SENTENCE_BREAK | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| typedef enum USentenceBreak { | | typedef enum USentenceBreak { | |
|
| U_SB_OTHER = 0, /*[XX]*/ /*See note !!*/ | | /* | |
| | | * Note: USentenceBreak constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_SB_<Unicode Sentence_Break value name> | |
| | | */ | |
| | | | |
| | | U_SB_OTHER = 0, /*[XX]*/ | |
| U_SB_ATERM = 1, /*[AT]*/ | | U_SB_ATERM = 1, /*[AT]*/ | |
| U_SB_CLOSE = 2, /*[CL]*/ | | U_SB_CLOSE = 2, /*[CL]*/ | |
| U_SB_FORMAT = 3, /*[FO]*/ | | U_SB_FORMAT = 3, /*[FO]*/ | |
| U_SB_LOWER = 4, /*[LO]*/ | | U_SB_LOWER = 4, /*[LO]*/ | |
| U_SB_NUMERIC = 5, /*[NU]*/ | | U_SB_NUMERIC = 5, /*[NU]*/ | |
| U_SB_OLETTER = 6, /*[LE]*/ | | U_SB_OLETTER = 6, /*[LE]*/ | |
| U_SB_SEP = 7, /*[SE]*/ | | U_SB_SEP = 7, /*[SE]*/ | |
| U_SB_SP = 8, /*[SP]*/ | | U_SB_SP = 8, /*[SP]*/ | |
| U_SB_STERM = 9, /*[ST]*/ | | U_SB_STERM = 9, /*[ST]*/ | |
| U_SB_UPPER = 10, /*[UP]*/ | | U_SB_UPPER = 10, /*[UP]*/ | |
| | | | |
| skipping to change at line 1642 | | skipping to change at line 1723 | |
| U_SB_COUNT = 15 | | U_SB_COUNT = 15 | |
| } USentenceBreak; | | } USentenceBreak; | |
| | | | |
| /** | | /** | |
| * Line Break constants. | | * Line Break constants. | |
| * | | * | |
| * @see UCHAR_LINE_BREAK | | * @see UCHAR_LINE_BREAK | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum ULineBreak { | | typedef enum ULineBreak { | |
|
| U_LB_UNKNOWN = 0, /*[XX]*/ /*See note !!*/ | | /* | |
| | | * Note: ULineBreak constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_LB_<Unicode Line_Break value name> | |
| | | */ | |
| | | | |
| | | U_LB_UNKNOWN = 0, /*[XX]*/ | |
| U_LB_AMBIGUOUS = 1, /*[AI]*/ | | U_LB_AMBIGUOUS = 1, /*[AI]*/ | |
| U_LB_ALPHABETIC = 2, /*[AL]*/ | | U_LB_ALPHABETIC = 2, /*[AL]*/ | |
| U_LB_BREAK_BOTH = 3, /*[B2]*/ | | U_LB_BREAK_BOTH = 3, /*[B2]*/ | |
| U_LB_BREAK_AFTER = 4, /*[BA]*/ | | U_LB_BREAK_AFTER = 4, /*[BA]*/ | |
| U_LB_BREAK_BEFORE = 5, /*[BB]*/ | | U_LB_BREAK_BEFORE = 5, /*[BB]*/ | |
| U_LB_MANDATORY_BREAK = 6, /*[BK]*/ | | U_LB_MANDATORY_BREAK = 6, /*[BK]*/ | |
| U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ | | U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ | |
| U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ | | U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ | |
| U_LB_COMBINING_MARK = 9, /*[CM]*/ | | U_LB_COMBINING_MARK = 9, /*[CM]*/ | |
| U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ | | U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ | |
| U_LB_EXCLAMATION = 11, /*[EX]*/ | | U_LB_EXCLAMATION = 11, /*[EX]*/ | |
| U_LB_GLUE = 12, /*[GL]*/ | | U_LB_GLUE = 12, /*[GL]*/ | |
| U_LB_HYPHEN = 13, /*[HY]*/ | | U_LB_HYPHEN = 13, /*[HY]*/ | |
| U_LB_IDEOGRAPHIC = 14, /*[ID]*/ | | U_LB_IDEOGRAPHIC = 14, /*[ID]*/ | |
|
| U_LB_INSEPERABLE = 15, | | | |
| /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0
@stable ICU 3.0 */ | | /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0
@stable ICU 3.0 */ | |
|
| U_LB_INSEPARABLE=U_LB_INSEPERABLE,/*[IN]*/ | | U_LB_INSEPARABLE = 15, /*[IN]*/ | |
| | | U_LB_INSEPERABLE = U_LB_INSEPARABLE, | |
| U_LB_INFIX_NUMERIC = 16, /*[IS]*/ | | U_LB_INFIX_NUMERIC = 16, /*[IS]*/ | |
| U_LB_LINE_FEED = 17, /*[LF]*/ | | U_LB_LINE_FEED = 17, /*[LF]*/ | |
| U_LB_NONSTARTER = 18, /*[NS]*/ | | U_LB_NONSTARTER = 18, /*[NS]*/ | |
| U_LB_NUMERIC = 19, /*[NU]*/ | | U_LB_NUMERIC = 19, /*[NU]*/ | |
| U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ | | U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ | |
| U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ | | U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ | |
| U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ | | U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ | |
| U_LB_QUOTATION = 23, /*[QU]*/ | | U_LB_QUOTATION = 23, /*[QU]*/ | |
| U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ | | U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ | |
| U_LB_SURROGATE = 25, /*[SG]*/ | | U_LB_SURROGATE = 25, /*[SG]*/ | |
| | | | |
| skipping to change at line 1681 | | skipping to change at line 1768 | |
| U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ | | U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ | |
| U_LB_ZWSPACE = 28, /*[ZW]*/ | | U_LB_ZWSPACE = 28, /*[ZW]*/ | |
| U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4
/ICU 2.6 */ | | U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4
/ICU 2.6 */ | |
| U_LB_WORD_JOINER = 30, /*[WJ]*/ | | U_LB_WORD_JOINER = 30, /*[WJ]*/ | |
| U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4
.1/ICU 3.4 */ | | U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4
.1/ICU 3.4 */ | |
| U_LB_H3 = 32, /*[H3]*/ | | U_LB_H3 = 32, /*[H3]*/ | |
| U_LB_JL = 33, /*[JL]*/ | | U_LB_JL = 33, /*[JL]*/ | |
| U_LB_JT = 34, /*[JT]*/ | | U_LB_JT = 34, /*[JT]*/ | |
| U_LB_JV = 35, /*[JV]*/ | | U_LB_JV = 35, /*[JV]*/ | |
| U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ | | U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ | |
|
| U_LB_COUNT = 37 | | U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/I | |
| | | CU 49 */ | |
| | | U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ | |
| | | U_LB_COUNT = 39 | |
| } ULineBreak; | | } ULineBreak; | |
| | | | |
| /** | | /** | |
| * Numeric Type constants. | | * Numeric Type constants. | |
| * | | * | |
| * @see UCHAR_NUMERIC_TYPE | | * @see UCHAR_NUMERIC_TYPE | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| */ | | */ | |
| typedef enum UNumericType { | | typedef enum UNumericType { | |
|
| U_NT_NONE, /*[None]*/ /*See note !!*/ | | /* | |
| | | * Note: UNumericType constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_NT_<Unicode Numeric_Type value name> | |
| | | */ | |
| | | | |
| | | U_NT_NONE, /*[None]*/ | |
| U_NT_DECIMAL, /*[de]*/ | | U_NT_DECIMAL, /*[de]*/ | |
| U_NT_DIGIT, /*[di]*/ | | U_NT_DIGIT, /*[di]*/ | |
| U_NT_NUMERIC, /*[nu]*/ | | U_NT_NUMERIC, /*[nu]*/ | |
| U_NT_COUNT | | U_NT_COUNT | |
| } UNumericType; | | } UNumericType; | |
| | | | |
| /** | | /** | |
| * Hangul Syllable Type constants. | | * Hangul Syllable Type constants. | |
| * | | * | |
| * @see UCHAR_HANGUL_SYLLABLE_TYPE | | * @see UCHAR_HANGUL_SYLLABLE_TYPE | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| typedef enum UHangulSyllableType { | | typedef enum UHangulSyllableType { | |
|
| U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/ | | /* | |
| | | * Note: UHangulSyllableType constants are parsed by preparseucd.py. | |
| | | * It matches lines like | |
| | | * U_HST_<Unicode Hangul_Syllable_Type value name> | |
| | | */ | |
| | | | |
| | | U_HST_NOT_APPLICABLE, /*[NA]*/ | |
| U_HST_LEADING_JAMO, /*[L]*/ | | U_HST_LEADING_JAMO, /*[L]*/ | |
| U_HST_VOWEL_JAMO, /*[V]*/ | | U_HST_VOWEL_JAMO, /*[V]*/ | |
| U_HST_TRAILING_JAMO, /*[T]*/ | | U_HST_TRAILING_JAMO, /*[T]*/ | |
| U_HST_LV_SYLLABLE, /*[LV]*/ | | U_HST_LV_SYLLABLE, /*[LV]*/ | |
| U_HST_LVT_SYLLABLE, /*[LVT]*/ | | U_HST_LVT_SYLLABLE, /*[LVT]*/ | |
| U_HST_COUNT | | U_HST_COUNT | |
| } UHangulSyllableType; | | } UHangulSyllableType; | |
| | | | |
| /** | | /** | |
| * Check a binary Unicode property for a code point. | | * Check a binary Unicode property for a code point. | |
| | | | |
| skipping to change at line 1908 | | skipping to change at line 2009 | |
| | | | |
| /** | | /** | |
| * Get the numeric value for a Unicode code point as defined in the | | * Get the numeric value for a Unicode code point as defined in the | |
| * Unicode Character Database. | | * Unicode Character Database. | |
| * | | * | |
| * A "double" return type is necessary because | | * A "double" return type is necessary because | |
| * some numeric values are fractions, negative, or too large for int32_t. | | * some numeric values are fractions, negative, or too large for int32_t. | |
| * | | * | |
| * For characters without any numeric values in the Unicode Character Datab
ase, | | * For characters without any numeric values in the Unicode Character Datab
ase, | |
| * this function will return U_NO_NUMERIC_VALUE. | | * this function will return U_NO_NUMERIC_VALUE. | |
|
| | | * Note: This is different from the Unicode Standard which specifies NaN as | |
| | | the default value. | |
| | | * (NaN is not available on all platforms.) | |
| * | | * | |
| * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue(
) | | * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue(
) | |
| * also supports negative values, large values, and fractions, | | * also supports negative values, large values, and fractions, | |
| * while Java's getNumericValue() returns values 10..35 for ASCII letters. | | * while Java's getNumericValue() returns values 10..35 for ASCII letters. | |
| * | | * | |
| * @param c Code point to get the numeric value for. | | * @param c Code point to get the numeric value for. | |
| * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. | | * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. | |
| * | | * | |
| * @see U_NO_NUMERIC_VALUE | | * @see U_NO_NUMERIC_VALUE | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| | | | |
| skipping to change at line 2556 | | skipping to change at line 2659 | |
| * @see u_charFromName | | * @see u_charFromName | |
| * @see u_enumCharNames | | * @see u_enumCharNames | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_charName(UChar32 code, UCharNameChoice nameChoice, | | u_charName(UChar32 code, UCharNameChoice nameChoice, | |
| char *buffer, int32_t bufferLength, | | char *buffer, int32_t bufferLength, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
|
| * Get the ISO 10646 comment for a character. | | * Returns an empty string. | |
| * The ISO 10646 comment is an informative field in the Unicode Character | | * Used to return the ISO 10646 comment for a character. | |
| * Database (UnicodeData.txt field 11) and is from the ISO 10646 names list | | * The Unicode ISO_Comment property is deprecated and has no values. | |
| . | | | |
| * | | | |
| * Note: Unicode 5.2 removes all ISO comment data, resulting in empty strin | | | |
| gs | | | |
| * returned for all characters. | | | |
| * | | * | |
| * @param c The character (code point) for which to get the ISO comment. | | * @param c The character (code point) for which to get the ISO comment. | |
| * It must be <code>0<=c<=0x10ffff</code>. | | * It must be <code>0<=c<=0x10ffff</code>. | |
| * @param dest Destination address for copying the comment. | | * @param dest Destination address for copying the comment. | |
| * The comment will be zero-terminated if possible. | | * The comment will be zero-terminated if possible. | |
| * If there is no comment, then the buffer will be set to the e
mpty string. | | * If there is no comment, then the buffer will be set to the e
mpty string. | |
| * @param destCapacity <code>==sizeof(dest)</code> | | * @param destCapacity <code>==sizeof(dest)</code> | |
| * @param pErrorCode Pointer to a UErrorCode variable; | | * @param pErrorCode Pointer to a UErrorCode variable; | |
| * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()<
/code> | | * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()<
/code> | |
| * returns. | | * returns. | |
|
| * @return The length of the comment, or 0 if there is no comment for this | | * @return 0 | |
| character. | | | |
| * If the destCapacity is less than or equal to the length, then th | | | |
| e buffer | | | |
| * contains the truncated name and the returned length indicates th | | | |
| e full | | | |
| * length of the name. | | | |
| * The length does not include the zero-termination. | | | |
| * | | * | |
|
| * @stable ICU 2.2 | | * @deprecated ICU 49 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_getISOComment(UChar32 c, | | u_getISOComment(UChar32 c, | |
| char *dest, int32_t destCapacity, | | char *dest, int32_t destCapacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Find a Unicode character by its name and return its code point value. | | * Find a Unicode character by its name and return its code point value. | |
| * The name is matched exactly and completely. | | * The name is matched exactly and completely. | |
| * If the name does not correspond to a code point, <i>pErrorCode</i> | | * If the name does not correspond to a code point, <i>pErrorCode</i> | |
| | | | |
End of changes. 51 change blocks. |
| 76 lines changed or deleted | | 173 lines changed or added | |
|
| ucharstrie.h | | ucharstrie.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
|
| * Copyright (C) 2010-2011, International Business Machines | | * Copyright (C) 2010-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * file name: ucharstrie.h | | * file name: ucharstrie.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2010nov14 | | * created on: 2010nov14 | |
| * created by: Markus W. Scherer | | * created by: Markus W. Scherer | |
| */ | | */ | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| * Light-weight, non-const reader class for a UCharsTrie. | | * Light-weight, non-const reader class for a UCharsTrie. | |
| * Traverses a UChar-serialized data structure with minimal state, | | * Traverses a UChar-serialized data structure with minimal state, | |
| * for mapping strings (16-bit-unit sequences) to non-negative integer valu
es. | | * for mapping strings (16-bit-unit sequences) to non-negative integer valu
es. | |
| * | | * | |
| * This class owns the serialized trie data only if it was constructed by | | * This class owns the serialized trie data only if it was constructed by | |
| * the builder's build() method. | | * the builder's build() method. | |
| * The public constructor and the copy constructor only alias the data (onl
y copy the pointer). | | * The public constructor and the copy constructor only alias the data (onl
y copy the pointer). | |
| * There is no assignment operator. | | * There is no assignment operator. | |
| * | | * | |
| * This class is not intended for public subclassing. | | * This class is not intended for public subclassing. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| class U_COMMON_API UCharsTrie : public UMemory { | | class U_COMMON_API UCharsTrie : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Constructs a UCharsTrie reader instance. | | * Constructs a UCharsTrie reader instance. | |
| * | | * | |
| * The trieUChars must contain a copy of a UChar sequence from the UCha
rsTrieBuilder, | | * The trieUChars must contain a copy of a UChar sequence from the UCha
rsTrieBuilder, | |
| * starting with the first UChar of that sequence. | | * starting with the first UChar of that sequence. | |
| * The UCharsTrie object will not read more UChars than | | * The UCharsTrie object will not read more UChars than | |
| * the UCharsTrieBuilder generated in the corresponding build() call. | | * the UCharsTrieBuilder generated in the corresponding build() call. | |
| * | | * | |
| * The array is not copied/cloned and must not be modified while | | * The array is not copied/cloned and must not be modified while | |
| * the UCharsTrie object is in use. | | * the UCharsTrie object is in use. | |
| * | | * | |
| * @param trieUChars The UChar array that contains the serialized trie. | | * @param trieUChars The UChar array that contains the serialized trie. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCharsTrie(const UChar *trieUChars) | | UCharsTrie(const UChar *trieUChars) | |
| : ownedArray_(NULL), uchars_(trieUChars), | | : ownedArray_(NULL), uchars_(trieUChars), | |
| pos_(uchars_), remainingMatchLength_(-1) {} | | pos_(uchars_), remainingMatchLength_(-1) {} | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| ~UCharsTrie(); | | ~UCharsTrie(); | |
| | | | |
| /** | | /** | |
| * Copy constructor, copies the other trie reader object and its state, | | * Copy constructor, copies the other trie reader object and its state, | |
| * but not the UChar array which will be shared. (Shallow copy.) | | * but not the UChar array which will be shared. (Shallow copy.) | |
| * @param other Another UCharsTrie object. | | * @param other Another UCharsTrie object. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCharsTrie(const UCharsTrie &other) | | UCharsTrie(const UCharsTrie &other) | |
| : ownedArray_(NULL), uchars_(other.uchars_), | | : ownedArray_(NULL), uchars_(other.uchars_), | |
| pos_(other.pos_), remainingMatchLength_(other.remainingMatchL
ength_) {} | | pos_(other.pos_), remainingMatchLength_(other.remainingMatchL
ength_) {} | |
| | | | |
| /** | | /** | |
| * Resets this trie to its initial state. | | * Resets this trie to its initial state. | |
| * @return *this | | * @return *this | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCharsTrie &reset() { | | UCharsTrie &reset() { | |
| pos_=uchars_; | | pos_=uchars_; | |
| remainingMatchLength_=-1; | | remainingMatchLength_=-1; | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * UCharsTrie state object, for saving a trie's current state | | * UCharsTrie state object, for saving a trie's current state | |
| * and resetting the trie back to this state later. | | * and resetting the trie back to this state later. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| class State : public UMemory { | | class State : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Constructs an empty State. | | * Constructs an empty State. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| State() { uchars=NULL; } | | State() { uchars=NULL; } | |
| private: | | private: | |
| friend class UCharsTrie; | | friend class UCharsTrie; | |
| | | | |
| const UChar *uchars; | | const UChar *uchars; | |
| const UChar *pos; | | const UChar *pos; | |
| int32_t remainingMatchLength; | | int32_t remainingMatchLength; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Saves the state of this trie. | | * Saves the state of this trie. | |
| * @param state The State object to hold the trie's state. | | * @param state The State object to hold the trie's state. | |
| * @return *this | | * @return *this | |
| * @see resetToState | | * @see resetToState | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| const UCharsTrie &saveState(State &state) const { | | const UCharsTrie &saveState(State &state) const { | |
| state.uchars=uchars_; | | state.uchars=uchars_; | |
| state.pos=pos_; | | state.pos=pos_; | |
| state.remainingMatchLength=remainingMatchLength_; | | state.remainingMatchLength=remainingMatchLength_; | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Resets this trie to the saved state. | | * Resets this trie to the saved state. | |
| * If the state object contains no state, or the state of a different t
rie, | | * If the state object contains no state, or the state of a different t
rie, | |
| * then this trie remains unchanged. | | * then this trie remains unchanged. | |
| * @param state The State object which holds a saved trie state. | | * @param state The State object which holds a saved trie state. | |
| * @return *this | | * @return *this | |
| * @see saveState | | * @see saveState | |
| * @see reset | | * @see reset | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCharsTrie &resetToState(const State &state) { | | UCharsTrie &resetToState(const State &state) { | |
| if(uchars_==state.uchars && uchars_!=NULL) { | | if(uchars_==state.uchars && uchars_!=NULL) { | |
| pos_=state.pos; | | pos_=state.pos; | |
| remainingMatchLength_=state.remainingMatchLength; | | remainingMatchLength_=state.remainingMatchLength; | |
| } | | } | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Determines whether the string so far matches, whether it has a value
, | | * Determines whether the string so far matches, whether it has a value
, | |
| * and whether another input UChar can continue a matching string. | | * and whether another input UChar can continue a matching string. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UStringTrieResult current() const; | | UStringTrieResult current() const; | |
| | | | |
| /** | | /** | |
| * Traverses the trie from the initial state for this input UChar. | | * Traverses the trie from the initial state for this input UChar. | |
| * Equivalent to reset().next(uchar). | | * Equivalent to reset().next(uchar). | |
| * @param uchar Input char value. Values below 0 and above 0xffff will
never match. | | * @param uchar Input char value. Values below 0 and above 0xffff will
never match. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| inline UStringTrieResult first(int32_t uchar) { | | inline UStringTrieResult first(int32_t uchar) { | |
| remainingMatchLength_=-1; | | remainingMatchLength_=-1; | |
| return nextImpl(uchars_, uchar); | | return nextImpl(uchars_, uchar); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Traverses the trie from the initial state for the | | * Traverses the trie from the initial state for the | |
| * one or two UTF-16 code units for this input code point. | | * one or two UTF-16 code units for this input code point. | |
| * Equivalent to reset().nextForCodePoint(cp). | | * Equivalent to reset().nextForCodePoint(cp). | |
| * @param cp A Unicode code point 0..0x10ffff. | | * @param cp A Unicode code point 0..0x10ffff. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| inline UStringTrieResult firstForCodePoint(UChar32 cp) { | | UStringTrieResult firstForCodePoint(UChar32 cp); | |
| return cp<=0xffff ? | | | |
| first(cp) : | | | |
| (USTRINGTRIE_HAS_NEXT(first(U16_LEAD(cp))) ? | | | |
| next(U16_TRAIL(cp)) : | | | |
| USTRINGTRIE_NO_MATCH); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| * Traverses the trie from the current state for this input UChar. | | * Traverses the trie from the current state for this input UChar. | |
| * @param uchar Input char value. Values below 0 and above 0xffff will
never match. | | * @param uchar Input char value. Values below 0 and above 0xffff will
never match. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UStringTrieResult next(int32_t uchar); | | UStringTrieResult next(int32_t uchar); | |
| | | | |
| /** | | /** | |
| * Traverses the trie from the current state for the | | * Traverses the trie from the current state for the | |
| * one or two UTF-16 code units for this input code point. | | * one or two UTF-16 code units for this input code point. | |
| * @param cp A Unicode code point 0..0x10ffff. | | * @param cp A Unicode code point 0..0x10ffff. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
|
| inline UStringTrieResult nextForCodePoint(UChar32 cp) { | | UStringTrieResult nextForCodePoint(UChar32 cp); | |
| return cp<=0xffff ? | | | |
| next(cp) : | | | |
| (USTRINGTRIE_HAS_NEXT(next(U16_LEAD(cp))) ? | | | |
| next(U16_TRAIL(cp)) : | | | |
| USTRINGTRIE_NO_MATCH); | | | |
| } | | | |
| | | | |
| /** | | /** | |
| * Traverses the trie from the current state for this string. | | * Traverses the trie from the current state for this string. | |
| * Equivalent to | | * Equivalent to | |
| * \code | | * \code | |
| * Result result=current(); | | * Result result=current(); | |
| * for(each c in s) | | * for(each c in s) | |
| * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; | | * if(!USTRINGTRIE_HAS_NEXT(result)) return USTRINGTRIE_NO_MATCH; | |
| * result=next(c); | | * result=next(c); | |
| * return result; | | * return result; | |
| * \endcode | | * \endcode | |
| * @param s A string. Can be NULL if length is 0. | | * @param s A string. Can be NULL if length is 0. | |
| * @param length The length of the string. Can be -1 if NUL-terminated. | | * @param length The length of the string. Can be -1 if NUL-terminated. | |
| * @return The match/value Result. | | * @return The match/value Result. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UStringTrieResult next(const UChar *s, int32_t length); | | UStringTrieResult next(const UChar *s, int32_t length); | |
| | | | |
| /** | | /** | |
| * Returns a matching string's value if called immediately after | | * Returns a matching string's value if called immediately after | |
| * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or
USTRINGTRIE_FINAL_VALUE. | | * current()/first()/next() returned USTRINGTRIE_INTERMEDIATE_VALUE or
USTRINGTRIE_FINAL_VALUE. | |
| * getValue() can be called multiple times. | | * getValue() can be called multiple times. | |
| * | | * | |
| * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_
VALUE! | | * Do not call getValue() after USTRINGTRIE_NO_MATCH or USTRINGTRIE_NO_
VALUE! | |
| * @return The value for the string so far. | | * @return The value for the string so far. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| inline int32_t getValue() const { | | inline int32_t getValue() const { | |
| const UChar *pos=pos_; | | const UChar *pos=pos_; | |
| int32_t leadUnit=*pos++; | | int32_t leadUnit=*pos++; | |
| // U_ASSERT(leadUnit>=kMinValueLead); | | // U_ASSERT(leadUnit>=kMinValueLead); | |
| return leadUnit&kValueIsFinal ? | | return leadUnit&kValueIsFinal ? | |
| readValue(pos, leadUnit&0x7fff) : readNodeValue(pos, leadUnit); | | readValue(pos, leadUnit&0x7fff) : readNodeValue(pos, leadUnit); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Determines whether all strings reachable from the current state | | * Determines whether all strings reachable from the current state | |
| * map to the same value. | | * map to the same value. | |
| * @param uniqueValue Receives the unique value, if this function retur
ns TRUE. | | * @param uniqueValue Receives the unique value, if this function retur
ns TRUE. | |
| * (output-only) | | * (output-only) | |
| * @return TRUE if all strings reachable from the current state | | * @return TRUE if all strings reachable from the current state | |
| * map to the same value. | | * map to the same value. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| inline UBool hasUniqueValue(int32_t &uniqueValue) const { | | inline UBool hasUniqueValue(int32_t &uniqueValue) const { | |
| const UChar *pos=pos_; | | const UChar *pos=pos_; | |
| // Skip the rest of a pending linear-match node. | | // Skip the rest of a pending linear-match node. | |
| return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA
LSE, uniqueValue); | | return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, FA
LSE, uniqueValue); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Finds each UChar which continues the string from the current state. | | * Finds each UChar which continues the string from the current state. | |
| * That is, each UChar c for which it would be next(c)!=USTRINGTRIE_NO_
MATCH now. | | * That is, each UChar c for which it would be next(c)!=USTRINGTRIE_NO_
MATCH now. | |
| * @param out Each next UChar is appended to this object. | | * @param out Each next UChar is appended to this object. | |
| * @return the number of UChars which continue the string from here | | * @return the number of UChars which continue the string from here | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getNextUChars(Appendable &out) const; | | int32_t getNextUChars(Appendable &out) const; | |
| | | | |
| /** | | /** | |
| * Iterator for all of the (string, value) pairs in a UCharsTrie. | | * Iterator for all of the (string, value) pairs in a UCharsTrie. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| class U_COMMON_API Iterator : public UMemory { | | class U_COMMON_API Iterator : public UMemory { | |
| public: | | public: | |
| /** | | /** | |
| * Iterates from the root of a UChar-serialized UCharsTrie. | | * Iterates from the root of a UChar-serialized UCharsTrie. | |
| * @param trieUChars The trie UChars. | | * @param trieUChars The trie UChars. | |
| * @param maxStringLength If 0, the iterator returns full strings. | | * @param maxStringLength If 0, the iterator returns full strings. | |
| * Otherwise, the iterator returns strings w
ith this maximum length. | | * Otherwise, the iterator returns strings w
ith this maximum length. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function
returns | | * pass the U_SUCCESS() test, or else the function
returns | |
| * immediately. Check for U_FAILURE() on output or
use with | | * immediately. Check for U_FAILURE() on output or
use with | |
| * function chaining. (See User Guide for details.
) | | * function chaining. (See User Guide for details.
) | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| Iterator(const UChar *trieUChars, int32_t maxStringLength, UErrorCo
de &errorCode); | | Iterator(const UChar *trieUChars, int32_t maxStringLength, UErrorCo
de &errorCode); | |
| | | | |
| /** | | /** | |
| * Iterates from the current state of the specified UCharsTrie. | | * Iterates from the current state of the specified UCharsTrie. | |
| * @param trie The trie whose state will be copied for iteration. | | * @param trie The trie whose state will be copied for iteration. | |
| * @param maxStringLength If 0, the iterator returns full strings. | | * @param maxStringLength If 0, the iterator returns full strings. | |
| * Otherwise, the iterator returns strings w
ith this maximum length. | | * Otherwise, the iterator returns strings w
ith this maximum length. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function
returns | | * pass the U_SUCCESS() test, or else the function
returns | |
| * immediately. Check for U_FAILURE() on output or
use with | | * immediately. Check for U_FAILURE() on output or
use with | |
| * function chaining. (See User Guide for details.
) | | * function chaining. (See User Guide for details.
) | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| Iterator(const UCharsTrie &trie, int32_t maxStringLength, UErrorCod
e &errorCode); | | Iterator(const UCharsTrie &trie, int32_t maxStringLength, UErrorCod
e &errorCode); | |
| | | | |
| /** | | /** | |
| * Destructor. | | * Destructor. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| ~Iterator(); | | ~Iterator(); | |
| | | | |
| /** | | /** | |
| * Resets this iterator to its initial state. | | * Resets this iterator to its initial state. | |
| * @return *this | | * @return *this | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| Iterator &reset(); | | Iterator &reset(); | |
| | | | |
| /** | | /** | |
| * @return TRUE if there are more elements. | | * @return TRUE if there are more elements. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool hasNext() const; | | UBool hasNext() const; | |
| | | | |
| /** | | /** | |
| * Finds the next (string, value) pair if there is one. | | * Finds the next (string, value) pair if there is one. | |
| * | | * | |
| * If the string is truncated to the maximum length and does not | | * If the string is truncated to the maximum length and does not | |
| * have a real value, then the value is set to -1. | | * have a real value, then the value is set to -1. | |
| * In this case, this "not a real value" is indistinguishable from | | * In this case, this "not a real value" is indistinguishable from | |
| * a real value of -1. | | * a real value of -1. | |
| * @param errorCode Standard ICU error code. Its input value must | | * @param errorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function
returns | | * pass the U_SUCCESS() test, or else the function
returns | |
| * immediately. Check for U_FAILURE() on output or
use with | | * immediately. Check for U_FAILURE() on output or
use with | |
| * function chaining. (See User Guide for details.
) | | * function chaining. (See User Guide for details.
) | |
| * @return TRUE if there is another element. | | * @return TRUE if there is another element. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UBool next(UErrorCode &errorCode); | | UBool next(UErrorCode &errorCode); | |
| | | | |
| /** | | /** | |
| * @return The string for the last successful next(). | | * @return The string for the last successful next(). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| const UnicodeString &getString() const { return str_; } | | const UnicodeString &getString() const { return str_; } | |
| /** | | /** | |
| * @return The value for the last successful next(). | | * @return The value for the last successful next(). | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| int32_t getValue() const { return value_; } | | int32_t getValue() const { return value_; } | |
| | | | |
| private: | | private: | |
| UBool truncateAndStop() { | | UBool truncateAndStop() { | |
| pos_=NULL; | | pos_=NULL; | |
| value_=-1; // no real value for str | | value_=-1; // no real value for str | |
| return TRUE; | | return TRUE; | |
| } | | } | |
| | | | |
| | | | |
End of changes. 30 change blocks. |
| 42 lines changed or deleted | | 30 lines changed or added | |
|
| ucol.h | | ucol.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
|
| * Copyright (c) 1996-2011, International Business Machines Corporation and
others. | | * Copyright (c) 1996-2012, International Business Machines Corporation and
others. | |
| * All Rights Reserved. | | * All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| */ | | */ | |
| | | | |
| #ifndef UCOL_H | | #ifndef UCOL_H | |
| #define UCOL_H | | #define UCOL_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| #if !UCONFIG_NO_COLLATION | | #if !UCONFIG_NO_COLLATION | |
| | | | |
| skipping to change at line 140 | | skipping to change at line 140 | |
| UCOL_ATTRIBUTE_VALUE_COUNT | | UCOL_ATTRIBUTE_VALUE_COUNT | |
| | | | |
| } UColAttributeValue; | | } UColAttributeValue; | |
| | | | |
| /** | | /** | |
| * Enum containing the codes for reordering segments of the collation table
that are not script | | * Enum containing the codes for reordering segments of the collation table
that are not script | |
| * codes. These reordering codes are to be used in conjunction with the scr
ipt codes. | | * codes. These reordering codes are to be used in conjunction with the scr
ipt codes. | |
| * @see ucol_getReorderCodes | | * @see ucol_getReorderCodes | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see ucol_getEquivalentReorderCodes | | * @see ucol_getEquivalentReorderCodes | |
|
| * @draft ICU 4.8 | | * @see UScriptCode | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| /** | | /** | |
| * A special reordering code that is used to specify the default | | * A special reordering code that is used to specify the default | |
| * reordering codes for a locale. | | * reordering codes for a locale. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_DEFAULT = -1, | | UCOL_REORDER_CODE_DEFAULT = -1, | |
| /** | | /** | |
| * A special reordering code that is used to specify no reordering codes
. | | * A special reordering code that is used to specify no reordering codes
. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN, | | UCOL_REORDER_CODE_NONE = USCRIPT_UNKNOWN, | |
| /** | | /** | |
| * A special reordering code that is used to specify all other codes use
d for | | * A special reordering code that is used to specify all other codes use
d for | |
| * reordering except for the codes lised as UColReorderCode values and t
hose | | * reordering except for the codes lised as UColReorderCode values and t
hose | |
| * listed explicitly in a reordering. | | * listed explicitly in a reordering. | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN, | | UCOL_REORDER_CODE_OTHERS = USCRIPT_UNKNOWN, | |
| /** | | /** | |
| * Characters with the space property. | | * Characters with the space property. | |
|
| * @draft ICU 4.8 | | * This is equivalent to the rule value "space". | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_SPACE = 0x1000, | | UCOL_REORDER_CODE_SPACE = 0x1000, | |
| /** | | /** | |
|
| * The first entry in the enumeration of reordering groups. | | * The first entry in the enumeration of reordering groups. This is inte | |
| * @draft ICU 4.8 | | nded for use in | |
| | | * range checking and enumeration of the reorder codes. | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE, | | UCOL_REORDER_CODE_FIRST = UCOL_REORDER_CODE_SPACE, | |
| /** | | /** | |
| * Characters with the punctuation property. | | * Characters with the punctuation property. | |
|
| * @draft ICU 4.8 | | * This is equivalent to the rule value "punct". | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_PUNCTUATION = 0x1001, | | UCOL_REORDER_CODE_PUNCTUATION = 0x1001, | |
| /** | | /** | |
| * Characters with the symbol property. | | * Characters with the symbol property. | |
|
| * @draft ICU 4.8 | | * This is equivalent to the rule value "symbol". | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_SYMBOL = 0x1002, | | UCOL_REORDER_CODE_SYMBOL = 0x1002, | |
| /** | | /** | |
| * Characters with the currency property. | | * Characters with the currency property. | |
|
| * @draft ICU 4.8 | | * This is equivalent to the rule value "currency". | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_CURRENCY = 0x1003, | | UCOL_REORDER_CODE_CURRENCY = 0x1003, | |
| /** | | /** | |
| * Characters with the digit property. | | * Characters with the digit property. | |
|
| * @draft ICU 4.8 | | * This is equivalent to the rule value "digit". | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_DIGIT = 0x1004, | | UCOL_REORDER_CODE_DIGIT = 0x1004, | |
| /** | | /** | |
|
| * The limit of the reorder codes. | | * The limit of the reorder codes. This is intended for use in range che | |
| * @draft ICU 4.8 | | cking | |
| | | * and enumeration of the reorder codes. | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| UCOL_REORDER_CODE_LIMIT = 0x1005 | | UCOL_REORDER_CODE_LIMIT = 0x1005 | |
| } UColReorderCode; | | } UColReorderCode; | |
| | | | |
| /** | | /** | |
| * Base letter represents a primary difference. Set comparison | | * Base letter represents a primary difference. Set comparison | |
| * level to UCOL_PRIMARY to ignore secondary and tertiary differences. | | * level to UCOL_PRIMARY to ignore secondary and tertiary differences. | |
| * Use this to set the strength of a Collator object. | | * Use this to set the strength of a Collator object. | |
| * Example of primary difference, "abc" < "abd" | | * Example of primary difference, "abc" < "abd" | |
| * | | * | |
| | | | |
| skipping to change at line 399 | | skipping to change at line 407 | |
| * @see ucol_normalizeShortDefinitionString | | * @see ucol_normalizeShortDefinitionString | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| * | | * | |
| */ | | */ | |
| U_STABLE UCollator* U_EXPORT2 | | U_STABLE UCollator* U_EXPORT2 | |
| ucol_openFromShortString( const char *definition, | | ucol_openFromShortString( const char *definition, | |
| UBool forceDefaults, | | UBool forceDefaults, | |
| UParseError *parseError, | | UParseError *parseError, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * Get a set containing the contractions defined by the collator. The set i
ncludes | | * Get a set containing the contractions defined by the collator. The set i
ncludes | |
| * both the UCA contractions and the contractions defined by the collator.
This set | | * both the UCA contractions and the contractions defined by the collator.
This set | |
| * will contain only strings. If a tailoring explicitly suppresses contract
ions from | | * will contain only strings. If a tailoring explicitly suppresses contract
ions from | |
| * the UCA (like Russian), removed contractions will not be in the resultin
g set. | | * the UCA (like Russian), removed contractions will not be in the resultin
g set. | |
| * @param coll collator | | * @param coll collator | |
| * @param conts the set to hold the result. It gets emptied before | | * @param conts the set to hold the result. It gets emptied before | |
| * contractions are added. | | * contractions are added. | |
| * @param status to hold the error code | | * @param status to hold the error code | |
| * @return the size of the contraction set | | * @return the size of the contraction set | |
| * | | * | |
| * @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead | | * @deprecated ICU 3.4, use ucol_getContractionsAndExpansions instead | |
| */ | | */ | |
| U_DEPRECATED int32_t U_EXPORT2 | | U_DEPRECATED int32_t U_EXPORT2 | |
| ucol_getContractions( const UCollator *coll, | | ucol_getContractions( const UCollator *coll, | |
| USet *conts, | | USet *conts, | |
| UErrorCode *status); | | UErrorCode *status); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * Get a set containing the expansions defined by the collator. The set inc
ludes | | * Get a set containing the expansions defined by the collator. The set inc
ludes | |
| * both the UCA expansions and the expansions defined by the tailoring | | * both the UCA expansions and the expansions defined by the tailoring | |
| * @param coll collator | | * @param coll collator | |
| * @param contractions if not NULL, the set to hold the contractions | | * @param contractions if not NULL, the set to hold the contractions | |
| * @param expansions if not NULL, the set to hold the expansions | | * @param expansions if not NULL, the set to hold the expansions | |
| * @param addPrefixes add the prefix contextual elements to contractions | | * @param addPrefixes add the prefix contextual elements to contractions | |
| * @param status to hold the error code | | * @param status to hold the error code | |
| * | | * | |
| | | | |
| skipping to change at line 599 | | skipping to change at line 609 | |
| * These reordering codes are a combination of UScript codes and UColReorde
rCode entries. | | * These reordering codes are a combination of UScript codes and UColReorde
rCode entries. | |
| * @param coll The UCollator to query. | | * @param coll The UCollator to query. | |
| * @param dest The array to fill with the script ordering. | | * @param dest The array to fill with the script ordering. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be NUL
L and the function | | * @param destCapacity The length of dest. If it is 0, then dest may be NUL
L and the function | |
| * will only return the length of the result without writing any of the res
ult string (pre-flighting). | | * will only return the length of the result without writing any of the res
ult string (pre-flighting). | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | |
| * failure before the function call. | | * failure before the function call. | |
| * @return The number of reordering codes written to the dest array. | | * @return The number of reordering codes written to the dest array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see ucol_getEquivalentReorderCodes | | * @see ucol_getEquivalentReorderCodes | |
|
| * @draft ICU 4.8 | | * @see UScriptCode | |
| | | * @see UColReorderCode | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| ucol_getReorderCodes(const UCollator* coll, | | ucol_getReorderCodes(const UCollator* coll, | |
| int32_t* dest, | | int32_t* dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| /** | | /** | |
| * Sets the reordering codes for this collator. | | * Sets the reordering codes for this collator. | |
| * Collation reordering allows scripts and some other defined blocks of cha
racters | | * Collation reordering allows scripts and some other defined blocks of cha
racters | |
| * to be moved relative to each other as a block. This reordering is done o
n top of | | * to be moved relative to each other as a block. This reordering is done o
n top of | |
| | | | |
| skipping to change at line 627 | | skipping to change at line 639 | |
| * these special non-script blocks if those special blocks are explicitly s
pecified in the reordering. | | * these special non-script blocks if those special blocks are explicitly s
pecified in the reordering. | |
| * <p>The special code OTHERS stands for any script that is not explicitly | | * <p>The special code OTHERS stands for any script that is not explicitly | |
| * mentioned in the list of reordering codes given. Anything that is after
OTHERS | | * mentioned in the list of reordering codes given. Anything that is after
OTHERS | |
| * will go at the very end of the reordering in the order given. | | * will go at the very end of the reordering in the order given. | |
| * <p>The special reorder code DEFAULT will reset the reordering for this c
ollator | | * <p>The special reorder code DEFAULT will reset the reordering for this c
ollator | |
| * to the default for this collator. The default reordering may be the DUCE
T/CLDR order or may be a reordering that | | * to the default for this collator. The default reordering may be the DUCE
T/CLDR order or may be a reordering that | |
| * was specified when this collator was created from resource data or from
rules. The | | * was specified when this collator was created from resource data or from
rules. The | |
| * DEFAULT code <b>must</b> be the sole code supplied when it used. If not | | * DEFAULT code <b>must</b> be the sole code supplied when it used. If not | |
| * that will result in an U_ILLEGAL_ARGUMENT_ERROR being set. | | * that will result in an U_ILLEGAL_ARGUMENT_ERROR being set. | |
| * <p>The special reorder code NONE will remove any reordering for this col
lator. | | * <p>The special reorder code NONE will remove any reordering for this col
lator. | |
|
| * The result of setting no reordering will be to have the DUCET/CLDR reord
ering used. The | | * The result of setting no reordering will be to have the DUCET/CLDR order
ing used. The | |
| * NONE code <b>must</b> be the sole code supplied when it used. | | * NONE code <b>must</b> be the sole code supplied when it used. | |
| * @param coll The UCollator to set. | | * @param coll The UCollator to set. | |
| * @param reorderCodes An array of script codes in the new order. This can
be NULL if the | | * @param reorderCodes An array of script codes in the new order. This can
be NULL if the | |
| * length is also set to 0. An empty array will clear any reordering codes
on the collator. | | * length is also set to 0. An empty array will clear any reordering codes
on the collator. | |
| * @param reorderCodesLength The length of reorderCodes. | | * @param reorderCodesLength The length of reorderCodes. | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate a | |
| * failure before the function call. | | * failure before the function call. | |
| * @see ucol_getReorderCodes | | * @see ucol_getReorderCodes | |
| * @see ucol_getEquivalentReorderCodes | | * @see ucol_getEquivalentReorderCodes | |
|
| * @draft ICU 4.8 | | * @see UScriptCode | |
| | | * @see UColReorderCode | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| ucol_setReorderCodes(UCollator* coll, | | ucol_setReorderCodes(UCollator* coll, | |
| const int32_t* reorderCodes, | | const int32_t* reorderCodes, | |
| int32_t reorderCodesLength, | | int32_t reorderCodesLength, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Retrieves the reorder codes that are grouped with the given reorder code
. Some reorder | | * Retrieves the reorder codes that are grouped with the given reorder code
. Some reorder | |
| * codes will be grouped and must reorder together. | | * codes will be grouped and must reorder together. | |
| * @param reorderCode The reorder code to determine equivalence for. | | * @param reorderCode The reorder code to determine equivalence for. | |
| * @param dest The array to fill with the script ordering. | | * @param dest The array to fill with the script ordering. | |
| * @param destCapacity The length of dest. If it is 0, then dest may be NUL
L and the function | | * @param destCapacity The length of dest. If it is 0, then dest may be NUL
L and the function | |
| * will only return the length of the result without writing any of the res
ult string (pre-flighting). | | * will only return the length of the result without writing any of the res
ult string (pre-flighting). | |
| * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate | | * @param pErrorCode Must be a valid pointer to an error code value, which
must not indicate | |
| * a failure before the function call. | | * a failure before the function call. | |
| * @return The number of reordering codes written to the dest array. | | * @return The number of reordering codes written to the dest array. | |
| * @see ucol_setReorderCodes | | * @see ucol_setReorderCodes | |
| * @see ucol_getReorderCodes | | * @see ucol_getReorderCodes | |
|
| * @draft ICU 4.8 | | * @see UScriptCode | |
| | | * @see UColReorderCode | |
| | | * @stable ICU 4.8 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| ucol_getEquivalentReorderCodes(int32_t reorderCode, | | ucol_getEquivalentReorderCodes(int32_t reorderCode, | |
| int32_t* dest, | | int32_t* dest, | |
| int32_t destCapacity, | | int32_t destCapacity, | |
| UErrorCode *pErrorCode); | | UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Get the display name for a UCollator. | | * Get the display name for a UCollator. | |
| * The display name is suitable for presentation to a user. | | * The display name is suitable for presentation to a user. | |
| | | | |
| skipping to change at line 1143 | | skipping to change at line 1159 | |
| */ | | */ | |
| U_STABLE UCollator* U_EXPORT2 | | U_STABLE UCollator* U_EXPORT2 | |
| ucol_safeClone(const UCollator *coll, | | ucol_safeClone(const UCollator *coll, | |
| void *stackBuffer, | | void *stackBuffer, | |
| int32_t *pBufferSize, | | int32_t *pBufferSize, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** default memory size for the new clone. It needs to be this large for os
/400 large pointers | | /** default memory size for the new clone. It needs to be this large for os
/400 large pointers | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #define U_COL_SAFECLONE_BUFFERSIZE 512 | | #define U_COL_SAFECLONE_BUFFERSIZE 528 | |
| | | | |
| /** | | /** | |
| * Returns current rules. Delta defines whether full rules are returned or
just the tailoring. | | * Returns current rules. Delta defines whether full rules are returned or
just the tailoring. | |
| * Returns number of UChars needed to store rules. If buffer is NULL or buf
ferLen is not enough | | * Returns number of UChars needed to store rules. If buffer is NULL or buf
ferLen is not enough | |
| * to store rules, will store up to available space. | | * to store rules, will store up to available space. | |
| * @param coll collator to get the rules from | | * @param coll collator to get the rules from | |
| * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | | * @param delta one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. | |
| * @param buffer buffer to store the result in. If NULL, you'll get no rule
s. | | * @param buffer buffer to store the result in. If NULL, you'll get no rule
s. | |
| * @param bufferLen lenght of buffer to store rules in. If less then needed
you'll get only the part that fits in. | | * @param bufferLen lenght of buffer to store rules in. If less then needed
you'll get only the part that fits in. | |
| * @return current rules | | * @return current rules | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer,
int32_t bufferLen); | | ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer,
int32_t bufferLen); | |
| | | | |
|
| | | #ifndef U_HIDE_DEPRECATED_API | |
| /** | | /** | |
| * gets the locale name of the collator. If the collator | | * gets the locale name of the collator. If the collator | |
| * is instantiated from the rules, then this function returns | | * is instantiated from the rules, then this function returns | |
| * NULL. | | * NULL. | |
| * @param coll The UCollator for which the locale is needed | | * @param coll The UCollator for which the locale is needed | |
| * @param type You can choose between requested, valid and actual | | * @param type You can choose between requested, valid and actual | |
| * locale. For description see the definition of | | * locale. For description see the definition of | |
| * ULocDataLocaleType in uloc.h | | * ULocDataLocaleType in uloc.h | |
| * @param status error code of the operation | | * @param status error code of the operation | |
| * @return real locale name from which the collation data comes. | | * @return real locale name from which the collation data comes. | |
| * If the collator was instantiated from rules, returns | | * If the collator was instantiated from rules, returns | |
| * NULL. | | * NULL. | |
| * @deprecated ICU 2.8 Use ucol_getLocaleByType instead | | * @deprecated ICU 2.8 Use ucol_getLocaleByType instead | |
| */ | | */ | |
| U_DEPRECATED const char * U_EXPORT2 | | U_DEPRECATED const char * U_EXPORT2 | |
| ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *
status); | | ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *
status); | |
|
| | | #endif /* U_HIDE_DEPRECATED_API */ | |
| | | | |
| /** | | /** | |
| * gets the locale name of the collator. If the collator | | * gets the locale name of the collator. If the collator | |
| * is instantiated from the rules, then this function returns | | * is instantiated from the rules, then this function returns | |
| * NULL. | | * NULL. | |
| * @param coll The UCollator for which the locale is needed | | * @param coll The UCollator for which the locale is needed | |
| * @param type You can choose between requested, valid and actual | | * @param type You can choose between requested, valid and actual | |
| * locale. For description see the definition of | | * locale. For description see the definition of | |
| * ULocDataLocaleType in uloc.h | | * ULocDataLocaleType in uloc.h | |
| * @param status error code of the operation | | * @param status error code of the operation | |
| | | | |
| skipping to change at line 1206 | | skipping to change at line 1224 | |
| * @param coll The UCollator for which we want to get tailored chars | | * @param coll The UCollator for which we want to get tailored chars | |
| * @param status error code of the operation | | * @param status error code of the operation | |
| * @return a pointer to newly created USet. Must be be disposed by using us
et_close | | * @return a pointer to newly created USet. Must be be disposed by using us
et_close | |
| * @see ucol_openRules | | * @see ucol_openRules | |
| * @see uset_close | | * @see uset_close | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
| U_STABLE USet * U_EXPORT2 | | U_STABLE USet * U_EXPORT2 | |
| ucol_getTailoredSet(const UCollator *coll, UErrorCode *status); | | ucol_getTailoredSet(const UCollator *coll, UErrorCode *status); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Universal attribute getter that returns UCOL_DEFAULT if the value is def
ault | | * Universal attribute getter that returns UCOL_DEFAULT if the value is def
ault | |
| * @param coll collator which attributes are to be changed | | * @param coll collator which attributes are to be changed | |
| * @param attr attribute type | | * @param attr attribute type | |
| * @return attribute value or UCOL_DEFAULT if the value is default | | * @return attribute value or UCOL_DEFAULT if the value is default | |
| * @param status to indicate whether the operation went on smoothly or ther
e were errors | | * @param status to indicate whether the operation went on smoothly or ther
e were errors | |
| * @see UColAttribute | | * @see UColAttribute | |
| * @see UColAttributeValue | | * @see UColAttributeValue | |
| * @see ucol_setAttribute | | * @see ucol_setAttribute | |
| * @internal ICU 3.0 | | * @internal ICU 3.0 | |
| | | | |
| skipping to change at line 1278 | | skipping to change at line 1297 | |
| * API will return an error if an invalid attribute or at
tribute/value | | * API will return an error if an invalid attribute or at
tribute/value | |
| * combination is specified. | | * combination is specified. | |
| * @see ucol_openFromShortString | | * @see ucol_openFromShortString | |
| * @internal ICU 3.2.1 | | * @internal ICU 3.2.1 | |
| */ | | */ | |
| U_INTERNAL void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| ucol_prepareShortStringOpen( const char *definition, | | ucol_prepareShortStringOpen( const char *definition, | |
| UBool forceDefaults, | | UBool forceDefaults, | |
| UParseError *parseError, | | UParseError *parseError, | |
| UErrorCode *status); | | UErrorCode *status); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** Creates a binary image of a collator. This binary image can be stored a
nd | | /** Creates a binary image of a collator. This binary image can be stored a
nd | |
| * later used to instantiate a collator using ucol_openBinary. | | * later used to instantiate a collator using ucol_openBinary. | |
| * This API supports preflighting. | | * This API supports preflighting. | |
| * @param coll Collator | | * @param coll Collator | |
| * @param buffer a fill-in buffer to receive the binary image | | * @param buffer a fill-in buffer to receive the binary image | |
| * @param capacity capacity of the destination buffer | | * @param capacity capacity of the destination buffer | |
| * @param status for catching errors | | * @param status for catching errors | |
| * @return size of the image | | * @return size of the image | |
| * @see ucol_openBinary | | * @see ucol_openBinary | |
| | | | |
End of changes. 23 change blocks. |
| 19 lines changed or deleted | | 41 lines changed or added | |
|
| udat.h | | udat.h | |
| /* | | /* | |
| **************************************************************************
***** | | **************************************************************************
***** | |
|
| * Copyright (C) 1996-2010, International Business Machines | | * Copyright (C) 1996-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| **************************************************************************
***** | | **************************************************************************
***** | |
| */ | | */ | |
| | | | |
| #ifndef UDAT_H | | #ifndef UDAT_H | |
| #define UDAT_H | | #define UDAT_H | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| | | | |
| #if !UCONFIG_NO_FORMATTING | | #if !UCONFIG_NO_FORMATTING | |
| | | | |
| skipping to change at line 174 | | skipping to change at line 174 | |
| | | | |
| UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, | | UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE, | |
| | | | |
| /** No style */ | | /** No style */ | |
| UDAT_NONE = -1, | | UDAT_NONE = -1, | |
| /** for internal API use only */ | | /** for internal API use only */ | |
| UDAT_IGNORE = -2 | | UDAT_IGNORE = -2 | |
| | | | |
| } UDateFormatStyle; | | } UDateFormatStyle; | |
| | | | |
|
| | | /* Cannot use #ifndef U_HIDE_DRAFT_API for UDateFormatContextType and UDate | |
| | | FormatContextValue | |
| | | * since a SimpleDateFormat virtual method & data member depends on them */ | |
| | | /** Date format context types | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | typedef enum UDateFormatContextType { | |
| | | /** | |
| | | * Type (key) for specifying the capitalization context for which a dat | |
| | | e | |
| | | * is to be formatted (possible values are in UDateFormatContextValue). | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CAPITALIZATION = 1 | |
| | | } UDateFormatContextType; | |
| | | | |
| | | /** Values for date format context types | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | typedef enum UDateFormatContextValue { | |
| | | /** Values for any UDateFormatContextType (key) */ | |
| | | /** | |
| | | * Value for any UDateFormatContextType (such as UDAT_CAPITALIZATION) i | |
| | | f the | |
| | | * relevant context to be used in formatting a date is unknown (this is | |
| | | the | |
| | | * default value for any UDateFormatContextType when no value has been | |
| | | * explicitly specified for that UDateFormatContextType). | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CONTEXT_UNKNOWN = 0, | |
| | | #if !UCONFIG_NO_BREAK_ITERATION | |
| | | /** Values for type (key) UDAT_CAPITALIZATION */ | |
| | | /** | |
| | | * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | |
| | | ted | |
| | | * with capitalization appropriate for the middle of a sentence. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = 1, | |
| | | /** | |
| | | * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | |
| | | ted | |
| | | * with capitalization appropriate for the beginning of a sentence. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = 2, | |
| | | /** | |
| | | * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | |
| | | ted | |
| | | * with capitalization appropriate for a user-interface list or menu it | |
| | | em. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CAPITALIZATION_FOR_UI_LIST_OR_MENU = 3, | |
| | | /** | |
| | | * UDAT_CAPITALIZATION value if a date (or date symbol) is to be format | |
| | | ted | |
| | | * with capitalization appropriate for stand-alone usage such as an | |
| | | * isolated name on a calendar page. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_CAPITALIZATION_FOR_STANDALONE = 4 | |
| | | #endif | |
| | | } UDateFormatContextValue; | |
| | | | |
| /** | | /** | |
| * @{ | | * @{ | |
| * Below are a set of pre-defined skeletons. | | * Below are a set of pre-defined skeletons. | |
| * | | * | |
| * <P> | | * <P> | |
| * A skeleton | | * A skeleton | |
| * <ol> | | * <ol> | |
| * <li> | | * <li> | |
| * only keeps the field pattern letter and ignores all other parts | | * only keeps the field pattern letter and ignores all other parts | |
| * in a pattern, such as space, punctuations, and string literals. | | * in a pattern, such as space, punctuations, and string literals. | |
| | | | |
| skipping to change at line 484 | | skipping to change at line 541 | |
| */ | | */ | |
| UDAT_STANDALONE_QUARTER_FIELD = 28, | | UDAT_STANDALONE_QUARTER_FIELD = 28, | |
| | | | |
| /** | | /** | |
| * FieldPosition and UFieldPosition selector for 'V' field alignment, | | * FieldPosition and UFieldPosition selector for 'V' field alignment, | |
| * corresponding to the UCAL_ZONE_OFFSET field. | | * corresponding to the UCAL_ZONE_OFFSET field. | |
| * @stable ICU 3.8 | | * @stable ICU 3.8 | |
| */ | | */ | |
| UDAT_TIMEZONE_SPECIAL_FIELD = 29, | | UDAT_TIMEZONE_SPECIAL_FIELD = 29, | |
| | | | |
|
| | | /** | |
| | | * FieldPosition selector for "U" field alignment, | |
| | | * corresponding to cyclic year names. This is implemented | |
| | | * using the {@link #UCAL_YEAR} field. This displays | |
| | | * the cyclic year name, if available. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UDAT_YEAR_NAME_FIELD = 30, | |
| | | | |
| /** | | /** | |
| * Number of FieldPosition and UFieldPosition selectors for | | * Number of FieldPosition and UFieldPosition selectors for | |
| * DateFormat and UDateFormat. | | * DateFormat and UDateFormat. | |
| * Valid selectors range from 0 to UDAT_FIELD_COUNT-1. | | * Valid selectors range from 0 to UDAT_FIELD_COUNT-1. | |
| * This value is subject to change if new fields are defined | | * This value is subject to change if new fields are defined | |
| * in the future. | | * in the future. | |
| * @stable ICU 3.0 | | * @stable ICU 3.0 | |
| */ | | */ | |
|
| UDAT_FIELD_COUNT = 30 | | UDAT_FIELD_COUNT = 31 | |
| | | | |
| } UDateFormatField; | | } UDateFormatField; | |
| | | | |
| /** | | /** | |
| * Maps from a UDateFormatField to the corresponding UCalendarDateFields. | | * Maps from a UDateFormatField to the corresponding UCalendarDateFields. | |
| * Note: since the mapping is many-to-one, there is no inverse mapping. | | * Note: since the mapping is many-to-one, there is no inverse mapping. | |
| * @param field the UDateFormatField. | | * @param field the UDateFormatField. | |
| * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case | | * @return the UCalendarDateField. This will be UCAL_FIELD_COUNT in case | |
| * of error (e.g., the input field is UDAT_FIELD_COUNT). | | * of error (e.g., the input field is UDAT_FIELD_COUNT). | |
| * @stable ICU 4.4 | | * @stable ICU 4.4 | |
| */ | | */ | |
| U_STABLE UCalendarDateFields U_EXPORT2 | | U_STABLE UCalendarDateFields U_EXPORT2 | |
| udat_toCalendarDateField(UDateFormatField field); | | udat_toCalendarDateField(UDateFormatField field); | |
| | | | |
| /** | | /** | |
| * Open a new UDateFormat for formatting and parsing dates and times. | | * Open a new UDateFormat for formatting and parsing dates and times. | |
| * A UDateFormat may be used to format dates in calls to {@link #udat_forma
t }, | | * A UDateFormat may be used to format dates in calls to {@link #udat_forma
t }, | |
| * and to parse dates in calls to {@link #udat_parse }. | | * and to parse dates in calls to {@link #udat_parse }. | |
| * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_
LONG, | | * @param timeStyle The style used to format times; one of UDAT_FULL, UDAT_
LONG, | |
| * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style
s | | * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, or UDAT_NONE (relative time style
s | |
|
| * are not currently supported) | | * are not currently supported). | |
| * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_
LONG, | | * @param dateStyle The style used to format dates; one of UDAT_FULL, UDAT_
LONG, | |
| * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL
ATIVE, | | * UDAT_MEDIUM, UDAT_SHORT, UDAT_DEFAULT, UDAT_FULL_RELATIVE, UDAT_LONG_REL
ATIVE, | |
|
| * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE | | * UDAT_MEDIUM_RELATIVE, UDAT_SHORT_RELATIVE, or UDAT_NONE. As currently im | |
| | | plemented, | |
| | | * relative date formatting only affects a limited range of calendar days b | |
| | | efore or | |
| | | * after the current date, based on the CLDR <field type="day">/<r | |
| | | elative> data: For | |
| | | * example, in English, "Yesterday", "Today", and "Tomorrow". Outside of th | |
| | | is range, | |
| | | * dates are formatted using the corresponding non-relative style. | |
| * @param locale The locale specifying the formatting conventions | | * @param locale The locale specifying the formatting conventions | |
| * @param tzID A timezone ID specifying the timezone to use. If 0, use | | * @param tzID A timezone ID specifying the timezone to use. If 0, use | |
| * the default timezone. | | * the default timezone. | |
| * @param tzIDLength The length of tzID, or -1 if null-terminated. | | * @param tzIDLength The length of tzID, or -1 if null-terminated. | |
| * @param pattern A pattern specifying the format to use. | | * @param pattern A pattern specifying the format to use. | |
| * @param patternLength The number of characters in the pattern, or -1 if n
ull-terminated. | | * @param patternLength The number of characters in the pattern, or -1 if n
ull-terminated. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @return A pointer to a UDateFormat to use for formatting dates and times
, or 0 if | | * @return A pointer to a UDateFormat to use for formatting dates and times
, or 0 if | |
| * an error occurred. | | * an error occurred. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| | | | |
| skipping to change at line 606 | | skipping to change at line 676 | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| udat_format( const UDateFormat* format, | | udat_format( const UDateFormat* format, | |
| UDate dateToFormat, | | UDate dateToFormat, | |
| UChar* result, | | UChar* result, | |
| int32_t resultLength, | | int32_t resultLength, | |
| UFieldPosition* position, | | UFieldPosition* position, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
| /** | | /** | |
| * Parse a string into an date/time using a UDateFormat. | | * Parse a string into an date/time using a UDateFormat. | |
|
| * The date will be parsed using the conventions specified in {@link #udat_o | | * The date will be parsed using the conventions specified in {@link #udat_o | |
| pen } | | pen }. | |
| | | * <P> | |
| | | * Note that the normal date formats associated with some calendars - such | |
| | | * as the Chinese lunar calendar - do not specify enough fields to enable | |
| | | * dates to be parsed unambiguously. In the case of the Chinese lunar | |
| | | * calendar, while the year within the current 60-year cycle is specified, | |
| | | * the number of such cycles since the start date of the calendar (in the | |
| | | * UCAL_ERA field of the UCalendar object) is not normally part of the forma | |
| | | t, | |
| | | * and parsing may assume the wrong era. For cases such as this it is | |
| | | * recommended that clients parse using udat_parseCalendar with the UCalenda | |
| | | r | |
| | | * passed in set to the current date, or to a date within the era/cycle that | |
| | | * should be assumed if absent in the format. | |
| | | * | |
| * @param format The formatter to use. | | * @param format The formatter to use. | |
| * @param text The text to parse. | | * @param text The text to parse. | |
| * @param textLength The length of text, or -1 if null-terminated. | | * @param textLength The length of text, or -1 if null-terminated. | |
| * @param parsePos If not 0, on input a pointer to an integer specifying the
offset at which | | * @param parsePos If not 0, on input a pointer to an integer specifying the
offset at which | |
| * to begin parsing. If not 0, on output the offset at which parsing ended. | | * to begin parsing. If not 0, on output the offset at which parsing ended. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @return The value of the parsed date/time | | * @return The value of the parsed date/time | |
| * @see udat_format | | * @see udat_format | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE UDate U_EXPORT2 | | U_STABLE UDate U_EXPORT2 | |
|
| udat_parse( const UDateFormat* format, | | udat_parse(const UDateFormat* format, | |
| const UChar* text, | | const UChar* text, | |
| int32_t textLength, | | int32_t textLength, | |
| int32_t *parsePos, | | int32_t *parsePos, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Parse a string into an date/time using a UDateFormat. | | * Parse a string into an date/time using a UDateFormat. | |
|
| * The date will be parsed using the conventions specified in {@link #udat_o
pen } | | * The date will be parsed using the conventions specified in {@link #udat_o
pen }. | |
| * @param format The formatter to use. | | * @param format The formatter to use. | |
|
| * @param calendar The calendar in which to store the parsed data. | | * @param calendar A calendar set on input to the date and time to be used f | |
| | | or | |
| | | * missing values in the date/time string being parsed, and | |
| | | set | |
| | | * on output to the parsed date/time. When the calendar type | |
| | | is | |
| | | * different from the internal calendar held by the UDateFor | |
| | | mat | |
| | | * instance, the internal calendar will be cloned to a work | |
| | | * calendar set to the same milliseconds and time zone as th | |
| | | is | |
| | | * calendar parameter, field values will be parsed based on | |
| | | the | |
| | | * work calendar, then the result (milliseconds and time zon | |
| | | e) | |
| | | * will be set in this calendar. | |
| * @param text The text to parse. | | * @param text The text to parse. | |
| * @param textLength The length of text, or -1 if null-terminated. | | * @param textLength The length of text, or -1 if null-terminated. | |
| * @param parsePos If not 0, on input a pointer to an integer specifying the
offset at which | | * @param parsePos If not 0, on input a pointer to an integer specifying the
offset at which | |
| * to begin parsing. If not 0, on output the offset at which parsing ended. | | * to begin parsing. If not 0, on output the offset at which parsing ended. | |
| * @param status A pointer to an UErrorCode to receive any errors | | * @param status A pointer to an UErrorCode to receive any errors | |
| * @see udat_format | | * @see udat_format | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| U_STABLE void U_EXPORT2 | | U_STABLE void U_EXPORT2 | |
| udat_parseCalendar(const UDateFormat* format, | | udat_parseCalendar(const UDateFormat* format, | |
| | | | |
| skipping to change at line 934 | | skipping to change at line 1024 | |
| * @param type type of the locale we're looking for (valid or actual) | | * @param type type of the locale we're looking for (valid or actual) | |
| * @param status error code for the operation | | * @param status error code for the operation | |
| * @return the locale name | | * @return the locale name | |
| * @stable ICU 2.8 | | * @stable ICU 2.8 | |
| */ | | */ | |
| U_STABLE const char* U_EXPORT2 | | U_STABLE const char* U_EXPORT2 | |
| udat_getLocaleByType(const UDateFormat *fmt, | | udat_getLocaleByType(const UDateFormat *fmt, | |
| ULocDataLocaleType type, | | ULocDataLocaleType type, | |
| UErrorCode* status); | | UErrorCode* status); | |
| | | | |
|
| | | #ifndef U_HIDE_DRAFT_API | |
| | | /** | |
| | | * Set the formatter's default value for a particular context type, | |
| | | * such as UDAT_CAPITALIZATION. | |
| | | * @param fmt The formatter for which to set a context type's default value | |
| | | . | |
| | | * @param type The context type for which the default value should be set. | |
| | | * @param value The default value to set for the specified context type. | |
| | | * @param status A pointer to an UErrorCode to receive any errors | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | U_DRAFT void U_EXPORT2 | |
| | | udat_setDefaultContext(UDateFormat* fmt, | |
| | | UDateFormatContextType type, UDateFormatContextValue | |
| | | value, | |
| | | UErrorCode* status); | |
| | | | |
| | | /** | |
| | | * Get the formatter's default value for a particular context type, | |
| | | * such as UDAT_CAPITALIZATION. | |
| | | * @param fmt The formatter from which to get a context type's default valu | |
| | | e. | |
| | | * @param type The context type for which the default value should be obtai | |
| | | ned. | |
| | | * @param status A pointer to an UErrorCode to receive any errors | |
| | | * @return The current default value for the specified context type. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | U_DRAFT int32_t U_EXPORT2 | |
| | | udat_getDefaultContext(UDateFormat* fmt, | |
| | | UDateFormatContextType type, | |
| | | UErrorCode* status); | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| | | | |
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Extract the date pattern from a UDateFormat set for relative date formatt
ing. | | * Extract the date pattern from a UDateFormat set for relative date formatt
ing. | |
| * The pattern will follow the pattern syntax rules. | | * The pattern will follow the pattern syntax rules. | |
| * @param fmt The formatter to query. | | * @param fmt The formatter to query. | |
| * @param result A pointer to a buffer to receive the pattern. | | * @param result A pointer to a buffer to receive the pattern. | |
| * @param resultLength The maximum size of result. | | * @param resultLength The maximum size of result. | |
| * @param status A pointer to a UErrorCode to receive any errors | | * @param status A pointer to a UErrorCode to receive any errors | |
| * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | | * @return The total buffer size needed; if greater than resultLength, the o
utput was truncated. | |
| * @see udat_applyPatternRelative | | * @see udat_applyPatternRelative | |
| * @internal ICU 4.2 technology preview | | * @internal ICU 4.2 technology preview | |
| | | | |
| skipping to change at line 987 | | skipping to change at line 1108 | |
| * @see udat_toPatternRelativeDate, udat_toPatternRelativeTime | | * @see udat_toPatternRelativeDate, udat_toPatternRelativeTime | |
| * @internal ICU 4.2 technology preview | | * @internal ICU 4.2 technology preview | |
| */ | | */ | |
| U_INTERNAL void U_EXPORT2 | | U_INTERNAL void U_EXPORT2 | |
| udat_applyPatternRelative(UDateFormat *format, | | udat_applyPatternRelative(UDateFormat *format, | |
| const UChar *datePattern, | | const UChar *datePattern, | |
| int32_t datePatternLength, | | int32_t datePatternLength, | |
| const UChar *timePattern, | | const UChar *timePattern, | |
| int32_t timePatternLength, | | int32_t timePatternLength, | |
| UErrorCode *status); | | UErrorCode *status); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| | | /** | |
| | | * @internal | |
| | | * @see udat_open | |
| | | */ | |
| | | typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle time | |
| | | Style, | |
| | | UDateFormatStyle dateS | |
| | | tyle, | |
| | | const char *loca | |
| | | le, | |
| | | const UChar *tzID | |
| | | , | |
| | | int32_t tzIDL | |
| | | ength, | |
| | | const UChar *patt | |
| | | ern, | |
| | | int32_t patte | |
| | | rnLength, | |
| | | UErrorCode *stat | |
| | | us); | |
| | | | |
| | | /** | |
| | | * Register a provider factory | |
| | | * @internal ICU 49 | |
| | | */ | |
| | | U_INTERNAL void U_EXPORT2 | |
| | | udat_registerOpener(UDateFormatOpener opener, UErrorCode *status); | |
| | | | |
| | | /** | |
| | | * Un-Register a provider factory | |
| | | * @internal ICU 49 | |
| | | */ | |
| | | U_INTERNAL UDateFormatOpener U_EXPORT2 | |
| | | udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status); | |
| | | | |
| #endif /* #if !UCONFIG_NO_FORMATTING */ | | #endif /* #if !UCONFIG_NO_FORMATTING */ | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 12 change blocks. |
| 10 lines changed or deleted | | 193 lines changed or added | |
|
| uidna.h | | uidna.h | |
| /* | | /* | |
| **************************************************************************
***** | | **************************************************************************
***** | |
| * | | * | |
|
| * Copyright (C) 2003-2010, International Business Machines | | * Copyright (C) 2003-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| * | | * | |
| **************************************************************************
***** | | **************************************************************************
***** | |
| * file name: uidna.h | | * file name: uidna.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2003feb1 | | * created on: 2003feb1 | |
| * created by: Ram Viswanadha | | * created by: Ram Viswanadha | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 45 | |
| * The C API functions which do not take a service object pointer | | * The C API functions which do not take a service object pointer | |
| * implement IDNA2003. | | * implement IDNA2003. | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * IDNA option bit set values. | | * IDNA option bit set values. | |
| */ | | */ | |
| enum { | | enum { | |
| /** | | /** | |
| * Default options value: None of the other options are set. | | * Default options value: None of the other options are set. | |
|
| | | * For use in static worker and factory methods. | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| UIDNA_DEFAULT=0, | | UIDNA_DEFAULT=0, | |
| /** | | /** | |
| * Option to allow unassigned code points in domain names and labels. | | * Option to allow unassigned code points in domain names and labels. | |
|
| * This option is ignored by the UTS46 implementation. | | * For use in static worker and factory methods. | |
| | | * <p>This option is ignored by the UTS46 implementation. | |
| * (UTS #46 disallows unassigned code points.) | | * (UTS #46 disallows unassigned code points.) | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| UIDNA_ALLOW_UNASSIGNED=1, | | UIDNA_ALLOW_UNASSIGNED=1, | |
| /** | | /** | |
| * Option to check whether the input conforms to the STD3 ASCII rules, | | * Option to check whether the input conforms to the STD3 ASCII rules, | |
| * for example the restriction of labels to LDH characters | | * for example the restriction of labels to LDH characters | |
| * (ASCII Letters, Digits and Hyphen-Minus). | | * (ASCII Letters, Digits and Hyphen-Minus). | |
|
| | | * For use in static worker and factory methods. | |
| * @stable ICU 2.6 | | * @stable ICU 2.6 | |
| */ | | */ | |
| UIDNA_USE_STD3_RULES=2, | | UIDNA_USE_STD3_RULES=2, | |
| /** | | /** | |
| * IDNA option to check for whether the input conforms to the BiDi rule
s. | | * IDNA option to check for whether the input conforms to the BiDi rule
s. | |
|
| * This option is ignored by the IDNA2003 implementation. | | * For use in static worker and factory methods. | |
| | | * <p>This option is ignored by the IDNA2003 implementation. | |
| * (IDNA2003 always performs a BiDi check.) | | * (IDNA2003 always performs a BiDi check.) | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_CHECK_BIDI=4, | | UIDNA_CHECK_BIDI=4, | |
| /** | | /** | |
| * IDNA option to check for whether the input conforms to the CONTEXTJ
rules. | | * IDNA option to check for whether the input conforms to the CONTEXTJ
rules. | |
|
| * This option is ignored by the IDNA2003 implementation. | | * For use in static worker and factory methods. | |
| | | * <p>This option is ignored by the IDNA2003 implementation. | |
| * (The CONTEXTJ check is new in IDNA2008.) | | * (The CONTEXTJ check is new in IDNA2008.) | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_CHECK_CONTEXTJ=8, | | UIDNA_CHECK_CONTEXTJ=8, | |
| /** | | /** | |
| * IDNA option for nontransitional processing in ToASCII(). | | * IDNA option for nontransitional processing in ToASCII(). | |
|
| * By default, ToASCII() uses transitional processing. | | * For use in static worker and factory methods. | |
| * This option is ignored by the IDNA2003 implementation. | | * <p>By default, ToASCII() uses transitional processing. | |
| | | * <p>This option is ignored by the IDNA2003 implementation. | |
| * (This is only relevant for compatibility of newer IDNA implementatio
ns with IDNA2003.) | | * (This is only relevant for compatibility of newer IDNA implementatio
ns with IDNA2003.) | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, | | UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, | |
| /** | | /** | |
| * IDNA option for nontransitional processing in ToUnicode(). | | * IDNA option for nontransitional processing in ToUnicode(). | |
|
| * By default, ToUnicode() uses transitional processing. | | * For use in static worker and factory methods. | |
| * This option is ignored by the IDNA2003 implementation. | | * <p>By default, ToUnicode() uses transitional processing. | |
| | | * <p>This option is ignored by the IDNA2003 implementation. | |
| * (This is only relevant for compatibility of newer IDNA implementatio
ns with IDNA2003.) | | * (This is only relevant for compatibility of newer IDNA implementatio
ns with IDNA2003.) | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20 | | UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20, | |
| | | #ifndef U_HIDE_DRAFT_API | |
| | | /** | |
| | | * IDNA option to check for whether the input conforms to the CONTEXTO | |
| | | rules. | |
| | | * For use in static worker and factory methods. | |
| | | * <p>This option is ignored by the IDNA2003 implementation. | |
| | | * (The CONTEXTO check is new in IDNA2008.) | |
| | | * <p>This is for use by registries for IDNA2008 conformance. | |
| | | * UTS #46 does not require the CONTEXTO check. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UIDNA_CHECK_CONTEXTO=0x40 | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Opaque C service object type for the new IDNA API. | | * Opaque C service object type for the new IDNA API. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| struct UIDNA; | | struct UIDNA; | |
|
| typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @draft ICU 4.
6 */ | | typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4
.6 */ | |
| | | | |
| /** | | /** | |
| * Returns a UIDNA instance which implements UTS #46. | | * Returns a UIDNA instance which implements UTS #46. | |
| * Returns an unmodifiable instance, owned by the caller. | | * Returns an unmodifiable instance, owned by the caller. | |
| * Cache it for multiple operations, and uidna_close() it when done. | | * Cache it for multiple operations, and uidna_close() it when done. | |
| * The instance is thread-safe, that is, it can be used concurrently. | | * The instance is thread-safe, that is, it can be used concurrently. | |
| * | | * | |
| * For details about the UTS #46 implementation see the IDNA C++ class in i
dna.h. | | * For details about the UTS #46 implementation see the IDNA C++ class in i
dna.h. | |
| * | | * | |
| * @param options Bit set to modify the processing and error checking. | | * @param options Bit set to modify the processing and error checking. | |
| * See option bit set values in uidna.h. | | * See option bit set values in uidna.h. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return the UTS #46 UIDNA instance, if successful | | * @return the UTS #46 UIDNA instance, if successful | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UIDNA * U_EXPORT2 | | U_DRAFT UIDNA * U_EXPORT2 | |
| uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); | | uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Closes a UIDNA instance. | | * Closes a UIDNA instance. | |
| * @param idna UIDNA instance to be closed | | * @param idna UIDNA instance to be closed | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uidna_close(UIDNA *idna); | | uidna_close(UIDNA *idna); | |
| | | | |
| #if U_SHOW_CPLUSPLUS_API | | #if U_SHOW_CPLUSPLUS_API | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| /** | | /** | |
| * \class LocalUIDNAPointer | | * \class LocalUIDNAPointer | |
| * "Smart pointer" class, closes a UIDNA via uidna_close(). | | * "Smart pointer" class, closes a UIDNA via uidna_close(). | |
| * For most methods see the LocalPointerBase base class. | | * For most methods see the LocalPointerBase base class. | |
| * | | * | |
| * @see LocalPointerBase | | * @see LocalPointerBase | |
| * @see LocalPointer | | * @see LocalPointer | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DEFINE_LOCAL_OPEN_POINTER(LocalUIDNAPointer, UIDNA, uidna_close); | | U_DEFINE_LOCAL_OPEN_POINTER(LocalUIDNAPointer, UIDNA, uidna_close); | |
| | | | |
| U_NAMESPACE_END | | U_NAMESPACE_END | |
| | | | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Output container for IDNA processing errors. | | * Output container for IDNA processing errors. | |
| * Initialize with UIDNA_INFO_INITIALIZER: | | * Initialize with UIDNA_INFO_INITIALIZER: | |
| * \code | | * \code | |
| * UIDNAInfo info = UIDNA_INFO_INITIALIZER; | | * UIDNAInfo info = UIDNA_INFO_INITIALIZER; | |
| * int32_t length = uidna_nameToASCII(..., &info, &errorCode); | | * int32_t length = uidna_nameToASCII(..., &info, &errorCode); | |
| * if(U_SUCCESS(errorCode) && info.errors!=0) { ... } | | * if(U_SUCCESS(errorCode) && info.errors!=0) { ... } | |
| * \endcode | | * \endcode | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| struct UIDNAInfo { | | struct UIDNAInfo { | |
|
| /** sizeof(UIDNAInfo) @draft ICU 4.6 */ | | /** sizeof(UIDNAInfo) @stable ICU 4.6 */ | |
| int16_t size; | | int16_t size; | |
| /** | | /** | |
| * Set to TRUE if transitional and nontransitional processing produce d
ifferent results. | | * Set to TRUE if transitional and nontransitional processing produce d
ifferent results. | |
| * For details see C++ IDNAInfo::isTransitionalDifferent(). | | * For details see C++ IDNAInfo::isTransitionalDifferent(). | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UBool isTransitionalDifferent; | | UBool isTransitionalDifferent; | |
| UBool reservedB3; /**< Reserved field, do not use. @internal */ | | UBool reservedB3; /**< Reserved field, do not use. @internal */ | |
| /** | | /** | |
| * Bit set indicating IDNA processing errors. 0 if no errors. | | * Bit set indicating IDNA processing errors. 0 if no errors. | |
| * See UIDNA_ERROR_... constants. | | * See UIDNA_ERROR_... constants. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| uint32_t errors; | | uint32_t errors; | |
| int32_t reservedI2; /**< Reserved field, do not use. @internal */ | | int32_t reservedI2; /**< Reserved field, do not use. @internal */ | |
| int32_t reservedI3; /**< Reserved field, do not use. @internal */ | | int32_t reservedI3; /**< Reserved field, do not use. @internal */ | |
| }; | | }; | |
| typedef struct UIDNAInfo UIDNAInfo; | | typedef struct UIDNAInfo UIDNAInfo; | |
| | | | |
| /** | | /** | |
| * Static initializer for a UIDNAInfo struct. | | * Static initializer for a UIDNAInfo struct. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| #define UIDNA_INFO_INITIALIZER { \ | | #define UIDNA_INFO_INITIALIZER { \ | |
| (int16_t)sizeof(UIDNAInfo), \ | | (int16_t)sizeof(UIDNAInfo), \ | |
| FALSE, FALSE, \ | | FALSE, FALSE, \ | |
| 0, 0, 0 } | | 0, 0, 0 } | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its ASCII form for DNS lookup. | | * Converts a single domain name label into its ASCII form for DNS lookup. | |
| * If any processing step fails, then pInfo->errors will be non-zero and | | * If any processing step fails, then pInfo->errors will be non-zero and | |
| * the result might not be an ASCII string. | | * the result might not be an ASCII string. | |
| | | | |
| skipping to change at line 209 | | skipping to change at line 228 | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param length Label length, or -1 if NUL-terminated | | * @param length Label length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_labelToASCII(const UIDNA *idna, | | uidna_labelToASCII(const UIDNA *idna, | |
| const UChar *label, int32_t length, | | const UChar *label, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-read
able display. | | * Converts a single domain name label into its Unicode form for human-read
able display. | |
| * If any processing step fails, then pInfo->errors will be non-zero. | | * If any processing step fails, then pInfo->errors will be non-zero. | |
| | | | |
| skipping to change at line 236 | | skipping to change at line 255 | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param length Label length, or -1 if NUL-terminated | | * @param length Label length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_labelToUnicode(const UIDNA *idna, | | uidna_labelToUnicode(const UIDNA *idna, | |
| const UChar *label, int32_t length, | | const UChar *label, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * If any processing step fails, then pInfo->errors will be non-zero and | | * If any processing step fails, then pInfo->errors will be non-zero and | |
| | | | |
| skipping to change at line 265 | | skipping to change at line 284 | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param length Domain name length, or -1 if NUL-terminated | | * @param length Domain name length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_nameToASCII(const UIDNA *idna, | | uidna_nameToASCII(const UIDNA *idna, | |
| const UChar *name, int32_t length, | | const UChar *name, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readable di
splay. | | * Converts a whole domain name into its Unicode form for human-readable di
splay. | |
| * If any processing step fails, then pInfo->errors will be non-zero. | | * If any processing step fails, then pInfo->errors will be non-zero. | |
| | | | |
| skipping to change at line 292 | | skipping to change at line 311 | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param length Domain name length, or -1 if NUL-terminated | | * @param length Domain name length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_nameToUnicode(const UIDNA *idna, | | uidna_nameToUnicode(const UIDNA *idna, | |
| const UChar *name, int32_t length, | | const UChar *name, int32_t length, | |
| UChar *dest, int32_t capacity, | | UChar *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /* UTF-8 versions of the processing methods -------------------------------
-- */ | | /* UTF-8 versions of the processing methods -------------------------------
-- */ | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 317 | | skipping to change at line 336 | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param length Label length, or -1 if NUL-terminated | | * @param length Label length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_labelToASCII_UTF8(const UIDNA *idna, | | uidna_labelToASCII_UTF8(const UIDNA *idna, | |
| const char *label, int32_t length, | | const char *label, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a single domain name label into its Unicode form for human-read
able display. | | * Converts a single domain name label into its Unicode form for human-read
able display. | |
| * UTF-8 version of uidna_labelToUnicode(), same behavior. | | * UTF-8 version of uidna_labelToUnicode(), same behavior. | |
| | | | |
| skipping to change at line 340 | | skipping to change at line 359 | |
| * @param label Input domain name label | | * @param label Input domain name label | |
| * @param length Label length, or -1 if NUL-terminated | | * @param length Label length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_labelToUnicodeUTF8(const UIDNA *idna, | | uidna_labelToUnicodeUTF8(const UIDNA *idna, | |
| const char *label, int32_t length, | | const char *label, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its ASCII form for DNS lookup. | | * Converts a whole domain name into its ASCII form for DNS lookup. | |
| * UTF-8 version of uidna_nameToASCII(), same behavior. | | * UTF-8 version of uidna_nameToASCII(), same behavior. | |
| | | | |
| skipping to change at line 363 | | skipping to change at line 382 | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param length Domain name length, or -1 if NUL-terminated | | * @param length Domain name length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_nameToASCII_UTF8(const UIDNA *idna, | | uidna_nameToASCII_UTF8(const UIDNA *idna, | |
| const char *name, int32_t length, | | const char *name, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /** | | /** | |
| * Converts a whole domain name into its Unicode form for human-readable di
splay. | | * Converts a whole domain name into its Unicode form for human-readable di
splay. | |
| * UTF-8 version of uidna_nameToUnicode(), same behavior. | | * UTF-8 version of uidna_nameToUnicode(), same behavior. | |
| | | | |
| skipping to change at line 386 | | skipping to change at line 405 | |
| * @param name Input domain name | | * @param name Input domain name | |
| * @param length Domain name length, or -1 if NUL-terminated | | * @param length Domain name length, or -1 if NUL-terminated | |
| * @param dest Destination string buffer | | * @param dest Destination string buffer | |
| * @param capacity Destination buffer capacity | | * @param capacity Destination buffer capacity | |
| * @param pInfo Output container of IDNA processing details. | | * @param pInfo Output container of IDNA processing details. | |
| * @param pErrorCode Standard ICU error code. Its input value must | | * @param pErrorCode Standard ICU error code. Its input value must | |
| * pass the U_SUCCESS() test, or else the function returns | | * pass the U_SUCCESS() test, or else the function returns | |
| * immediately. Check for U_FAILURE() on output or use wit
h | | * immediately. Check for U_FAILURE() on output or use wit
h | |
| * function chaining. (See User Guide for details.) | | * function chaining. (See User Guide for details.) | |
| * @return destination string length | | * @return destination string length | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uidna_nameToUnicodeUTF8(const UIDNA *idna, | | uidna_nameToUnicodeUTF8(const UIDNA *idna, | |
| const char *name, int32_t length, | | const char *name, int32_t length, | |
| char *dest, int32_t capacity, | | char *dest, int32_t capacity, | |
| UIDNAInfo *pInfo, UErrorCode *pErrorCode); | | UIDNAInfo *pInfo, UErrorCode *pErrorCode); | |
| | | | |
| /* | | /* | |
| * IDNA error bit set values. | | * IDNA error bit set values. | |
| * When a domain name or label fails a processing step or does not meet the | | * When a domain name or label fails a processing step or does not meet the | |
| * validity criteria, then one or more of these error bits are set. | | * validity criteria, then one or more of these error bits are set. | |
| */ | | */ | |
| enum { | | enum { | |
| /** | | /** | |
| * A non-final domain name label (or the whole domain name) is empty. | | * A non-final domain name label (or the whole domain name) is empty. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_EMPTY_LABEL=1, | | UIDNA_ERROR_EMPTY_LABEL=1, | |
| /** | | /** | |
| * A domain name label is longer than 63 bytes. | | * A domain name label is longer than 63 bytes. | |
| * (See STD13/RFC1034 3.1. Name space specifications and terminology.) | | * (See STD13/RFC1034 3.1. Name space specifications and terminology.) | |
| * This is only checked in ToASCII operations, and only if the output l
abel is all-ASCII. | | * This is only checked in ToASCII operations, and only if the output l
abel is all-ASCII. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_LABEL_TOO_LONG=2, | | UIDNA_ERROR_LABEL_TOO_LONG=2, | |
| /** | | /** | |
| * A domain name is longer than 255 bytes in its storage form. | | * A domain name is longer than 255 bytes in its storage form. | |
| * (See STD13/RFC1034 3.1. Name space specifications and terminology.) | | * (See STD13/RFC1034 3.1. Name space specifications and terminology.) | |
| * This is only checked in ToASCII operations, and only if the output d
omain name is all-ASCII. | | * This is only checked in ToASCII operations, and only if the output d
omain name is all-ASCII. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_DOMAIN_NAME_TOO_LONG=4, | | UIDNA_ERROR_DOMAIN_NAME_TOO_LONG=4, | |
| /** | | /** | |
| * A label starts with a hyphen-minus ('-'). | | * A label starts with a hyphen-minus ('-'). | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_LEADING_HYPHEN=8, | | UIDNA_ERROR_LEADING_HYPHEN=8, | |
| /** | | /** | |
| * A label ends with a hyphen-minus ('-'). | | * A label ends with a hyphen-minus ('-'). | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_TRAILING_HYPHEN=0x10, | | UIDNA_ERROR_TRAILING_HYPHEN=0x10, | |
| /** | | /** | |
| * A label contains hyphen-minus ('-') in the third and fourth position
s. | | * A label contains hyphen-minus ('-') in the third and fourth position
s. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_HYPHEN_3_4=0x20, | | UIDNA_ERROR_HYPHEN_3_4=0x20, | |
| /** | | /** | |
| * A label starts with a combining mark. | | * A label starts with a combining mark. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_LEADING_COMBINING_MARK=0x40, | | UIDNA_ERROR_LEADING_COMBINING_MARK=0x40, | |
| /** | | /** | |
| * A label or domain name contains disallowed characters. | | * A label or domain name contains disallowed characters. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_DISALLOWED=0x80, | | UIDNA_ERROR_DISALLOWED=0x80, | |
| /** | | /** | |
| * A label starts with "xn--" but does not contain valid Punycode. | | * A label starts with "xn--" but does not contain valid Punycode. | |
| * That is, an xn-- label failed Punycode decoding. | | * That is, an xn-- label failed Punycode decoding. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_PUNYCODE=0x100, | | UIDNA_ERROR_PUNYCODE=0x100, | |
| /** | | /** | |
| * A label contains a dot=full stop. | | * A label contains a dot=full stop. | |
| * This can occur in an input string for a single-label function. | | * This can occur in an input string for a single-label function. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_LABEL_HAS_DOT=0x200, | | UIDNA_ERROR_LABEL_HAS_DOT=0x200, | |
| /** | | /** | |
| * An ACE label does not contain a valid label string. | | * An ACE label does not contain a valid label string. | |
| * The label was successfully ACE (Punycode) decoded but the resulting | | * The label was successfully ACE (Punycode) decoded but the resulting | |
| * string had severe validation errors. For example, | | * string had severe validation errors. For example, | |
| * it might contain characters that are not allowed in ACE labels, | | * it might contain characters that are not allowed in ACE labels, | |
| * or it might not be normalized. | | * or it might not be normalized. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_INVALID_ACE_LABEL=0x400, | | UIDNA_ERROR_INVALID_ACE_LABEL=0x400, | |
| /** | | /** | |
| * A label does not meet the IDNA BiDi requirements (for right-to-left
characters). | | * A label does not meet the IDNA BiDi requirements (for right-to-left
characters). | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| UIDNA_ERROR_BIDI=0x800, | | UIDNA_ERROR_BIDI=0x800, | |
| /** | | /** | |
| * A label does not meet the IDNA CONTEXTJ requirements. | | * A label does not meet the IDNA CONTEXTJ requirements. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
|
| UIDNA_ERROR_CONTEXTJ=0x1000 | | UIDNA_ERROR_CONTEXTJ=0x1000, | |
| | | #ifndef U_HIDE_DRAFT_API | |
| | | /** | |
| | | * A label does not meet the IDNA CONTEXTO requirements for punctuation | |
| | | characters. | |
| | | * Some punctuation characters "Would otherwise have been DISALLOWED" | |
| | | * but are allowed in certain contexts. (RFC 5892) | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000, | |
| | | /** | |
| | | * A label does not meet the IDNA CONTEXTO requirements for digits. | |
| | | * Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic- | |
| | | Indic Digits (U+06Fx). | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | UIDNA_ERROR_CONTEXTO_DIGITS=0x4000 | |
| | | #endif /* U_HIDE_DRAFT_API */ | |
| }; | | }; | |
| | | | |
| /* IDNA2003 API -----------------------------------------------------------
-- */ | | /* IDNA2003 API -----------------------------------------------------------
-- */ | |
| | | | |
| /** | | /** | |
| * IDNA2003: This function implements the ToASCII operation as defined in t
he IDNA RFC. | | * IDNA2003: This function implements the ToASCII operation as defined in t
he IDNA RFC. | |
| * This operation is done on <b>single labels</b> before sending it to some
thing that expects | | * This operation is done on <b>single labels</b> before sending it to some
thing that expects | |
| * ASCII names. A label is an individual part of a domain name. Labels are
usually | | * ASCII names. A label is an individual part of a domain name. Labels are
usually | |
| * separated by dots; e.g. "www.example.com" is composed of 3 labels "www",
"example", and "com". | | * separated by dots; e.g. "www.example.com" is composed of 3 labels "www",
"example", and "com". | |
| * | | * | |
| | | | |
End of changes. 45 change blocks. |
| 45 lines changed or deleted | | 82 lines changed or added | |
|
| unistr.h | | unistr.h | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 34 | |
| /** | | /** | |
| * \file | | * \file | |
| * \brief C++ API: Unicode String | | * \brief C++ API: Unicode String | |
| */ | | */ | |
| | | | |
| #include "unicode/utypes.h" | | #include "unicode/utypes.h" | |
| #include "unicode/rep.h" | | #include "unicode/rep.h" | |
| #include "unicode/std_string.h" | | #include "unicode/std_string.h" | |
| #include "unicode/stringpiece.h" | | #include "unicode/stringpiece.h" | |
| #include "unicode/bytestream.h" | | #include "unicode/bytestream.h" | |
|
| | | #include "unicode/ucasemap.h" | |
| | | | |
| struct UConverter; // unicode/ucnv.h | | struct UConverter; // unicode/ucnv.h | |
| class StringThreadTest; | | class StringThreadTest; | |
| | | | |
| #ifndef U_COMPARE_CODE_POINT_ORDER | | #ifndef U_COMPARE_CODE_POINT_ORDER | |
| /* see also ustring.h and unorm.h */ | | /* see also ustring.h and unorm.h */ | |
| /** | | /** | |
| * Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: | | * Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: | |
| * Compare strings in code point order instead of code unit order. | | * Compare strings in code point order instead of code unit order. | |
| * @stable ICU 2.2 | | * @stable ICU 2.2 | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 57 | |
| #endif | | #endif | |
| | | | |
| #ifndef USTRING_H | | #ifndef USTRING_H | |
| /** | | /** | |
| * \ingroup ustring_ustrlen | | * \ingroup ustring_ustrlen | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| u_strlen(const UChar *s); | | u_strlen(const UChar *s); | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef U_STRING_CASE_MAPPER_DEFINED | |
| | | #define U_STRING_CASE_MAPPER_DEFINED | |
| | | | |
| | | /** | |
| | | * Internal string case mapping function type. | |
| | | * @internal | |
| | | */ | |
| | | typedef int32_t U_CALLCONV | |
| | | UStringCaseMapper(const UCaseMap *csm, | |
| | | UChar *dest, int32_t destCapacity, | |
| | | const UChar *src, int32_t srcLength, | |
| | | UErrorCode *pErrorCode); | |
| | | | |
| | | #endif | |
| | | | |
| U_NAMESPACE_BEGIN | | U_NAMESPACE_BEGIN | |
| | | | |
| class BreakIterator; // unicode/brkiter.h | | class BreakIterator; // unicode/brkiter.h | |
| class Locale; // unicode/locid.h | | class Locale; // unicode/locid.h | |
| class StringCharacterIterator; | | class StringCharacterIterator; | |
| class UnicodeStringAppendable; // unicode/appendable.h | | class UnicodeStringAppendable; // unicode/appendable.h | |
| | | | |
| /* The <iostream> include has been moved to unicode/ustream.h */ | | /* The <iostream> include has been moved to unicode/ustream.h */ | |
| | | | |
| /** | | /** | |
| * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co
nstructor | | * Constant to be used in the UnicodeString(char *, int32_t, EInvariant) co
nstructor | |
| * which constructs a Unicode string from an invariant-character char * str
ing. | | * which constructs a Unicode string from an invariant-character char * str
ing. | |
| * About invariant characters see utypes.h. | | * About invariant characters see utypes.h. | |
| * This constructor has no runtime dependency on conversion code and is | | * This constructor has no runtime dependency on conversion code and is | |
| * therefore recommended over ones taking a charset name string | | * therefore recommended over ones taking a charset name string | |
| * (where the empty string "" indicates invariant-character conversion). | | * (where the empty string "" indicates invariant-character conversion). | |
| * | | * | |
| * @stable ICU 3.2 | | * @stable ICU 3.2 | |
| */ | | */ | |
|
| #define US_INV U_NAMESPACE_QUALIFIER UnicodeString::kInvariant | | #define US_INV icu::UnicodeString::kInvariant | |
| | | | |
| /** | | /** | |
| * Unicode String literals in C++. | | * Unicode String literals in C++. | |
| * Dependent on the platform properties, different UnicodeString | | * Dependent on the platform properties, different UnicodeString | |
| * constructors should be used to create a UnicodeString object from | | * constructors should be used to create a UnicodeString object from | |
| * a string literal. | | * a string literal. | |
| * The macros are defined for maximum performance. | | * The macros are defined for maximum performance. | |
| * They work only for strings that contain "invariant characters", i.e., | | * They work only for strings that contain "invariant characters", i.e., | |
| * only latin letters, digits, and some punctuation. | | * only latin letters, digits, and some punctuation. | |
| * See utypes.h for details. | | * See utypes.h for details. | |
| * | | * | |
| * The string parameter must be a C string literal. | | * The string parameter must be a C string literal. | |
| * The length of the string, not including the terminating | | * The length of the string, not including the terminating | |
| * <code>NUL</code>, must be specified as a constant. | | * <code>NUL</code>, must be specified as a constant. | |
| * The U_STRING_DECL macro should be invoked exactly once for one | | * The U_STRING_DECL macro should be invoked exactly once for one | |
| * such string variable before it is used. | | * such string variable before it is used. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| #if defined(U_DECLARE_UTF16) | | #if defined(U_DECLARE_UTF16) | |
|
| # define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString(
TRUE, (const UChar *)U_DECLARE_UTF16(cs), _length) | | # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha
r *)U_DECLARE_UTF16(cs), _length) | |
| #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY
|| (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) | | #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY
|| (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) | |
|
| # define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString(
TRUE, (const UChar *)L ## cs, _length) | | # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha
r *)L ## cs, _length) | |
| #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY | | #elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY | |
|
| # define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString(
TRUE, (const UChar *)cs, _length) | | # define UNICODE_STRING(cs, _length) icu::UnicodeString(TRUE, (const UCha
r *)cs, _length) | |
| #else | | #else | |
|
| # define UNICODE_STRING(cs, _length) U_NAMESPACE_QUALIFIER UnicodeString(
cs, _length, US_INV) | | # define UNICODE_STRING(cs, _length) icu::UnicodeString(cs, _length, US_I
NV) | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Unicode String literals in C++. | | * Unicode String literals in C++. | |
| * Dependent on the platform properties, different UnicodeString | | * Dependent on the platform properties, different UnicodeString | |
| * constructors should be used to create a UnicodeString object from | | * constructors should be used to create a UnicodeString object from | |
| * a string literal. | | * a string literal. | |
| * The macros are defined for improved performance. | | * The macros are defined for improved performance. | |
| * They work only for strings that contain "invariant characters", i.e., | | * They work only for strings that contain "invariant characters", i.e., | |
| * only latin letters, digits, and some punctuation. | | * only latin letters, digits, and some punctuation. | |
| * See utypes.h for details. | | * See utypes.h for details. | |
| * | | * | |
| * The string parameter must be a C string literal. | | * The string parameter must be a C string literal. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| #define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) | | #define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) | |
| | | | |
| /** | | /** | |
|
| | | * \def UNISTR_FROM_CHAR_EXPLICIT | |
| | | * This can be defined to be empty or "explicit". | |
| | | * If explicit, then the UnicodeString(UChar) and UnicodeString(UChar32) | |
| | | * constructors are marked as explicit, preventing their inadvertent use. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | #ifndef UNISTR_FROM_CHAR_EXPLICIT | |
| | | # if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) | |
| | | || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) | |
| | | // Auto-"explicit" in ICU library code. | |
| | | # define UNISTR_FROM_CHAR_EXPLICIT explicit | |
| | | # else | |
| | | // Empty by default for source code compatibility. | |
| | | # define UNISTR_FROM_CHAR_EXPLICIT | |
| | | # endif | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * \def UNISTR_FROM_STRING_EXPLICIT | |
| | | * This can be defined to be empty or "explicit". | |
| | | * If explicit, then the UnicodeString(const char *) and UnicodeString(cons | |
| | | t UChar *) | |
| | | * constructors are marked as explicit, preventing their inadvertent use. | |
| | | * | |
| | | * In particular, this helps prevent accidentally depending on ICU conversi | |
| | | on code | |
| | | * by passing a string literal into an API with a const UnicodeString & par | |
| | | ameter. | |
| | | * @draft ICU 49 | |
| | | */ | |
| | | #ifndef UNISTR_FROM_STRING_EXPLICIT | |
| | | # if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) | |
| | | || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) | |
| | | // Auto-"explicit" in ICU library code. | |
| | | # define UNISTR_FROM_STRING_EXPLICIT explicit | |
| | | # else | |
| | | // Empty by default for source code compatibility. | |
| | | # define UNISTR_FROM_STRING_EXPLICIT | |
| | | # endif | |
| | | #endif | |
| | | | |
| | | /** | |
| * UnicodeString is a string class that stores Unicode characters directly
and provides | | * UnicodeString is a string class that stores Unicode characters directly
and provides | |
| * similar functionality as the Java String and StringBuffer classes. | | * similar functionality as the Java String and StringBuffer classes. | |
| * It is a concrete implementation of the abstract class Replaceable (for t
ransliteration). | | * It is a concrete implementation of the abstract class Replaceable (for t
ransliteration). | |
| * | | * | |
| * The UnicodeString class is not suitable for subclassing. | | * The UnicodeString class is not suitable for subclassing. | |
| * | | * | |
| * <p>For an overview of Unicode strings in C and C++ see the | | * <p>For an overview of Unicode strings in C and C++ see the | |
| * <a href="http://icu-project.org/userguide/strings.html">User Guide Strin
gs chapter</a>.</p> | | * <a href="http://icu-project.org/userguide/strings.html">User Guide Strin
gs chapter</a>.</p> | |
| * | | * | |
| * <p>In ICU, a Unicode string consists of 16-bit Unicode <em>code units</e
m>. | | * <p>In ICU, a Unicode string consists of 16-bit Unicode <em>code units</e
m>. | |
| | | | |
| skipping to change at line 1244 | | skipping to change at line 1297 | |
| * Return the code point that contains the code unit | | * Return the code point that contains the code unit | |
| * at offset <tt>offset</tt>. | | * at offset <tt>offset</tt>. | |
| * If the offset is not valid (0..length()-1) then U+ffff is returned. | | * If the offset is not valid (0..length()-1) then U+ffff is returned. | |
| * @param offset a valid offset into the text | | * @param offset a valid offset into the text | |
| * that indicates the text offset of any of the code units | | * that indicates the text offset of any of the code units | |
| * that will be assembled into a code point (21-bit value) and returned | | * that will be assembled into a code point (21-bit value) and returned | |
| * @return the code point of text at <tt>offset</tt> | | * @return the code point of text at <tt>offset</tt> | |
| * or 0xffff if the offset is not valid for this string | | * or 0xffff if the offset is not valid for this string | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| inline UChar32 char32At(int32_t offset) const; | | UChar32 char32At(int32_t offset) const; | |
| | | | |
| /** | | /** | |
| * Adjust a random-access offset so that | | * Adjust a random-access offset so that | |
| * it points to the beginning of a Unicode character. | | * it points to the beginning of a Unicode character. | |
| * The offset that is passed in points to | | * The offset that is passed in points to | |
| * any code unit of a code point, | | * any code unit of a code point, | |
| * while the returned offset will point to the first code unit | | * while the returned offset will point to the first code unit | |
| * of the same code point. | | * of the same code point. | |
| * In UTF-16, if the input offset points to a second surrogate | | * In UTF-16, if the input offset points to a second surrogate | |
| * of a surrogate pair, then the returned offset will point | | * of a surrogate pair, then the returned offset will point | |
| * to the first surrogate. | | * to the first surrogate. | |
| * @param offset a valid offset into one code point of the text | | * @param offset a valid offset into one code point of the text | |
| * @return offset of the first code unit of the same code point | | * @return offset of the first code unit of the same code point | |
| * @see U16_SET_CP_START | | * @see U16_SET_CP_START | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| inline int32_t getChar32Start(int32_t offset) const; | | int32_t getChar32Start(int32_t offset) const; | |
| | | | |
| /** | | /** | |
| * Adjust a random-access offset so that | | * Adjust a random-access offset so that | |
| * it points behind a Unicode character. | | * it points behind a Unicode character. | |
| * The offset that is passed in points behind | | * The offset that is passed in points behind | |
| * any code unit of a code point, | | * any code unit of a code point, | |
| * while the returned offset will point behind the last code unit | | * while the returned offset will point behind the last code unit | |
| * of the same code point. | | * of the same code point. | |
| * In UTF-16, if the input offset points behind the first surrogate | | * In UTF-16, if the input offset points behind the first surrogate | |
| * (i.e., to the second surrogate) | | * (i.e., to the second surrogate) | |
| * of a surrogate pair, then the returned offset will point | | * of a surrogate pair, then the returned offset will point | |
| * behind the second surrogate (i.e., to the first surrogate). | | * behind the second surrogate (i.e., to the first surrogate). | |
| * @param offset a valid offset after any code unit of a code point of th
e text | | * @param offset a valid offset after any code unit of a code point of th
e text | |
| * @return offset of the first code unit after the same code point | | * @return offset of the first code unit after the same code point | |
| * @see U16_SET_CP_LIMIT | | * @see U16_SET_CP_LIMIT | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| inline int32_t getChar32Limit(int32_t offset) const; | | int32_t getChar32Limit(int32_t offset) const; | |
| | | | |
| /** | | /** | |
| * Move the code unit index along the string by delta code points. | | * Move the code unit index along the string by delta code points. | |
| * Interpret the input index as a code unit-based offset into the string, | | * Interpret the input index as a code unit-based offset into the string, | |
| * move the index forward or backward by delta code points, and | | * move the index forward or backward by delta code points, and | |
| * return the resulting index. | | * return the resulting index. | |
| * The input index should point to the first code unit of a code point, | | * The input index should point to the first code unit of a code point, | |
| * if there is more than one. | | * if there is more than one. | |
| * | | * | |
| * Both input and output indexes are code unit-based as for all | | * Both input and output indexes are code unit-based as for all | |
| | | | |
| skipping to change at line 2068 | | skipping to change at line 2121 | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| inline UnicodeString& append(UChar srcChar); | | inline UnicodeString& append(UChar srcChar); | |
| | | | |
| /** | | /** | |
| * Append the code point <TT>srcChar</TT> to the UnicodeString object. | | * Append the code point <TT>srcChar</TT> to the UnicodeString object. | |
| * @param srcChar the code point to append | | * @param srcChar the code point to append | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| inline UnicodeString& append(UChar32 srcChar); | | UnicodeString& append(UChar32 srcChar); | |
| | | | |
| /* Insert operations */ | | /* Insert operations */ | |
| | | | |
| /** | | /** | |
| * Insert the characters in <TT>srcText</TT> in the range | | * Insert the characters in <TT>srcText</TT> in the range | |
| * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeStr
ing | | * [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>) into the UnicodeStr
ing | |
| * object at offset <TT>start</TT>. <TT>srcText</TT> is not modified. | | * object at offset <TT>start</TT>. <TT>srcText</TT> is not modified. | |
| * @param start the offset where the insertion begins | | * @param start the offset where the insertion begins | |
| * @param srcText the source for the new characters | | * @param srcText the source for the new characters | |
| * @param srcStart the offset into <TT>srcText</TT> where new characters | | * @param srcStart the offset into <TT>srcText</TT> where new characters | |
| | | | |
| skipping to change at line 2261 | | skipping to change at line 2314 | |
| * Replace the characters in the range | | * Replace the characters in the range | |
| * [<TT>start</TT>, <TT>start + length</TT>) with the code point | | * [<TT>start</TT>, <TT>start + length</TT>) with the code point | |
| * <TT>srcChar</TT>. | | * <TT>srcChar</TT>. | |
| * @param start the offset at which the replace operation begins | | * @param start the offset at which the replace operation begins | |
| * @param length the number of characters to replace. The character at | | * @param length the number of characters to replace. The character at | |
| * <TT>start + length</TT> is not modified. | | * <TT>start + length</TT> is not modified. | |
| * @param srcChar the new code point | | * @param srcChar the new code point | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| inline UnicodeString& replace(int32_t start, | | UnicodeString& replace(int32_t start, int32_t length, UChar32 srcChar); | |
| int32_t length, | | | |
| UChar32 srcChar); | | | |
| | | | |
| /** | | /** | |
| * Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>) | | * Replace the characters in the range [<TT>start</TT>, <TT>limit</TT>) | |
| * with the characters in <TT>srcText</TT>. <TT>srcText</TT> is not modif
ied. | | * with the characters in <TT>srcText</TT>. <TT>srcText</TT> is not modif
ied. | |
| * @param start the offset at which the replace operation begins | | * @param start the offset at which the replace operation begins | |
| * @param limit the offset immediately following the replace range | | * @param limit the offset immediately following the replace range | |
| * @param srcText the source for the new characters | | * @param srcText the source for the new characters | |
| * @return a reference to this | | * @return a reference to this | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| skipping to change at line 2801 | | skipping to change at line 2852 | |
| * accordingly. | | * accordingly. | |
| * @param c is used to initially fill the string | | * @param c is used to initially fill the string | |
| * @param count specifies how many code points c are to be written in the | | * @param count specifies how many code points c are to be written in the | |
| * string | | * string | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString(int32_t capacity, UChar32 c, int32_t count); | | UnicodeString(int32_t capacity, UChar32 c, int32_t count); | |
| | | | |
| /** | | /** | |
| * Single UChar (code unit) constructor. | | * Single UChar (code unit) constructor. | |
|
| | | * | |
| | | * It is recommended to mark this constructor "explicit" by | |
| | | * <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code> | |
| | | * on the compiler command line or similar. | |
| * @param ch the character to place in the UnicodeString | | * @param ch the character to place in the UnicodeString | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| UnicodeString(UChar ch); | | UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar ch); | |
| | | | |
| /** | | /** | |
| * Single UChar32 (code point) constructor. | | * Single UChar32 (code point) constructor. | |
|
| | | * | |
| | | * It is recommended to mark this constructor "explicit" by | |
| | | * <code>-DUNISTR_FROM_CHAR_EXPLICIT=explicit</code> | |
| | | * on the compiler command line or similar. | |
| * @param ch the character to place in the UnicodeString | | * @param ch the character to place in the UnicodeString | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| UnicodeString(UChar32 ch); | | UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar32 ch); | |
| | | | |
| /** | | /** | |
| * UChar* constructor. | | * UChar* constructor. | |
|
| | | * | |
| | | * It is recommended to mark this constructor "explicit" by | |
| | | * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> | |
| | | * on the compiler command line or similar. | |
| * @param text The characters to place in the UnicodeString. <TT>text</T
T> | | * @param text The characters to place in the UnicodeString. <TT>text</T
T> | |
| * must be NULL (U+0000) terminated. | | * must be NULL (U+0000) terminated. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| UnicodeString(const UChar *text); | | UNISTR_FROM_STRING_EXPLICIT UnicodeString(const UChar *text); | |
| | | | |
| /** | | /** | |
| * UChar* constructor. | | * UChar* constructor. | |
| * @param text The characters to place in the UnicodeString. | | * @param text The characters to place in the UnicodeString. | |
| * @param textLength The number of Unicode characters in <TT>text</TT> | | * @param textLength The number of Unicode characters in <TT>text</TT> | |
| * to copy. | | * to copy. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString(const UChar *text, | | UnicodeString(const UChar *text, | |
| int32_t textLength); | | int32_t textLength); | |
| | | | |
| skipping to change at line 2878 | | skipping to change at line 2941 | |
| * @param buffLength The number of Unicode characters in <code>buffer</co
de> to alias. | | * @param buffLength The number of Unicode characters in <code>buffer</co
de> to alias. | |
| * @param buffCapacity The size of <code>buffer</code> in UChars. | | * @param buffCapacity The size of <code>buffer</code> in UChars. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity); | | UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity); | |
| | | | |
| #if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION | | #if U_CHARSET_IS_UTF8 || !UCONFIG_NO_CONVERSION | |
| | | | |
| /** | | /** | |
| * char* constructor. | | * char* constructor. | |
|
| | | * Uses the default converter (and thus depends on the ICU conversion cod | |
| | | e) | |
| | | * unless U_CHARSET_IS_UTF8 is set to 1. | |
| | | * | |
| | | * For ASCII (really "invariant character") strings it is more efficient | |
| | | to use | |
| | | * the constructor that takes a US_INV (for its enum EInvariant). | |
| | | * For ASCII (invariant-character) string literals, see UNICODE_STRING an | |
| | | d | |
| | | * UNICODE_STRING_SIMPLE. | |
| | | * | |
| | | * It is recommended to mark this constructor "explicit" by | |
| | | * <code>-DUNISTR_FROM_STRING_EXPLICIT=explicit</code> | |
| | | * on the compiler command line or similar. | |
| * @param codepageData an array of bytes, null-terminated, | | * @param codepageData an array of bytes, null-terminated, | |
| * in the platform's default codepage. | | * in the platform's default codepage. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
|
| | | * @see UNICODE_STRING | |
| | | * @see UNICODE_STRING_SIMPLE | |
| */ | | */ | |
|
| UnicodeString(const char *codepageData); | | UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char *codepageData); | |
| | | | |
| /** | | /** | |
| * char* constructor. | | * char* constructor. | |
|
| | | * Uses the default converter (and thus depends on the ICU conversion cod | |
| | | e) | |
| | | * unless U_CHARSET_IS_UTF8 is set to 1. | |
| * @param codepageData an array of bytes in the platform's default codepa
ge. | | * @param codepageData an array of bytes in the platform's default codepa
ge. | |
| * @param dataLength The number of bytes in <TT>codepageData</TT>. | | * @param dataLength The number of bytes in <TT>codepageData</TT>. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| UnicodeString(const char *codepageData, int32_t dataLength); | | UnicodeString(const char *codepageData, int32_t dataLength); | |
| | | | |
| #endif | | #endif | |
| | | | |
| #if !UCONFIG_NO_CONVERSION | | #if !UCONFIG_NO_CONVERSION | |
| | | | |
| | | | |
| skipping to change at line 3348 | | skipping to change at line 3426 | |
| * the buffer is too small. | | * the buffer is too small. | |
| * | | * | |
| * Return FALSE if memory could not be allocated. | | * Return FALSE if memory could not be allocated. | |
| */ | | */ | |
| UBool cloneArrayIfNeeded(int32_t newCapacity = -1, | | UBool cloneArrayIfNeeded(int32_t newCapacity = -1, | |
| int32_t growCapacity = -1, | | int32_t growCapacity = -1, | |
| UBool doCopyArray = TRUE, | | UBool doCopyArray = TRUE, | |
| int32_t **pBufferToDelete = 0, | | int32_t **pBufferToDelete = 0, | |
| UBool forceClone = FALSE); | | UBool forceClone = FALSE); | |
| | | | |
|
| // common function for case mappings | | /** | |
| | | * Common function for UnicodeString case mappings. | |
| | | * The stringCaseMapper has the same type UStringCaseMapper | |
| | | * as in ustr_imp.h for ustrcase_map(). | |
| | | */ | |
| UnicodeString & | | UnicodeString & | |
|
| caseMap(BreakIterator *titleIter, | | caseMap(const UCaseMap *csm, UStringCaseMapper *stringCaseMapper); | |
| const char *locale, | | | |
| uint32_t options, | | | |
| int32_t toWhichCase); | | | |
| | | | |
| // ref counting | | // ref counting | |
| void addRef(void); | | void addRef(void); | |
| int32_t removeRef(void); | | int32_t removeRef(void); | |
| int32_t refCount(void) const; | | int32_t refCount(void) const; | |
| | | | |
| // constants | | // constants | |
| enum { | | enum { | |
| // Set the stack buffer size so that sizeof(UnicodeString) is, | | // Set the stack buffer size so that sizeof(UnicodeString) is, | |
| // naturally (without padding), a multiple of sizeof(pointer). | | // naturally (without padding), a multiple of sizeof(pointer). | |
| | | | |
| skipping to change at line 4038 | | skipping to change at line 4117 | |
| int32_t srcLength) | | int32_t srcLength) | |
| { return doReplace(start, _length, srcChars, srcStart, srcLength); } | | { return doReplace(start, _length, srcChars, srcStart, srcLength); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::replace(int32_t start, | | UnicodeString::replace(int32_t start, | |
| int32_t _length, | | int32_t _length, | |
| UChar srcChar) | | UChar srcChar) | |
| { return doReplace(start, _length, &srcChar, 0, 1); } | | { return doReplace(start, _length, &srcChar, 0, 1); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
|
| UnicodeString::replace(int32_t start, | | | |
| int32_t _length, | | | |
| UChar32 srcChar) { | | | |
| UChar buffer[U16_MAX_LENGTH]; | | | |
| int32_t count = 0; | | | |
| UBool isError = FALSE; | | | |
| U16_APPEND(buffer, count, U16_MAX_LENGTH, srcChar, isError); | | | |
| return doReplace(start, _length, buffer, 0, count); | | | |
| } | | | |
| | | | |
| inline UnicodeString& | | | |
| UnicodeString::replaceBetween(int32_t start, | | UnicodeString::replaceBetween(int32_t start, | |
| int32_t limit, | | int32_t limit, | |
| const UnicodeString& srcText) | | const UnicodeString& srcText) | |
| { return doReplace(start, limit - start, srcText, 0, srcText.length()); } | | { return doReplace(start, limit - start, srcText, 0, srcText.length()); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::replaceBetween(int32_t start, | | UnicodeString::replaceBetween(int32_t start, | |
| int32_t limit, | | int32_t limit, | |
| const UnicodeString& srcText, | | const UnicodeString& srcText, | |
| int32_t srcStart, | | int32_t srcStart, | |
| | | | |
| skipping to change at line 4146 | | skipping to change at line 4214 | |
| } | | } | |
| | | | |
| inline UChar | | inline UChar | |
| UnicodeString::charAt(int32_t offset) const | | UnicodeString::charAt(int32_t offset) const | |
| { return doCharAt(offset); } | | { return doCharAt(offset); } | |
| | | | |
| inline UChar | | inline UChar | |
| UnicodeString::operator[] (int32_t offset) const | | UnicodeString::operator[] (int32_t offset) const | |
| { return doCharAt(offset); } | | { return doCharAt(offset); } | |
| | | | |
|
| inline UChar32 | | | |
| UnicodeString::char32At(int32_t offset) const | | | |
| { | | | |
| int32_t len = length(); | | | |
| if((uint32_t)offset < (uint32_t)len) { | | | |
| const UChar *array = getArrayStart(); | | | |
| UChar32 c; | | | |
| U16_GET(array, 0, offset, len, c); | | | |
| return c; | | | |
| } else { | | | |
| return kInvalidUChar; | | | |
| } | | | |
| } | | | |
| | | | |
| inline int32_t | | | |
| UnicodeString::getChar32Start(int32_t offset) const { | | | |
| if((uint32_t)offset < (uint32_t)length()) { | | | |
| const UChar *array = getArrayStart(); | | | |
| U16_SET_CP_START(array, 0, offset); | | | |
| return offset; | | | |
| } else { | | | |
| return 0; | | | |
| } | | | |
| } | | | |
| | | | |
| inline int32_t | | | |
| UnicodeString::getChar32Limit(int32_t offset) const { | | | |
| int32_t len = length(); | | | |
| if((uint32_t)offset < (uint32_t)len) { | | | |
| const UChar *array = getArrayStart(); | | | |
| U16_SET_CP_LIMIT(array, 0, offset, len); | | | |
| return offset; | | | |
| } else { | | | |
| return len; | | | |
| } | | | |
| } | | | |
| | | | |
| inline UBool | | inline UBool | |
| UnicodeString::isEmpty() const { | | UnicodeString::isEmpty() const { | |
| return fShortLength == 0; | | return fShortLength == 0; | |
| } | | } | |
| | | | |
| //======================================== | | //======================================== | |
| // Write implementation methods | | // Write implementation methods | |
| //======================================== | | //======================================== | |
| inline void | | inline void | |
| UnicodeString::setLength(int32_t len) { | | UnicodeString::setLength(int32_t len) { | |
| | | | |
| skipping to change at line 4336 | | skipping to change at line 4367 | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::append(const UChar *srcChars, | | UnicodeString::append(const UChar *srcChars, | |
| int32_t srcLength) | | int32_t srcLength) | |
| { return doReplace(length(), 0, srcChars, 0, srcLength); } | | { return doReplace(length(), 0, srcChars, 0, srcLength); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::append(UChar srcChar) | | UnicodeString::append(UChar srcChar) | |
| { return doReplace(length(), 0, &srcChar, 0, 1); } | | { return doReplace(length(), 0, &srcChar, 0, 1); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
|
| UnicodeString::append(UChar32 srcChar) { | | | |
| UChar buffer[U16_MAX_LENGTH]; | | | |
| int32_t _length = 0; | | | |
| UBool isError = FALSE; | | | |
| U16_APPEND(buffer, _length, U16_MAX_LENGTH, srcChar, isError); | | | |
| return doReplace(length(), 0, buffer, 0, _length); | | | |
| } | | | |
| | | | |
| inline UnicodeString& | | | |
| UnicodeString::operator+= (UChar ch) | | UnicodeString::operator+= (UChar ch) | |
| { return doReplace(length(), 0, &ch, 0, 1); } | | { return doReplace(length(), 0, &ch, 0, 1); } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::operator+= (UChar32 ch) { | | UnicodeString::operator+= (UChar32 ch) { | |
| return append(ch); | | return append(ch); | |
| } | | } | |
| | | | |
| inline UnicodeString& | | inline UnicodeString& | |
| UnicodeString::operator+= (const UnicodeString& srcText) | | UnicodeString::operator+= (const UnicodeString& srcText) | |
| | | | |
End of changes. 28 change blocks. |
| 78 lines changed or deleted | | 109 lines changed or added | |
|
| uregex.h | | uregex.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 2004-2011, International Business Machines | | * Copyright (C) 2004-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * file name: uregex.h | | * file name: uregex.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2004mar09 | | * created on: 2004mar09 | |
| * created by: Andy Heninger | | * created by: Andy Heninger | |
| * | | * | |
| * ICU Regular Expressions, API for C | | * ICU Regular Expressions, API for C | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| | | | |
| /** Allow white space and comments within patterns @stable ICU 2.4 */ | | /** Allow white space and comments within patterns @stable ICU 2.4 */ | |
| UREGEX_COMMENTS = 4, | | UREGEX_COMMENTS = 4, | |
| | | | |
| /** If set, '.' matches line terminators, otherwise '.' matching stop
s at line end. | | /** If set, '.' matches line terminators, otherwise '.' matching stop
s at line end. | |
| * @stable ICU 2.4 */ | | * @stable ICU 2.4 */ | |
| UREGEX_DOTALL = 32, | | UREGEX_DOTALL = 32, | |
| | | | |
| /** If set, treat the entire pattern as a literal string. | | /** If set, treat the entire pattern as a literal string. | |
| * Metacharacters or escape sequences in the input sequence will be g
iven | | * Metacharacters or escape sequences in the input sequence will be g
iven | |
|
| * no special meaning. Not implemented yet as of ICU 4.4. | | * no special meaning. | |
| * | | * | |
|
| * The flags CASE_INSENSITIVE and UNICODE_CASE retain their impact | | * The flag UREGEX_CASE_INSENSITIVE retains its impact | |
| * on matching when used in conjunction with this flag. | | * on matching when used in conjunction with this flag. | |
| * The other flags become superfluous. | | * The other flags become superfluous. | |
|
| * TODO: say which escapes are still handled; anything Java does | | * | |
| * early (\\u) we should still do. | | | |
| * @stable ICU 4.0 | | * @stable ICU 4.0 | |
| */ | | */ | |
| UREGEX_LITERAL = 16, | | UREGEX_LITERAL = 16, | |
| | | | |
| /** Control behavior of "$" and "^" | | /** Control behavior of "$" and "^" | |
| * If set, recognize line terminators within string, | | * If set, recognize line terminators within string, | |
| * otherwise, match only at start and end of input string. | | * otherwise, match only at start and end of input string. | |
| * @stable ICU 2.4 */ | | * @stable ICU 2.4 */ | |
| UREGEX_MULTILINE = 8, | | UREGEX_MULTILINE = 8, | |
| | | | |
| | | | |
| skipping to change at line 160 | | skipping to change at line 159 | |
| * @param flags Flags that alter the default matching behavior fo
r | | * @param flags Flags that alter the default matching behavior fo
r | |
| * the regular expression, UREGEX_CASE_INSENSITIVE,
for | | * the regular expression, UREGEX_CASE_INSENSITIVE,
for | |
| * example. For default behavior, set this paramete
r to zero. | | * example. For default behavior, set this paramete
r to zero. | |
| * See <code>enum URegexpFlag</code>. All desired f
lags | | * See <code>enum URegexpFlag</code>. All desired f
lags | |
| * are bitwise-ORed together. | | * are bitwise-ORed together. | |
| * @param pe Receives the position (line and column numbers) o
f any syntax | | * @param pe Receives the position (line and column numbers) o
f any syntax | |
| * error within the source regular expression string
. If this | | * error within the source regular expression string
. If this | |
| * information is not wanted, pass NULL for this par
ameter. | | * information is not wanted, pass NULL for this par
ameter. | |
| * @param status Receives error detected by this function. | | * @param status Receives error detected by this function. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT URegularExpression * U_EXPORT2 | | U_DRAFT URegularExpression * U_EXPORT2 | |
| uregex_openUText(UText *pattern, | | uregex_openUText(UText *pattern, | |
| uint32_t flags, | | uint32_t flags, | |
| UParseError *pe, | | UParseError *pe, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Open (compile) an ICU regular expression. The resulting regular expre
ssion | | * Open (compile) an ICU regular expression. The resulting regular expre
ssion | |
| * handle can then be used to perform various matching operations. | | * handle can then be used to perform various matching operations. | |
| | | | |
| skipping to change at line 280 | | skipping to change at line 279 | |
| | | | |
| /** | | /** | |
| * Returns the source text of the pattern for this regular expression. | | * Returns the source text of the pattern for this regular expression. | |
| * This function will work even if the pattern was originally specified as
a UChar string. | | * This function will work even if the pattern was originally specified as
a UChar string. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return the pattern text. The storage for the text is owned by the regu
lar expression | | * @return the pattern text. The storage for the text is owned by the regu
lar expression | |
| * object, and must not be altered or deleted. | | * object, and must not be altered or deleted. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_patternUText(const URegularExpression *regexp, | | uregex_patternUText(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the match mode flags that were specified when compiling this regula
r expression. | | * Get the match mode flags that were specified when compiling this regula
r expression. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @return The match mode flags | | * @return The match mode flags | |
| | | | |
| skipping to change at line 338 | | skipping to change at line 337 | |
| * <p> | | * <p> | |
| * Regular expression matching operations work directly on the applicatio
n's | | * Regular expression matching operations work directly on the applicatio
n's | |
| * string data; only a shallow clone is made. The subject string data mu
st not be | | * string data; only a shallow clone is made. The subject string data mu
st not be | |
| * altered after calling this function until after all regular expression | | * altered after calling this function until after all regular expression | |
| * operations involving this string data are completed. | | * operations involving this string data are completed. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param text The subject text string. | | * @param text The subject text string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_setUText(URegularExpression *regexp, | | uregex_setUText(URegularExpression *regexp, | |
| UText *text, | | UText *text, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the subject text that is currently associated with this | | * Get the subject text that is currently associated with this | |
| * regular expression object. If the input was supplied using uregex_se
tText(), | | * regular expression object. If the input was supplied using uregex_se
tText(), | |
| * that pointer will be returned. Otherwise, the characters in the inpu
t will | | * that pointer will be returned. Otherwise, the characters in the inpu
t will | |
| | | | |
| skipping to change at line 384 | | skipping to change at line 383 | |
| * This function will work even if the input was originally specified as
a UChar string. | | * This function will work even if the input was originally specified as
a UChar string. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param dest A mutable UText in which to store the current input. | | * @param dest A mutable UText in which to store the current input. | |
| * If NULL, a new UText will be created as an immutable
shallow clone | | * If NULL, a new UText will be created as an immutable
shallow clone | |
| * of the actual input string. | | * of the actual input string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return The subject text currently associated with this regu
lar expression. | | * @return The subject text currently associated with this regu
lar expression. | |
| * If a pre-allocated UText was provided, it will alway
s be used and returned. | | * If a pre-allocated UText was provided, it will alway
s be used and returned. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_getUText(URegularExpression *regexp, | | uregex_getUText(URegularExpression *regexp, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set the subject text string upon which the regular expression is looki
ng for matches | | * Set the subject text string upon which the regular expression is looki
ng for matches | |
| * without changing any other aspect of the matching state. | | * without changing any other aspect of the matching state. | |
| * The new and previous text strings must have the same content. | | * The new and previous text strings must have the same content. | |
| | | | |
| skipping to change at line 414 | | skipping to change at line 413 | |
| * and replaces them with references to the new. | | * and replaces them with references to the new. | |
| * | | * | |
| * Caution: this function is normally used only by very specialized | | * Caution: this function is normally used only by very specialized | |
| * system-level code. One example use case is with garbage co
llection | | * system-level code. One example use case is with garbage co
llection | |
| * that moves the text in memory. | | * that moves the text in memory. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param text The new (moved) text string. | | * @param text The new (moved) text string. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * | | * | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_refreshUText(URegularExpression *regexp, | | uregex_refreshUText(URegularExpression *regexp, | |
| UText *text, | | UText *text, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Attempts to match the input string against the pattern. | | * Attempts to match the input string against the pattern. | |
| * To succeed, the match must extend to the end of the string, | | * To succeed, the match must extend to the end of the string, | |
| * or cover the complete match region. | | * or cover the complete match region. | |
| | | | |
| skipping to change at line 465 | | skipping to change at line 464 | |
| * | | * | |
| * If startIndex == -1 the match must cover the input region, or the ent
ire | | * If startIndex == -1 the match must cover the input region, or the ent
ire | |
| * input string if no region has been set. This directly corresponds to | | * input string if no region has been set. This directly corresponds to | |
| * Matcher.matches() in Java | | * Matcher.matches() in Java | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The input string (native) index at which to begi
n matching, or -1 | | * @param startIndex The input string (native) index at which to begi
n matching, or -1 | |
| * to match the input Region. | | * to match the input Region. | |
| * @param status Receives errors detected by this function. | | * @param status Receives errors detected by this function. | |
| * @return TRUE if there is a match | | * @return TRUE if there is a match | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UBool U_EXPORT2 | | U_DRAFT UBool U_EXPORT2 | |
| uregex_matches64(URegularExpression *regexp, | | uregex_matches64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Attempts to match the input string, starting from the specified index
, against the pattern. | | * Attempts to match the input string, starting from the specified index
, against the pattern. | |
| * The match may be of any length, and is not required to extend to the
end | | * The match may be of any length, and is not required to extend to the
end | |
| * of the input string. Contrast with uregex_matches(). | | * of the input string. Contrast with uregex_matches(). | |
| | | | |
| skipping to change at line 522 | | skipping to change at line 521 | |
| * | | * | |
| * <p>If the match succeeds then more information can be obtained via th
e | | * <p>If the match succeeds then more information can be obtained via th
e | |
| * <code>uregexp_start()</code>, <code>uregexp_end()</code>, | | * <code>uregexp_start()</code>, <code>uregexp_end()</code>, | |
| * and <code>uregexp_group()</code> functions.</p> | | * and <code>uregexp_group()</code> functions.</p> | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The input string (native) index at which to beg
in matching, or | | * @param startIndex The input string (native) index at which to beg
in matching, or | |
| * -1 to match the Input Region | | * -1 to match the Input Region | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return TRUE if there is a match. | | * @return TRUE if there is a match. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UBool U_EXPORT2 | | U_DRAFT UBool U_EXPORT2 | |
| uregex_lookingAt64(URegularExpression *regexp, | | uregex_lookingAt64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Find the first matching substring of the input string that matches th
e pattern. | | * Find the first matching substring of the input string that matches th
e pattern. | |
| * If startIndex is >= zero the search for a match begins at the specifi
ed index, | | * If startIndex is >= zero the search for a match begins at the specifi
ed index, | |
| * and any match region is reset. This corresponds directly with | | * and any match region is reset. This corresponds directly with | |
| | | | |
| skipping to change at line 571 | | skipping to change at line 570 | |
| * or at the start of the full string if no region has been spec
ified. | | * or at the start of the full string if no region has been spec
ified. | |
| * | | * | |
| * If a match is found, <code>uregex_start(), uregex_end()</code>, and | | * If a match is found, <code>uregex_start(), uregex_end()</code>, and | |
| * <code>uregex_group()</code> will provide more information regarding t
he match. | | * <code>uregex_group()</code> will provide more information regarding t
he match. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param startIndex The position (native) in the input string to beg
in the search, or | | * @param startIndex The position (native) in the input string to beg
in the search, or | |
| * -1 to search within the Input Region. | | * -1 to search within the Input Region. | |
| * @param status A reference to a UErrorCode to receive any error
s. | | * @param status A reference to a UErrorCode to receive any error
s. | |
| * @return TRUE if a match is found. | | * @return TRUE if a match is found. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UBool U_EXPORT2 | | U_DRAFT UBool U_EXPORT2 | |
| uregex_find64(URegularExpression *regexp, | | uregex_find64(URegularExpression *regexp, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Find the next pattern match in the input string. Begin searching | | * Find the next pattern match in the input string. Begin searching | |
| * the input at the location following the end of he previous match, | | * the input at the location following the end of he previous match, | |
| * or at the start of the string (or region) if there is no | | * or at the start of the string (or region) if there is no | |
| | | | |
| skipping to change at line 649 | | skipping to change at line 648 | |
| * the pattern. | | * the pattern. | |
| * @param dest A mutable UText in which to store the current i
nput. | | * @param dest A mutable UText in which to store the current i
nput. | |
| * If NULL, a new UText will be created as an immu
table shallow clone | | * If NULL, a new UText will be created as an immu
table shallow clone | |
| * of the entire input string. | | * of the entire input string. | |
| * @param groupLength The group length of the desired capture group. | | * @param groupLength The group length of the desired capture group. | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return The subject text currently associated with this
regular expression. | | * @return The subject text currently associated with this
regular expression. | |
| * If a pre-allocated UText was provided, it will
always be used and returned. | | * If a pre-allocated UText was provided, it will
always be used and returned. | |
| | | | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_groupUText(URegularExpression *regexp, | | uregex_groupUText(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UText *dest, | | UText *dest, | |
| int64_t *groupLength, | | int64_t *groupLength, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** Extract the string for the specified matching expression or subexpressi
on. | | /** Extract the string for the specified matching expression or subexpressi
on. | |
| * Group #0 is the complete string of matched text. | | * Group #0 is the complete string of matched text. | |
| * Group #1 is the text matched by the first set of capturing parentheses. | | * Group #1 is the text matched by the first set of capturing parentheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group to extract. Group 0 is the c
omplete | | * @param groupNum The capture group to extract. Group 0 is the c
omplete | |
| * match. The value of this parameter must be | | * match. The value of this parameter must be | |
| * less than or equal to the number of capture gro
ups in | | * less than or equal to the number of capture gro
ups in | |
| * the pattern. | | * the pattern. | |
| * @param dest Mutable UText to receive the matching string da
ta. | | * @param dest Mutable UText to receive the matching string da
ta. | |
| | | | |
| skipping to change at line 680 | | skipping to change at line 680 | |
| * @return The matching string data. If a pre-allocated UT
ext was provided, | | * @return The matching string data. If a pre-allocated UT
ext was provided, | |
| * it will always be used and returned. | | * it will always be used and returned. | |
| * | | * | |
| * @internal ICU 4.4 technology preview | | * @internal ICU 4.4 technology preview | |
| */ | | */ | |
| U_INTERNAL UText * U_EXPORT2 | | U_INTERNAL UText * U_EXPORT2 | |
| uregex_groupUTextDeep(URegularExpression *regexp, | | uregex_groupUTextDeep(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the start of the text matche
d by the | | * Returns the index in the input string of the start of the text matche
d by the | |
| * specified capture group during the previous match operation. Return
-1 if | | * specified capture group during the previous match operation. Return
-1 if | |
| * the capture group was not part of the last match. | | * the capture group was not part of the last match. | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group number | | * @param groupNum The capture group number | |
| | | | |
| skipping to change at line 713 | | skipping to change at line 714 | |
| * specified capture group during the previous match operation. Return
-1 if | | * specified capture group during the previous match operation. Return
-1 if | |
| * the capture group was not part of the last match. | | * the capture group was not part of the last match. | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group number | | * @param groupNum The capture group number | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return the starting (native) position in the input of
the text matched | | * @return the starting (native) position in the input of
the text matched | |
| * by the specified group. | | * by the specified group. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int64_t U_EXPORT2 | | U_DRAFT int64_t U_EXPORT2 | |
| uregex_start64(URegularExpression *regexp, | | uregex_start64(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Returns the index in the input string of the position following the e
nd | | * Returns the index in the input string of the position following the e
nd | |
| * of the text matched by the specified capture group. | | * of the text matched by the specified capture group. | |
| * Return -1 if the capture group was not part of the last match. | | * Return -1 if the capture group was not part of the last match. | |
| | | | |
| skipping to change at line 750 | | skipping to change at line 751 | |
| * Returns the index in the input string of the position following the e
nd | | * Returns the index in the input string of the position following the e
nd | |
| * of the text matched by the specified capture group. | | * of the text matched by the specified capture group. | |
| * Return -1 if the capture group was not part of the last match. | | * Return -1 if the capture group was not part of the last match. | |
| * Group #0 refers to the complete range of matched text. | | * Group #0 refers to the complete range of matched text. | |
| * Group #1 refers to the text matched by the first set of capturing par
entheses. | | * Group #1 refers to the text matched by the first set of capturing par
entheses. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param groupNum The capture group number | | * @param groupNum The capture group number | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
| * @return the (native) index of the position following th
e last matched character. | | * @return the (native) index of the position following th
e last matched character. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int64_t U_EXPORT2 | | U_DRAFT int64_t U_EXPORT2 | |
| uregex_end64(URegularExpression *regexp, | | uregex_end64(URegularExpression *regexp, | |
| int32_t groupNum, | | int32_t groupNum, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reset any saved state from the previous match. Has the effect of | | * Reset any saved state from the previous match. Has the effect of | |
| * causing uregex_findNext to begin at the specified index, and causing | | * causing uregex_findNext to begin at the specified index, and causing | |
| * uregex_start(), uregex_end() and uregex_group() to return an error | | * uregex_start(), uregex_end() and uregex_group() to return an error | |
| | | | |
| skipping to change at line 787 | | skipping to change at line 788 | |
| * Reset any saved state from the previous match. Has the effect of | | * Reset any saved state from the previous match. Has the effect of | |
| * causing uregex_findNext to begin at the specified index, and causing | | * causing uregex_findNext to begin at the specified index, and causing | |
| * uregex_start(), uregex_end() and uregex_group() to return an error | | * uregex_start(), uregex_end() and uregex_group() to return an error | |
| * indicating that there is no match information available. Clears any | | * indicating that there is no match information available. Clears any | |
| * match region that may have been set. | | * match region that may have been set. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param index The position (native) in the text at which a | | * @param index The position (native) in the text at which a | |
| * uregex_findNext() should begin searching. | | * uregex_findNext() should begin searching. | |
| * @param status A reference to a UErrorCode to receive any erro
rs. | | * @param status A reference to a UErrorCode to receive any erro
rs. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_reset64(URegularExpression *regexp, | | uregex_reset64(URegularExpression *regexp, | |
| int64_t index, | | int64_t index, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Sets the limits of the matching region for this URegularExpression. | | * Sets the limits of the matching region for this URegularExpression. | |
| * The region is the part of the input string that will be considered when
matching. | | * The region is the part of the input string that will be considered when
matching. | |
| * Invoking this method resets any saved state from the previous match, | | * Invoking this method resets any saved state from the previous match, | |
| | | | |
| skipping to change at line 839 | | skipping to change at line 840 | |
| * and useAnchoringBounds), certain constructs such as anchors may behave
differently | | * and useAnchoringBounds), certain constructs such as anchors may behave
differently | |
| * at or around the boundaries of the region | | * at or around the boundaries of the region | |
| * | | * | |
| * The function will fail if start is greater than limit, or if either ind
ex | | * The function will fail if start is greater than limit, or if either ind
ex | |
| * is less than zero or greater than the length of the string being match
ed. | | * is less than zero or greater than the length of the string being match
ed. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param regionStart The (native) index to begin searches at. | | * @param regionStart The (native) index to begin searches at. | |
| * @param regionLimit The (native) index to end searches at (exclusive). | | * @param regionLimit The (native) index to end searches at (exclusive). | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_setRegion64(URegularExpression *regexp, | | uregex_setRegion64(URegularExpression *regexp, | |
| int64_t regionStart, | | int64_t regionStart, | |
| int64_t regionLimit, | | int64_t regionLimit, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set the matching region and the starting index for subsequent matches | | * Set the matching region and the starting index for subsequent matches | |
| * in a single operation. | | * in a single operation. | |
| * This is useful because the usual function for setting the starting | | * This is useful because the usual function for setting the starting | |
| * index, urgex_reset(), also resets any region limits. | | * index, urgex_reset(), also resets any region limits. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param regionStart The (native) index to begin searches at. | | * @param regionStart The (native) index to begin searches at. | |
| * @param regionLimit The (native) index to end searches at (exclusive). | | * @param regionLimit The (native) index to end searches at (exclusive). | |
| * @param startIndex The index in the input text at which the next | | * @param startIndex The index in the input text at which the next | |
| * match operation should begin. | | * match operation should begin. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_setRegionAndStart(URegularExpression *regexp, | | uregex_setRegionAndStart(URegularExpression *regexp, | |
| int64_t regionStart, | | int64_t regionStart, | |
| int64_t regionLimit, | | int64_t regionLimit, | |
| int64_t startIndex, | | int64_t startIndex, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reports the start index of the matching region. Any matches found are l
imited to | | * Reports the start index of the matching region. Any matches found are l
imited to | |
| | | | |
| skipping to change at line 889 | | skipping to change at line 890 | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * 64bit version of uregex_regionStart. | | * 64bit version of uregex_regionStart. | |
| * Reports the start index of the matching region. Any matches found are l
imited to | | * Reports the start index of the matching region. Any matches found are l
imited to | |
| * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | | * to the region bounded by regionStart (inclusive) and regionEnd (exclusi
ve). | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @return The starting (native) index of this matcher's region. | | * @return The starting (native) index of this matcher's region. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int64_t U_EXPORT2 | | U_DRAFT int64_t U_EXPORT2 | |
| uregex_regionStart64(const URegularExpression *regexp, | | uregex_regionStart64(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | | * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | |
| * Any matches found are limited to to the region bounded by regionStart (
inclusive) | | * Any matches found are limited to to the region bounded by regionStart (
inclusive) | |
| * and regionEnd (exclusive). | | * and regionEnd (exclusive). | |
| * | | * | |
| | | | |
| skipping to change at line 918 | | skipping to change at line 919 | |
| | | | |
| /** | | /** | |
| * 64bit version of uregex_regionEnd. | | * 64bit version of uregex_regionEnd. | |
| * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | | * Reports the end index (exclusive) of the matching region for this URegu
larExpression. | |
| * Any matches found are limited to to the region bounded by regionStart (
inclusive) | | * Any matches found are limited to to the region bounded by regionStart (
inclusive) | |
| * and regionEnd (exclusive). | | * and regionEnd (exclusive). | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param status A pointer to a UErrorCode to receive any errors. | | * @param status A pointer to a UErrorCode to receive any errors. | |
| * @return The ending point (native) of this matcher's region. | | * @return The ending point (native) of this matcher's region. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int64_t U_EXPORT2 | | U_DRAFT int64_t U_EXPORT2 | |
| uregex_regionEnd64(const URegularExpression *regexp, | | uregex_regionEnd64(const URegularExpression *regexp, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Queries the transparency of region bounds for this URegularExpression. | | * Queries the transparency of region bounds for this URegularExpression. | |
| * See useTransparentBounds for a description of transparent and opaque bo
unds. | | * See useTransparentBounds for a description of transparent and opaque bo
unds. | |
| * By default, matching boundaries are opaque. | | * By default, matching boundaries are opaque. | |
| * | | * | |
| | | | |
| skipping to change at line 1073 | | skipping to change at line 1074 | |
| * references to capture groups; these take the form of $1, $2, etc. | | * references to capture groups; these take the form of $1, $2, etc. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param replacement A string containing the replacement text. | | * @param replacement A string containing the replacement text. | |
| * @param dest A mutable UText that will receive the result
. | | * @param dest A mutable UText that will receive the result
. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status A reference to a UErrorCode to receive any e
rrors. | | * @param status A reference to a UErrorCode to receive any e
rrors. | |
| * @return A UText containing the results of the find a
nd replace. | | * @return A UText containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it w
ill always be used and returned. | | * If a pre-allocated UText was provided, it w
ill always be used and returned. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_replaceAllUText(URegularExpression *regexp, | | uregex_replaceAllUText(URegularExpression *regexp, | |
| UText *replacement, | | UText *replacement, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Replaces the first substring of the input that matches the pattern | | * Replaces the first substring of the input that matches the pattern | |
| * with the given replacement string. This is a convenience function t
hat | | * with the given replacement string. This is a convenience function t
hat | |
| | | | |
| skipping to change at line 1132 | | skipping to change at line 1133 | |
| * references to capture groups; these take the form of $1, $2, etc. | | * references to capture groups; these take the form of $1, $2, etc. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param replacement A string containing the replacement text. | | * @param replacement A string containing the replacement text. | |
| * @param dest A mutable UText that will receive the result
. | | * @param dest A mutable UText that will receive the result
. | |
| * If NULL, a new UText will be created (which
may not be mutable). | | * If NULL, a new UText will be created (which
may not be mutable). | |
| * @param status A reference to a UErrorCode to receive any e
rrors. | | * @param status A reference to a UErrorCode to receive any e
rrors. | |
| * @return A UText containing the results of the find a
nd replace. | | * @return A UText containing the results of the find a
nd replace. | |
| * If a pre-allocated UText was provided, it w
ill always be used and returned. | | * If a pre-allocated UText was provided, it w
ill always be used and returned. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_replaceFirstUText(URegularExpression *regexp, | | uregex_replaceFirstUText(URegularExpression *regexp, | |
| UText *replacement, | | UText *replacement, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Implements a replace operation intended to be used as part of an | | * Implements a replace operation intended to be used as part of an | |
| * incremental find-and-replace. | | * incremental find-and-replace. | |
| | | | |
| skipping to change at line 1214 | | skipping to change at line 1215 | |
| * operations, see replaceFirst() or replaceAll().</p> | | * operations, see replaceFirst() or replaceAll().</p> | |
| * | | * | |
| * @param regexp The regular expression object. | | * @param regexp The regular expression object. | |
| * @param replacementText The string that will replace the matched por
tion of the | | * @param replacementText The string that will replace the matched por
tion of the | |
| * input string as it is copied to the destination
buffer. | | * input string as it is copied to the destination
buffer. | |
| * The replacement text may contain references ($1,
for | | * The replacement text may contain references ($1,
for | |
| * example) to capture groups from the match. | | * example) to capture groups from the match. | |
| * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | | * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | |
| * @param status A reference to a UErrorCode to receive any error
s. | | * @param status A reference to a UErrorCode to receive any error
s. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_appendReplacementUText(URegularExpression *regexp, | | uregex_appendReplacementUText(URegularExpression *regexp, | |
| UText *replacementText, | | UText *replacementText, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * As the final step in a find-and-replace operation, append the remainder | | * As the final step in a find-and-replace operation, append the remainder | |
| * of the input string, starting at the position following the last match, | | * of the input string, starting at the position following the last match, | |
| | | | |
| skipping to change at line 1268 | | skipping to change at line 1269 | |
| * | | * | |
| * @param regexp The regular expression object. This is needed t
o | | * @param regexp The regular expression object. This is needed t
o | |
| * obtain the input string and with the position | | * obtain the input string and with the position | |
| * of the last match within it. | | * of the last match within it. | |
| * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | | * @param dest A mutable UText that will receive the result. Mu
st not be NULL. | |
| * | | * | |
| * @param status Error code | | * @param status Error code | |
| * | | * | |
| * @return The destination UText. | | * @return The destination UText. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT UText * U_EXPORT2 | | U_DRAFT UText * U_EXPORT2 | |
| uregex_appendTailUText(URegularExpression *regexp, | | uregex_appendTailUText(URegularExpression *regexp, | |
| UText *dest, | | UText *dest, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Split a string into fields. Somewhat like split() from Perl. | | * Split a string into fields. Somewhat like split() from Perl. | |
| * The pattern matches identify delimiters that separate the input | | * The pattern matches identify delimiters that separate the input | |
| * into fields. The input data between the matches becomes the | | * into fields. The input data between the matches becomes the | |
| | | | |
| skipping to change at line 1359 | | skipping to change at line 1360 | |
| * If the number of fields found is less than destCapacity
, the | | * If the number of fields found is less than destCapacity
, the | |
| * extra strings in the destination array are not altered. | | * extra strings in the destination array are not altered. | |
| * If the number of destination strings is less than the n
umber | | * If the number of destination strings is less than the n
umber | |
| * of fields, the trailing part of the input string, inclu
ding any | | * of fields, the trailing part of the input string, inclu
ding any | |
| * field delimiters, is placed in the last destination str
ing. | | * field delimiters, is placed in the last destination str
ing. | |
| * This behavior mimics that of Perl. It is not an error
condition, and no | | * This behavior mimics that of Perl. It is not an error
condition, and no | |
| * error status is returned when all destField positions a
re used. | | * error status is returned when all destField positions a
re used. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
| * @return The number of fields into which the input string was sp
lit. | | * @return The number of fields into which the input string was sp
lit. | |
| * | | * | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT int32_t U_EXPORT2 | | U_DRAFT int32_t U_EXPORT2 | |
| uregex_splitUText(URegularExpression *regexp, | | uregex_splitUText(URegularExpression *regexp, | |
| UText *destFields[], | | UText *destFields[], | |
| int32_t destFieldsCapacity, | | int32_t destFieldsCapacity, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Set a processing time limit for match operations with this URegularExpre
ssion. | | * Set a processing time limit for match operations with this URegularExpre
ssion. | |
| * | | * | |
| | | | |
| skipping to change at line 1532 | | skipping to change at line 1533 | |
| * URegularExpression | | * URegularExpression | |
| * | | * | |
| * @param context context pointer. The callback function will be invoked | | * @param context context pointer. The callback function will be invoked | |
| * with the context specified at the time that | | * with the context specified at the time that | |
| * uregex_setFindProgressCallback() is called. | | * uregex_setFindProgressCallback() is called. | |
| * @param matchIndex the next index at which a match attempt will be attem
pted for this | | * @param matchIndex the next index at which a match attempt will be attem
pted for this | |
| * find operation. If this callback interrupts the search,
this is the | | * find operation. If this callback interrupts the search,
this is the | |
| * index at which a find/findNext operation may be re-initi
ated. | | * index at which a find/findNext operation may be re-initi
ated. | |
| * @return TRUE to continue the matching operation. | | * @return TRUE to continue the matching operation. | |
| * FALSE to terminate the matching operation. | | * FALSE to terminate the matching operation. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_CDECL_BEGIN | | U_CDECL_BEGIN | |
| typedef UBool U_CALLCONV URegexFindProgressCallback ( | | typedef UBool U_CALLCONV URegexFindProgressCallback ( | |
| const void *context, | | const void *context, | |
| int64_t matchIndex); | | int64_t matchIndex); | |
| U_CDECL_END | | U_CDECL_END | |
| | | | |
| /** | | /** | |
| * Set the find progress callback function for this URegularExpression. | | * Set the find progress callback function for this URegularExpression. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param callback A pointer to the user-supplied callback function. | | * @param callback A pointer to the user-supplied callback function. | |
| * @param context User context pointer. The value supplied at the | | * @param context User context pointer. The value supplied at the | |
| * time the callback function is set will be saved | | * time the callback function is set will be saved | |
| * and passed to the callback each time that it is cal
led. | | * and passed to the callback each time that it is cal
led. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_setFindProgressCallback(URegularExpression *regexp, | | uregex_setFindProgressCallback(URegularExpression *regexp, | |
| URegexFindProgressCallback *callback, | | URegexFindProgressCallback *callback, | |
| const void *context, | | const void *context, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| /** | | /** | |
| * Get the find progress callback function for this URegularExpression. | | * Get the find progress callback function for this URegularExpression. | |
| * | | * | |
| * @param regexp The compiled regular expression. | | * @param regexp The compiled regular expression. | |
| * @param callback Out parameter, receives a pointer to the user-suppl
ied | | * @param callback Out parameter, receives a pointer to the user-suppl
ied | |
| * callback function. | | * callback function. | |
| * @param context Out parameter, receives the user context pointer th
at | | * @param context Out parameter, receives the user context pointer th
at | |
| * was set when uregex_setFindProgressCallback() was c
alled. | | * was set when uregex_setFindProgressCallback() was c
alled. | |
| * @param status A reference to a UErrorCode to receive any errors. | | * @param status A reference to a UErrorCode to receive any errors. | |
|
| * @draft ICU 4.6 | | * @stable ICU 4.6 | |
| */ | | */ | |
| U_DRAFT void U_EXPORT2 | | U_DRAFT void U_EXPORT2 | |
| uregex_getFindProgressCallback(const URegularExpression *regexp, | | uregex_getFindProgressCallback(const URegularExpression *regexp, | |
| URegexFindProgressCallback **callbac
k, | | URegexFindProgressCallback **callbac
k, | |
| const void **context
, | | const void **context
, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
| #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ | | #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ | |
| #endif /* UREGEX_H */ | | #endif /* UREGEX_H */ | |
| | | | |
End of changes. 30 change blocks. |
| 29 lines changed or deleted | | 30 lines changed or added | |
|
| urename.h | | urename.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
|
| * Copyright (C) 2002-2011, International Business Machines | | * Copyright (C) 2002-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * | | * | |
| * file name: urename.h | | * file name: urename.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * Created by: Perl script written by Vladimir Weinstein | | * Created by: Perl script written by Vladimir Weinstein | |
| * | | * | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| that do not use Autoconf. */ | | that do not use Autoconf. */ | |
| /* #define U_DISABLE_RENAMING 1 */ | | /* #define U_DISABLE_RENAMING 1 */ | |
| | | | |
| #if !U_DISABLE_RENAMING | | #if !U_DISABLE_RENAMING | |
| | | | |
| /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i
n unicode/uvernum.h we can use, but we will give | | /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one i
n unicode/uvernum.h we can use, but we will give | |
| the platform a chance to define it first. | | the platform a chance to define it first. | |
| Normally (if utypes.h or umachine.h was included first) this will not be
necessary as it will already be defined. | | Normally (if utypes.h or umachine.h was included first) this will not be
necessary as it will already be defined. | |
| */ | | */ | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
|
| | | #include "unicode/uconfig.h" | |
| | | #endif | |
| | | | |
| | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #include "unicode/umachine.h" | | #include "unicode/umachine.h" | |
| #endif | | #endif | |
| | | | |
| /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ | | /* If we still don't have U_ICU_ENTRY_POINT_RENAME use the default. */ | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #include "unicode/uvernum.h" | | #include "unicode/uvernum.h" | |
| #endif | | #endif | |
| | | | |
| /* Error out before the following defines cause very strange and unexpected
code breakage */ | | /* Error out before the following defines cause very strange and unexpected
code breakage */ | |
| #ifndef U_ICU_ENTRY_POINT_RENAME | | #ifndef U_ICU_ENTRY_POINT_RENAME | |
| #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider
defining U_DISABLE_RENAMING if renaming should not be used. | | #error U_ICU_ENTRY_POINT_RENAME is not defined - cannot continue. Consider
defining U_DISABLE_RENAMING if renaming should not be used. | |
| #endif | | #endif | |
| | | | |
| /* C exports renaming data */ | | /* C exports renaming data */ | |
| | | | |
| #define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS) | | #define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS) | |
| #define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB) | | #define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB) | |
|
| #define LEN_CANONICAL_SYSTEM_LOCATION_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CA | | | |
| NONICAL_SYSTEM_LOCATION_ZONES) | | | |
| #define LEN_CANONICAL_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CANONICAL_S | | | |
| YSTEM_ZONES) | | | |
| #define LEN_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_SYSTEM_ZONES) | | | |
| #define LNnn U_ICU_ENTRY_POINT_RENAME(LNnn) | | | |
| #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS
tring) | | #define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToS
tring) | |
| #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege
rToString) | | #define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_intege
rToString) | |
|
| #define T_CString_stricmp U_ICU_ENTRY_POINT_RENAME(T_CString_stricmp) | | | |
| #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string
ToInteger) | | #define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_string
ToInteger) | |
|
| #define T_CString_strnicmp U_ICU_ENTRY_POINT_RENAME(T_CString_strnicmp) | | | |
| #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas
e) | | #define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCas
e) | |
| #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas
e) | | #define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCas
e) | |
| #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA
LLBACK_ESCAPE) | | #define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CA
LLBACK_ESCAPE) | |
| #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_SKIP) | | #define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_SKIP) | |
| #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_STOP) | | #define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALL
BACK_STOP) | |
| #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_
U_CALLBACK_SUBSTITUTE) | | #define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_
U_CALLBACK_SUBSTITUTE) | |
| #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA
CK_ESCAPE) | | #define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBA
CK_ESCAPE) | |
| #define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK
_SKIP) | | #define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK
_SKIP) | |
| #define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK
_STOP) | | #define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK
_STOP) | |
| #define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CA
LLBACK_SUBSTITUTE) | | #define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CA
LLBACK_SUBSTITUTE) | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 112 | |
| #define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data) | | #define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data) | |
| #define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData) | | #define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData) | |
| #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) | | #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) | |
| #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) | | #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) | |
| #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) | | #define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) | |
| #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) | | #define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) | |
| #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) | | #define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) | |
| #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) | | #define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) | |
| #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) | | #define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) | |
| #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) | | #define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) | |
|
| #define buildWSConfusableData U_ICU_ENTRY_POINT_RENAME(buildWSConfusableDat
a) | | | |
| #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) | | #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) | |
| #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) | | #define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) | |
| #define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable) | | #define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable) | |
| #define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList) | | #define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList) | |
| #define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars) | | #define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars) | |
| #define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac
heEntry) | | #define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCac
heEntry) | |
| #define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList) | | #define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList) | |
| #define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString
Key) | | #define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeString
Key) | |
|
| | | #define gICUInitMutex U_ICU_ENTRY_POINT_RENAME(gICUInitMutex) | |
| | | #define gICUInitialized U_ICU_ENTRY_POINT_RENAME(gICUInitialized) | |
| #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) | | #define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) | |
| #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) | | #define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) | |
| #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) | | #define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) | |
| #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) | | #define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) | |
| #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic
ClassID) | | #define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamic
ClassID) | |
| #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) | | #define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) | |
| #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) | | #define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) | |
| #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) | | #define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) | |
| #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) | | #define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) | |
| #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious
Start) | | #define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPrevious
Start) | |
| | | | |
| skipping to change at line 281 | | skipping to change at line 280 | |
| #define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) | | #define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) | |
| #define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) | | #define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) | |
| #define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) | | #define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) | |
| #define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) | | #define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) | |
| #define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverte
r) | | #define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverte
r) | |
| #define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) | | #define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) | |
| #define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) | | #define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) | |
| #define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM
axValue) | | #define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM
axValue) | |
| #define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM
inValue) | | #define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyM
inValue) | |
| #define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValu
e) | | #define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValu
e) | |
|
| | | #define u_getMainProperties U_ICU_ENTRY_POINT_RENAME(u_getMainProperties) | |
| #define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue) | | #define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue) | |
| #define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum) | | #define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum) | |
| #define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName) | | #define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName) | |
| #define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueE
num) | | #define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueE
num) | |
| #define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueN
ame) | | #define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueN
ame) | |
| #define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodePropert
ies) | | #define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodePropert
ies) | |
| #define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion) | | #define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion) | |
| #define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) | | #define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) | |
|
| | | #define u_get_stdout U_ICU_ENTRY_POINT_RENAME(u_get_stdout) | |
| #define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) | | #define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) | |
| #define u_init U_ICU_ENTRY_POINT_RENAME(u_init) | | #define u_init U_ICU_ENTRY_POINT_RENAME(u_init) | |
|
| #define u_isDataOlder U_ICU_ENTRY_POINT_RENAME(u_isDataOlder) | | | |
| #define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) | | #define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) | |
| #define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) | | #define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) | |
| #define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart) | | #define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart) | |
| #define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl) | | #define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl) | |
| #define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart) | | #define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart) | |
| #define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart) | | #define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart) | |
| #define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar) | | #define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar) | |
| #define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored) | | #define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored) | |
| #define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic) | | #define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic) | |
| #define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase) | | #define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase) | |
| | | | |
| skipping to change at line 338 | | skipping to change at line 338 | |
| #define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32) | | #define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32) | |
| #define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp) | | #define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp) | |
| #define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOr
der) | | #define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOr
der) | |
| #define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy) | | #define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy) | |
| #define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove) | | #define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove) | |
| #define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr) | | #define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr) | |
| #define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32) | | #define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32) | |
| #define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset) | | #define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset) | |
| #define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage) | | #define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage) | |
| #define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWith
Error) | | #define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWith
Error) | |
|
| | | #define u_printf U_ICU_ENTRY_POINT_RENAME(u_printf) | |
| #define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse) | | #define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse) | |
|
| | | #define u_printf_u U_ICU_ENTRY_POINT_RENAME(u_printf_u) | |
| #define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefault
Converter) | | #define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefault
Converter) | |
| #define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse) | | #define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse) | |
| #define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncD
ecFunctions) | | #define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncD
ecFunctions) | |
| #define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory) | | #define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory) | |
| #define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions) | | #define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions) | |
| #define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions) | | #define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions) | |
| #define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic) | | #define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic) | |
| #define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf) | | #define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf) | |
| #define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u) | | #define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u) | |
| #define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf) | | #define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf) | |
| | | | |
| skipping to change at line 500 | | skipping to change at line 502 | |
| #define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType) | | #define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType) | |
| #define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus) | | #define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus) | |
| #define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVe
c) | | #define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVe
c) | |
| #define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary) | | #define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary) | |
| #define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last) | | #define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last) | |
| #define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next) | | #define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next) | |
| #define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open) | | #define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open) | |
| #define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules) | | #define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules) | |
| #define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding) | | #define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding) | |
| #define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous) | | #define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous) | |
|
| | | #define ubrk_refreshUText U_ICU_ENTRY_POINT_RENAME(ubrk_refreshUText) | |
| #define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone) | | #define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone) | |
| #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) | | #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) | |
| #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) | | #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) | |
| #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) | | #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) | |
| #define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) | | #define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) | |
| #define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) | | #define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) | |
| #define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) | | #define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) | |
| #define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone) | | #define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone) | |
| #define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close) | | #define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close) | |
| #define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable) | | #define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable) | |
| | | | |
| skipping to change at line 567 | | skipping to change at line 570 | |
| #define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower) | | #define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower) | |
| #define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle) | | #define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle) | |
| #define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper) | | #define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper) | |
| #define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower) | | #define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower) | |
| #define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle) | | #define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle) | |
| #define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper) | | #define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper) | |
| #define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close) | | #define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close) | |
| #define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBrea
kIterator) | | #define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBrea
kIterator) | |
| #define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) | | #define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) | |
| #define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) | | #define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) | |
|
| | | #define ucasemap_internalUTF8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_inte | |
| | | rnalUTF8ToTitle) | |
| | | #define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8) | |
| #define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) | | #define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) | |
| #define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBrea
kIterator) | | #define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBrea
kIterator) | |
| #define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) | | #define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) | |
| #define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions) | | #define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions) | |
| #define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle) | | #define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle) | |
| #define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCas
e) | | #define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCas
e) | |
| #define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower) | | #define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower) | |
| #define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle) | | #define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle) | |
| #define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper) | | #define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper) | |
| #define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close) | | #define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close) | |
| | | | |
| skipping to change at line 826 | | skipping to change at line 831 | |
| #define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInput
FilterEnabled) | | #define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInput
FilterEnabled) | |
| #define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open) | | #define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open) | |
| #define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDecla
redEncoding) | | #define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDecla
redEncoding) | |
| #define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText) | | #define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText) | |
| #define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencie
s) | | #define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencie
s) | |
| #define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale) | | #define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale) | |
| #define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndD
ate) | | #define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndD
ate) | |
| #define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDe
faultFractionDigits) | | #define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDe
faultFractionDigits) | |
| #define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getK
eywordValuesForLocale) | | #define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getK
eywordValuesForLocale) | |
| #define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName) | | #define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName) | |
|
| | | #define ucurr_getNumericCode U_ICU_ENTRY_POINT_RENAME(ucurr_getNumericCode) | |
| #define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName) | | #define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName) | |
| #define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundi
ngIncrement) | | #define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundi
ngIncrement) | |
| #define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable) | | #define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable) | |
| #define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurre
ncies) | | #define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurre
ncies) | |
| #define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register) | | #define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register) | |
| #define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister) | | #define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister) | |
| #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) | | #define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) | |
| #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter
nRelative) | | #define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatter
nRelative) | |
| #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) | | #define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) | |
| #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) | | #define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) | |
| #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) | | #define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) | |
| #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) | | #define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) | |
| #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) | | #define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) | |
| #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear
Start) | | #define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYear
Start) | |
| #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) | | #define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) | |
| #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) | | #define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) | |
|
| | | #define udat_getDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_getDefaultCont
ext) | |
| #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) | | #define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) | |
| #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) | | #define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) | |
| #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) | | #define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) | |
| #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) | | #define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) | |
| #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) | | #define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) | |
| #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) | | #define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) | |
| #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) | | #define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) | |
|
| | | #define udat_registerOpener U_ICU_ENTRY_POINT_RENAME(udat_registerOpener) | |
| #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear
Start) | | #define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYear
Start) | |
| #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) | | #define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) | |
|
| | | #define udat_setDefaultContext U_ICU_ENTRY_POINT_RENAME(udat_setDefaultCont
ext) | |
| #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) | | #define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) | |
| #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) | | #define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) | |
| #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) | | #define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) | |
| #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa
teField) | | #define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDa
teField) | |
| #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) | | #define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) | |
| #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeDate) | | #define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeDate) | |
| #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeTime) | | #define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternR
elativeTime) | |
|
| | | #define udat_unregisterOpener U_ICU_ENTRY_POINT_RENAME(udat_unregisterOpene
r) | |
| #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat
a) | | #define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonDat
a) | |
| #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) | | #define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) | |
| #define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper) | | #define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper) | |
| #define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize) | | #define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize) | |
| #define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo) | | #define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo) | |
| #define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize) | | #define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize) | |
| #define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength) | | #define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength) | |
| #define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory) | | #define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory) | |
| #define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory) | | #define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory) | |
| #define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open) | | #define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open) | |
| | | | |
| skipping to change at line 935 | | skipping to change at line 945 | |
| #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) | | #define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) | |
| #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) | | #define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) | |
| #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c
ompareCaselessUnicodeString) | | #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_c
ompareCaselessUnicodeString) | |
| #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) | | #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) | |
| #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) | | #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) | |
| #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) | | #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) | |
| #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) | | #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) | |
| #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn
icodeString) | | #define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUn
icodeString) | |
| #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) | | #define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) | |
| #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl
e) | | #define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtabl
e) | |
|
| #define uhash_deleteUObject U_ICU_ENTRY_POINT_RENAME(uhash_deleteUObject) | | | |
| #define uhash_deleteUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_deleteUnic | | | |
| odeString) | | | |
| #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) | | #define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) | |
| #define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) | | #define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) | |
|
| #define uhash_freeBlock U_ICU_ENTRY_POINT_RENAME(uhash_freeBlock) | | | |
| #define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get) | | #define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get) | |
| #define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti) | | #define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti) | |
| #define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hash
CaselessUnicodeString) | | #define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hash
CaselessUnicodeString) | |
| #define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) | | #define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) | |
|
| #define uhash_hashCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashCharsN) | | | |
| #define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) | | #define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) | |
| #define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) | | #define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) | |
| #define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) | | #define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) | |
|
| #define uhash_hashUCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashUCharsN) | | | |
| #define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeS
tring) | | #define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeS
tring) | |
| #define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget) | | #define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget) | |
| #define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti) | | #define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti) | |
| #define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init) | | #define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init) | |
| #define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput) | | #define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput) | |
| #define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi) | | #define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi) | |
| #define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove) | | #define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove) | |
| #define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei) | | #define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei) | |
| #define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement) | | #define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement) | |
| #define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open) | | #define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open) | |
| | | | |
| skipping to change at line 1041 | | skipping to change at line 1046 | |
| #define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry) | | #define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry) | |
| #define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCo
untryID) | | #define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCo
untryID) | |
| #define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentL
anguageID) | | #define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentL
anguageID) | |
| #define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault) | | #define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault) | |
| #define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCoun
try) | | #define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCoun
try) | |
| #define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyw
ord) | | #define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyw
ord) | |
| #define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDispla
yKeywordValue) | | #define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDispla
yKeywordValue) | |
| #define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLan
guage) | | #define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLan
guage) | |
| #define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName) | | #define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName) | |
| #define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScrip
t) | | #define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScrip
t) | |
|
| | | #define uloc_getDisplayScriptInContext U_ICU_ENTRY_POINT_RENAME(uloc_getDis
playScriptInContext) | |
| #define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVari
ant) | | #define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVari
ant) | |
| #define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) | | #define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) | |
| #define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) | | #define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) | |
| #define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) | | #define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) | |
| #define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) | | #define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) | |
| #define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue) | | #define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue) | |
| #define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID) | | #define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID) | |
| #define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage) | | #define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage) | |
| #define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrient
ation) | | #define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrient
ation) | |
| #define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCI
D) | | #define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCI
D) | |
| | | | |
| skipping to change at line 1098 | | skipping to change at line 1104 | |
| #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) | | #define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) | |
| #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) | | #define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) | |
| #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) | | #define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) | |
| #define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy) | | #define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy) | |
| #define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init) | | #define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init) | |
| #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) | | #define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) | |
| #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) | | #define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) | |
| #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic
ode32Instance) | | #define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnic
ode32Instance) | |
| #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) | | #define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) | |
| #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) | | #define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) | |
|
| | | #define unorm2_composePair U_ICU_ENTRY_POINT_RENAME(unorm2_composePair) | |
| | | #define unorm2_getCombiningClass U_ICU_ENTRY_POINT_RENAME(unorm2_getCombini | |
| | | ngClass) | |
| #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos
ition) | | #define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecompos
ition) | |
| #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) | | #define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) | |
|
| | | #define unorm2_getNFCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFCInstanc | |
| | | e) | |
| | | #define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstanc | |
| | | e) | |
| | | #define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getN | |
| | | FKCCasefoldInstance) | |
| | | #define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInsta | |
| | | nce) | |
| | | #define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInsta | |
| | | nce) | |
| | | #define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDe | |
| | | composition) | |
| #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundary
After) | | #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundary
After) | |
| #define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundar
yBefore) | | #define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundar
yBefore) | |
| #define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert) | | #define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert) | |
| #define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized) | | #define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized) | |
| #define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize) | | #define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize) | |
| #define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_nor
malizeSecondAndAppend) | | #define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_nor
malizeSecondAndAppend) | |
| #define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered) | | #define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered) | |
| #define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck) | | #define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck) | |
| #define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickC
heckYes) | | #define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickC
heckYes) | |
| #define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap) | | #define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap) | |
| #define unorm_closeIter U_ICU_ENTRY_POINT_RENAME(unorm_closeIter) | | #define unorm_closeIter U_ICU_ENTRY_POINT_RENAME(unorm_closeIter) | |
| #define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare) | | #define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare) | |
| #define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate) | | #define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate) | |
|
| #define unorm_getFCDTrieIndex U_ICU_ENTRY_POINT_RENAME(unorm_getFCDTrieInde
x) | | #define unorm_getFCD16 U_ICU_ENTRY_POINT_RENAME(unorm_getFCD16) | |
| #define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck) | | #define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck) | |
| #define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized) | | #define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized) | |
| #define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNorm
alizedWithOptions) | | #define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNorm
alizedWithOptions) | |
| #define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next) | | #define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next) | |
| #define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize) | | #define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize) | |
| #define unorm_openIter U_ICU_ENTRY_POINT_RENAME(unorm_openIter) | | #define unorm_openIter U_ICU_ENTRY_POINT_RENAME(unorm_openIter) | |
| #define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous) | | #define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous) | |
| #define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck) | | #define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck) | |
| #define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickChe
ckWithOptions) | | #define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickChe
ckWithOptions) | |
| #define unorm_setIter U_ICU_ENTRY_POINT_RENAME(unorm_setIter) | | #define unorm_setIter U_ICU_ENTRY_POINT_RENAME(unorm_setIter) | |
| | | | |
| skipping to change at line 1181 | | skipping to change at line 1195 | |
| #define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug) | | #define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug) | |
| #define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext) | | #define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext) | |
| #define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) | | #define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) | |
| #define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) | | #define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) | |
| #define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnloa
d) | | #define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnloa
d) | |
| #define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) | | #define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) | |
| #define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addP
ropertyStarts) | | #define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addP
ropertyStarts) | |
| #define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy) | | #define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy) | |
| #define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic) | | #define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic) | |
| #define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower) | | #define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower) | |
|
| | | #define uprv_calloc U_ICU_ENTRY_POINT_RENAME(uprv_calloc) | |
| #define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil) | | #define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil) | |
| #define uprv_cnttab_addContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_add
Contraction) | | #define uprv_cnttab_addContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_add
Contraction) | |
| #define uprv_cnttab_changeContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_
changeContraction) | | #define uprv_cnttab_changeContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_
changeContraction) | |
| #define uprv_cnttab_changeLastCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_chang
eLastCE) | | #define uprv_cnttab_changeLastCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_chang
eLastCE) | |
| #define uprv_cnttab_clone U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_clone) | | #define uprv_cnttab_clone U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_clone) | |
| #define uprv_cnttab_close U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_close) | | #define uprv_cnttab_close U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_close) | |
| #define uprv_cnttab_constructTable U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_con
structTable) | | #define uprv_cnttab_constructTable U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_con
structTable) | |
| #define uprv_cnttab_findCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCE) | | #define uprv_cnttab_findCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCE) | |
| #define uprv_cnttab_findCP U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCP) | | #define uprv_cnttab_findCP U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCP) | |
| #define uprv_cnttab_getCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_getCE) | | #define uprv_cnttab_getCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_getCE) | |
| | | | |
| skipping to change at line 1217 | | skipping to change at line 1232 | |
| #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext
GetRounding) | | #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext
GetRounding) | |
| #define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGe
tStatus) | | #define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGe
tStatus) | |
| #define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decConte
xtRestoreStatus) | | #define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decConte
xtRestoreStatus) | |
| #define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextS
aveStatus) | | #define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextS
aveStatus) | |
| #define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext
SetRounding) | | #define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContext
SetRounding) | |
| #define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSe
tStatus) | | #define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSe
tStatus) | |
| #define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_de
cContextSetStatusFromString) | | #define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_de
cContextSetStatusFromString) | |
| #define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(up
rv_decContextSetStatusFromStringQuiet) | | #define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(up
rv_decContextSetStatusFromStringQuiet) | |
| #define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decCont
extSetStatusQuiet) | | #define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decCont
extSetStatusQuiet) | |
| #define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decCont
extStatusToString) | | #define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decCont
extStatusToString) | |
|
| #define uprv_decContextTestEndian U_ICU_ENTRY_POINT_RENAME(uprv_decContextT
estEndian) | | | |
| #define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decCon
textTestSavedStatus) | | #define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decCon
textTestSavedStatus) | |
| #define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextT
estStatus) | | #define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextT
estStatus) | |
| #define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZ
eroStatus) | | #define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZ
eroStatus) | |
| #define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) | | #define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) | |
| #define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) | | #define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) | |
| #define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) | | #define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) | |
| #define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) | | #define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) | |
| #define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumber
ClassToString) | | #define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumber
ClassToString) | |
| #define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompar
e) | | #define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompar
e) | |
| #define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumber
CompareSignal) | | #define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumber
CompareSignal) | |
| | | | |
| skipping to change at line 1283 | | skipping to change at line 1297 | |
| #define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTo
EngString) | | #define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTo
EngString) | |
| #define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt3
2) | | #define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt3
2) | |
| #define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumb
erToIntegralExact) | | #define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumb
erToIntegralExact) | |
| #define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumb
erToIntegralValue) | | #define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumb
erToIntegralValue) | |
| #define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToStr
ing) | | #define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToStr
ing) | |
| #define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUIn
t32) | | #define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUIn
t32) | |
| #define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim) | | #define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim) | |
| #define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersio
n) | | #define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersio
n) | |
| #define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor) | | #define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor) | |
| #define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero) | | #define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero) | |
|
| | | #define uprv_deleteUObject U_ICU_ENTRY_POINT_RENAME(uprv_deleteUObject) | |
| #define uprv_delete_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_delete_collIt
erate) | | #define uprv_delete_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_delete_collIt
erate) | |
| #define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close) | | #define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close) | |
| #define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open) | | #define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open) | |
| #define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func) | | #define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func) | |
| #define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy) | | #define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy) | |
| #define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii) | | #define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii) | |
| #define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToL
owercaseAscii) | | #define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToL
owercaseAscii) | |
| #define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower) | | #define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower) | |
| #define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs) | | #define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs) | |
| #define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor) | | #define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor) | |
| | | | |
| skipping to change at line 1311 | | skipping to change at line 1326 | |
| #define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharN
ameLength) | | #define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharN
ameLength) | |
| #define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues) | | #define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues) | |
| #define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN) | | #define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN) | |
| #define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime) | | #define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime) | |
| #define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticC
urrencyName) | | #define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticC
urrencyName) | |
| #define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime) | | #define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime) | |
| #define uprv_haveProperties U_ICU_ENTRY_POINT_RENAME(uprv_haveProperties) | | #define uprv_haveProperties U_ICU_ENTRY_POINT_RENAME(uprv_haveProperties) | |
| #define uprv_init_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_init_collIterat
e) | | #define uprv_init_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_init_collIterat
e) | |
| #define uprv_init_pce U_ICU_ENTRY_POINT_RENAME(uprv_init_pce) | | #define uprv_init_pce U_ICU_ENTRY_POINT_RENAME(uprv_init_pce) | |
| #define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator) | | #define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator) | |
|
| | | #define uprv_isASCIILetter U_ICU_ENTRY_POINT_RENAME(uprv_isASCIILetter) | |
| #define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite) | | #define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite) | |
| #define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantStr
ing) | | #define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantStr
ing) | |
| #define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUS
tring) | | #define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUS
tring) | |
| #define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN) | | #define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN) | |
| #define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInf
inity) | | #define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInf
inity) | |
| #define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInf
inity) | | #define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInf
inity) | |
| #define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou) | | #define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou) | |
| #define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log) | | #define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log) | |
| #define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc) | | #define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc) | |
| #define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile) | | #define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile) | |
| #define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max) | | #define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max) | |
| #define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa) | | #define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa) | |
| #define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr) | | #define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr) | |
| #define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min) | | #define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min) | |
| #define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf) | | #define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf) | |
| #define uprv_new_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_new_collIterate) | | #define uprv_new_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_new_collIterate) | |
|
| #define uprv_openPatternWhiteSpaceSet U_ICU_ENTRY_POINT_RENAME(uprv_openPat
ternWhiteSpaceSet) | | | |
| #define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency) | | #define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency) | |
| #define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute) | | #define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute) | |
| #define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow) | | #define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow) | |
| #define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10) | | #define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10) | |
| #define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc) | | #define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc) | |
| #define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round) | | #define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round) | |
| #define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray) | | #define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray) | |
| #define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare) | | #define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare) | |
| #define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup) | | #define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup) | |
|
| | | #define uprv_stricmp U_ICU_ENTRY_POINT_RENAME(uprv_stricmp) | |
| #define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup) | | #define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup) | |
|
| | | #define uprv_strnicmp U_ICU_ENTRY_POINT_RENAME(uprv_strnicmp) | |
| #define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError) | | #define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError) | |
| #define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone) | | #define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone) | |
| #define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper) | | #define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper) | |
| #define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc) | | #define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc) | |
| #define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname) | | #define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname) | |
| #define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset) | | #define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset) | |
| #define uprv_uca_addAnElement U_ICU_ENTRY_POINT_RENAME(uprv_uca_addAnElemen
t) | | #define uprv_uca_addAnElement U_ICU_ENTRY_POINT_RENAME(uprv_uca_addAnElemen
t) | |
| #define uprv_uca_assembleTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_assembleTa
ble) | | #define uprv_uca_assembleTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_assembleTa
ble) | |
| #define uprv_uca_canonicalClosure U_ICU_ENTRY_POINT_RENAME(uprv_uca_canonic
alClosure) | | #define uprv_uca_canonicalClosure U_ICU_ENTRY_POINT_RENAME(uprv_uca_canonic
alClosure) | |
| #define uprv_uca_closeTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_closeTemp
Table) | | #define uprv_uca_closeTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_closeTemp
Table) | |
| | | | |
| skipping to change at line 1600 | | skipping to change at line 1617 | |
| #define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedCh
ars) | | #define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedCh
ars) | |
| #define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowed
Locales) | | #define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowed
Locales) | |
| #define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllo
wedUnicodeSet) | | #define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllo
wedUnicodeSet) | |
| #define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks) | | #define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks) | |
| #define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap) | | #define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap) | |
| #define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close) | | #define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close) | |
| #define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open) | | #define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open) | |
| #define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType) | | #define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType) | |
| #define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare) | | #define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare) | |
| #define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap) | | #define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap) | |
|
| #define ustr_foldCase U_ICU_ENTRY_POINT_RENAME(ustr_foldCase) | | #define ustr_hashCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashCharsN) | |
| #define ustr_toLower U_ICU_ENTRY_POINT_RENAME(ustr_toLower) | | #define ustr_hashICharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashICharsN) | |
| #define ustr_toTitle U_ICU_ENTRY_POINT_RENAME(ustr_toTitle) | | #define ustr_hashUCharsN U_ICU_ENTRY_POINT_RENAME(ustr_hashUCharsN) | |
| #define ustr_toUpper U_ICU_ENTRY_POINT_RENAME(ustr_toUpper) | | #define ustrcase_internalFold U_ICU_ENTRY_POINT_RENAME(ustrcase_internalFol | |
| #define utext_caseCompare U_ICU_ENTRY_POINT_RENAME(utext_caseCompare) | | d) | |
| #define utext_caseCompareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_caseCom | | #define ustrcase_internalToLower U_ICU_ENTRY_POINT_RENAME(ustrcase_internal | |
| pareNativeLimit) | | ToLower) | |
| | | #define ustrcase_internalToTitle U_ICU_ENTRY_POINT_RENAME(ustrcase_internal | |
| | | ToTitle) | |
| | | #define ustrcase_internalToUpper U_ICU_ENTRY_POINT_RENAME(ustrcase_internal | |
| | | ToUpper) | |
| | | #define ustrcase_map U_ICU_ENTRY_POINT_RENAME(ustrcase_map) | |
| | | #define ustrcase_setTempCaseMapLocale U_ICU_ENTRY_POINT_RENAME(ustrcase_set | |
| | | TempCaseMapLocale) | |
| #define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At) | | #define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At) | |
| #define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone) | | #define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone) | |
| #define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close) | | #define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close) | |
|
| #define utext_compare U_ICU_ENTRY_POINT_RENAME(utext_compare) | | | |
| #define utext_compareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_compareNati | | | |
| veLimit) | | | |
| #define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy) | | #define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy) | |
| #define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32) | | #define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32) | |
| #define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals) | | #define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals) | |
| #define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract) | | #define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract) | |
| #define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze) | | #define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze) | |
| #define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex) | | #define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex) | |
| #define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPrev
iousNativeIndex) | | #define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPrev
iousNativeIndex) | |
| #define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData) | | #define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData) | |
| #define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpe
nsive) | | #define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpe
nsive) | |
| #define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable) | | #define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable) | |
| | | | |
| skipping to change at line 1759 | | skipping to change at line 1777 | |
| #define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom) | | #define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom) | |
| #define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticCl
assID) | | #define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticCl
assID) | |
| #define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime) | | #define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime) | |
| #define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo) | | #define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo) | |
| #define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open) | | #define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open) | |
| #define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty) | | #define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty) | |
| #define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom) | | #define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom) | |
| #define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) | | #define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) | |
| #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) | | #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) | |
| | | | |
|
| /* C++ class names renaming defines */ | | | |
| | | | |
| #ifdef XP_CPLUSPLUS | | | |
| #if !U_HAVE_NAMESPACE | | | |
| | | | |
| #define AbsoluteValueSubstitution U_ICU_ENTRY_POINT_RENAME(AbsoluteValueSub | | | |
| stitution) | | | |
| #define AlphabeticIndex U_ICU_ENTRY_POINT_RENAME(AlphabeticIndex) | | | |
| #define AlternateSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(AlternateSub | | | |
| stitutionSubtable) | | | |
| #define AnchorTable U_ICU_ENTRY_POINT_RENAME(AnchorTable) | | | |
| #define AndConstraint U_ICU_ENTRY_POINT_RENAME(AndConstraint) | | | |
| #define AnnualTimeZoneRule U_ICU_ENTRY_POINT_RENAME(AnnualTimeZoneRule) | | | |
| #define AnyTransliterator U_ICU_ENTRY_POINT_RENAME(AnyTransliterator) | | | |
| #define Appendable U_ICU_ENTRY_POINT_RENAME(Appendable) | | | |
| #define ArabicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(ArabicOpenTypeL | | | |
| ayoutEngine) | | | |
| #define ArabicShaping U_ICU_ENTRY_POINT_RENAME(ArabicShaping) | | | |
| #define ArgExtractor U_ICU_ENTRY_POINT_RENAME(ArgExtractor) | | | |
| #define BMPSet U_ICU_ENTRY_POINT_RENAME(BMPSet) | | | |
| #define BackwardUTrie2StringIterator U_ICU_ENTRY_POINT_RENAME(BackwardUTrie | | | |
| 2StringIterator) | | | |
| #define BadCharacterTable U_ICU_ENTRY_POINT_RENAME(BadCharacterTable) | | | |
| #define BasicCalendarFactory U_ICU_ENTRY_POINT_RENAME(BasicCalendarFactory) | | | |
| #define BasicTimeZone U_ICU_ENTRY_POINT_RENAME(BasicTimeZone) | | | |
| #define BinarySearchLookupTable U_ICU_ENTRY_POINT_RENAME(BinarySearchLookup | | | |
| Table) | | | |
| #define BoyerMooreSearch U_ICU_ENTRY_POINT_RENAME(BoyerMooreSearch) | | | |
| #define BreakIterator U_ICU_ENTRY_POINT_RENAME(BreakIterator) | | | |
| #define BreakTransliterator U_ICU_ENTRY_POINT_RENAME(BreakTransliterator) | | | |
| #define BuddhistCalendar U_ICU_ENTRY_POINT_RENAME(BuddhistCalendar) | | | |
| #define BuildCompactTrieHorizontalNode U_ICU_ENTRY_POINT_RENAME(BuildCompac | | | |
| tTrieHorizontalNode) | | | |
| #define BuildCompactTrieNode U_ICU_ENTRY_POINT_RENAME(BuildCompactTrieNode) | | | |
| #define BuildCompactTrieVerticalNode U_ICU_ENTRY_POINT_RENAME(BuildCompactT | | | |
| rieVerticalNode) | | | |
| #define BuilderScriptSet U_ICU_ENTRY_POINT_RENAME(BuilderScriptSet) | | | |
| #define ByteSink U_ICU_ENTRY_POINT_RENAME(ByteSink) | | | |
| #define BytesTrie U_ICU_ENTRY_POINT_RENAME(BytesTrie) | | | |
| #define BytesTrieBuilder U_ICU_ENTRY_POINT_RENAME(BytesTrieBuilder) | | | |
| #define BytesTrieElement U_ICU_ENTRY_POINT_RENAME(BytesTrieElement) | | | |
| #define CEBuffer U_ICU_ENTRY_POINT_RENAME(CEBuffer) | | | |
| #define CECalendar U_ICU_ENTRY_POINT_RENAME(CECalendar) | | | |
| #define CEList U_ICU_ENTRY_POINT_RENAME(CEList) | | | |
| #define CEToStringsMap U_ICU_ENTRY_POINT_RENAME(CEToStringsMap) | | | |
| #define CFactory U_ICU_ENTRY_POINT_RENAME(CFactory) | | | |
| #define Calendar U_ICU_ENTRY_POINT_RENAME(Calendar) | | | |
| #define CalendarAstronomer U_ICU_ENTRY_POINT_RENAME(CalendarAstronomer) | | | |
| #define CalendarCache U_ICU_ENTRY_POINT_RENAME(CalendarCache) | | | |
| #define CalendarData U_ICU_ENTRY_POINT_RENAME(CalendarData) | | | |
| #define CalendarService U_ICU_ENTRY_POINT_RENAME(CalendarService) | | | |
| #define CanonIterData U_ICU_ENTRY_POINT_RENAME(CanonIterData) | | | |
| #define CanonIterDataSingleton U_ICU_ENTRY_POINT_RENAME(CanonIterDataSingle | | | |
| ton) | | | |
| #define CanonMarkFilter U_ICU_ENTRY_POINT_RENAME(CanonMarkFilter) | | | |
| #define CanonShaping U_ICU_ENTRY_POINT_RENAME(CanonShaping) | | | |
| #define CanonicalIterator U_ICU_ENTRY_POINT_RENAME(CanonicalIterator) | | | |
| #define CaseMapTransliterator U_ICU_ENTRY_POINT_RENAME(CaseMapTransliterato | | | |
| r) | | | |
| #define ChainingContextualSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_REN | | | |
| AME(ChainingContextualSubstitutionFormat1Subtable) | | | |
| #define ChainingContextualSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_REN | | | |
| AME(ChainingContextualSubstitutionFormat2Subtable) | | | |
| #define ChainingContextualSubstitutionFormat3Subtable U_ICU_ENTRY_POINT_REN | | | |
| AME(ChainingContextualSubstitutionFormat3Subtable) | | | |
| #define ChainingContextualSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(Cha | | | |
| iningContextualSubstitutionSubtable) | | | |
| #define CharString U_ICU_ENTRY_POINT_RENAME(CharString) | | | |
| #define CharSubstitutionFilter U_ICU_ENTRY_POINT_RENAME(CharSubstitutionFil | | | |
| ter) | | | |
| #define CharacterIterator U_ICU_ENTRY_POINT_RENAME(CharacterIterator) | | | |
| #define CharacterNode U_ICU_ENTRY_POINT_RENAME(CharacterNode) | | | |
| #define CharsetDetector U_ICU_ENTRY_POINT_RENAME(CharsetDetector) | | | |
| #define CharsetMatch U_ICU_ENTRY_POINT_RENAME(CharsetMatch) | | | |
| #define CharsetRecog_2022 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022) | | | |
| #define CharsetRecog_2022CN U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022CN) | | | |
| #define CharsetRecog_2022JP U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022JP) | | | |
| #define CharsetRecog_2022KR U_ICU_ENTRY_POINT_RENAME(CharsetRecog_2022KR) | | | |
| #define CharsetRecog_8859_1 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1) | | | |
| #define CharsetRecog_8859_1_da U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _da) | | | |
| #define CharsetRecog_8859_1_de U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _de) | | | |
| #define CharsetRecog_8859_1_en U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _en) | | | |
| #define CharsetRecog_8859_1_es U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _es) | | | |
| #define CharsetRecog_8859_1_fr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _fr) | | | |
| #define CharsetRecog_8859_1_it U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _it) | | | |
| #define CharsetRecog_8859_1_nl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _nl) | | | |
| #define CharsetRecog_8859_1_no U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _no) | | | |
| #define CharsetRecog_8859_1_pt U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _pt) | | | |
| #define CharsetRecog_8859_1_sv U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_1 | | | |
| _sv) | | | |
| #define CharsetRecog_8859_2 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2) | | | |
| #define CharsetRecog_8859_2_cs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2 | | | |
| _cs) | | | |
| #define CharsetRecog_8859_2_hu U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2 | | | |
| _hu) | | | |
| #define CharsetRecog_8859_2_pl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2 | | | |
| _pl) | | | |
| #define CharsetRecog_8859_2_ro U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_2 | | | |
| _ro) | | | |
| #define CharsetRecog_8859_5 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_5) | | | |
| #define CharsetRecog_8859_5_ru U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_5 | | | |
| _ru) | | | |
| #define CharsetRecog_8859_6 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_6) | | | |
| #define CharsetRecog_8859_6_ar U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_6 | | | |
| _ar) | | | |
| #define CharsetRecog_8859_7 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_7) | | | |
| #define CharsetRecog_8859_7_el U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_7 | | | |
| _el) | | | |
| #define CharsetRecog_8859_8 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_8) | | | |
| #define CharsetRecog_8859_8_I_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859 | | | |
| _8_I_he) | | | |
| #define CharsetRecog_8859_8_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_8 | | | |
| _he) | | | |
| #define CharsetRecog_8859_9 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_9) | | | |
| #define CharsetRecog_8859_9_tr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_8859_9 | | | |
| _tr) | | | |
| #define CharsetRecog_IBM420_ar U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IBM420 | | | |
| _ar) | | | |
| #define CharsetRecog_IBM420_ar_ltr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB | | | |
| M420_ar_ltr) | | | |
| #define CharsetRecog_IBM420_ar_rtl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB | | | |
| M420_ar_rtl) | | | |
| #define CharsetRecog_IBM424_he U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IBM424 | | | |
| _he) | | | |
| #define CharsetRecog_IBM424_he_ltr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB | | | |
| M424_he_ltr) | | | |
| #define CharsetRecog_IBM424_he_rtl U_ICU_ENTRY_POINT_RENAME(CharsetRecog_IB | | | |
| M424_he_rtl) | | | |
| #define CharsetRecog_KOI8_R U_ICU_ENTRY_POINT_RENAME(CharsetRecog_KOI8_R) | | | |
| #define CharsetRecog_UTF8 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF8) | | | |
| #define CharsetRecog_UTF_16_BE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_16 | | | |
| _BE) | | | |
| #define CharsetRecog_UTF_16_LE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_16 | | | |
| _LE) | | | |
| #define CharsetRecog_UTF_32 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32) | | | |
| #define CharsetRecog_UTF_32_BE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32 | | | |
| _BE) | | | |
| #define CharsetRecog_UTF_32_LE U_ICU_ENTRY_POINT_RENAME(CharsetRecog_UTF_32 | | | |
| _LE) | | | |
| #define CharsetRecog_Unicode U_ICU_ENTRY_POINT_RENAME(CharsetRecog_Unicode) | | | |
| #define CharsetRecog_big5 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_big5) | | | |
| #define CharsetRecog_euc U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc) | | | |
| #define CharsetRecog_euc_jp U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc_jp) | | | |
| #define CharsetRecog_euc_kr U_ICU_ENTRY_POINT_RENAME(CharsetRecog_euc_kr) | | | |
| #define CharsetRecog_gb_18030 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_gb_1803 | | | |
| 0) | | | |
| #define CharsetRecog_mbcs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_mbcs) | | | |
| #define CharsetRecog_sbcs U_ICU_ENTRY_POINT_RENAME(CharsetRecog_sbcs) | | | |
| #define CharsetRecog_sjis U_ICU_ENTRY_POINT_RENAME(CharsetRecog_sjis) | | | |
| #define CharsetRecog_windows_1251 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_win | | | |
| dows_1251) | | | |
| #define CharsetRecog_windows_1256 U_ICU_ENTRY_POINT_RENAME(CharsetRecog_win | | | |
| dows_1256) | | | |
| #define CharsetRecognizer U_ICU_ENTRY_POINT_RENAME(CharsetRecognizer) | | | |
| #define CheckedArrayByteSink U_ICU_ENTRY_POINT_RENAME(CheckedArrayByteSink) | | | |
| #define ChineseCalendar U_ICU_ENTRY_POINT_RENAME(ChineseCalendar) | | | |
| #define ChoiceFormat U_ICU_ENTRY_POINT_RENAME(ChoiceFormat) | | | |
| #define ClassDefFormat1Table U_ICU_ENTRY_POINT_RENAME(ClassDefFormat1Table) | | | |
| #define ClassDefFormat2Table U_ICU_ENTRY_POINT_RENAME(ClassDefFormat2Table) | | | |
| #define ClassDefinitionTable U_ICU_ENTRY_POINT_RENAME(ClassDefinitionTable) | | | |
| #define ClockMath U_ICU_ENTRY_POINT_RENAME(ClockMath) | | | |
| #define CollData U_ICU_ENTRY_POINT_RENAME(CollData) | | | |
| #define CollDataCache U_ICU_ENTRY_POINT_RENAME(CollDataCache) | | | |
| #define CollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(CollDataCacheEntry) | | | |
| #define CollationElementIterator U_ICU_ENTRY_POINT_RENAME(CollationElementI | | | |
| terator) | | | |
| #define CollationKey U_ICU_ENTRY_POINT_RENAME(CollationKey) | | | |
| #define CollationLocaleListEnumeration U_ICU_ENTRY_POINT_RENAME(CollationLo | | | |
| caleListEnumeration) | | | |
| #define Collator U_ICU_ENTRY_POINT_RENAME(Collator) | | | |
| #define CollatorFactory U_ICU_ENTRY_POINT_RENAME(CollatorFactory) | | | |
| #define CompactTrieDictionary U_ICU_ENTRY_POINT_RENAME(CompactTrieDictionar | | | |
| y) | | | |
| #define CompactTrieEnumeration U_ICU_ENTRY_POINT_RENAME(CompactTrieEnumerat | | | |
| ion) | | | |
| #define ComposeNormalizer2 U_ICU_ENTRY_POINT_RENAME(ComposeNormalizer2) | | | |
| #define CompoundTransliterator U_ICU_ENTRY_POINT_RENAME(CompoundTranslitera | | | |
| tor) | | | |
| #define ConfusabledataBuilder U_ICU_ENTRY_POINT_RENAME(ConfusabledataBuilde | | | |
| r) | | | |
| #define ContextualGlyphSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(Conte | | | |
| xtualGlyphSubstitutionProcessor) | | | |
| #define ContextualSubstitutionBase U_ICU_ENTRY_POINT_RENAME(ContextualSubst | | | |
| itutionBase) | | | |
| #define ContextualSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_RENAME(Cont | | | |
| extualSubstitutionFormat1Subtable) | | | |
| #define ContextualSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_RENAME(Cont | | | |
| extualSubstitutionFormat2Subtable) | | | |
| #define ContextualSubstitutionFormat3Subtable U_ICU_ENTRY_POINT_RENAME(Cont | | | |
| extualSubstitutionFormat3Subtable) | | | |
| #define ContextualSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(ContextualS | | | |
| ubstitutionSubtable) | | | |
| #define CopticCalendar U_ICU_ENTRY_POINT_RENAME(CopticCalendar) | | | |
| #define CoverageFormat1Table U_ICU_ENTRY_POINT_RENAME(CoverageFormat1Table) | | | |
| #define CoverageFormat2Table U_ICU_ENTRY_POINT_RENAME(CoverageFormat2Table) | | | |
| #define CoverageTable U_ICU_ENTRY_POINT_RENAME(CoverageTable) | | | |
| #define CurrencyAmount U_ICU_ENTRY_POINT_RENAME(CurrencyAmount) | | | |
| #define CurrencyFormat U_ICU_ENTRY_POINT_RENAME(CurrencyFormat) | | | |
| #define CurrencyPluralInfo U_ICU_ENTRY_POINT_RENAME(CurrencyPluralInfo) | | | |
| #define CurrencyUnit U_ICU_ENTRY_POINT_RENAME(CurrencyUnit) | | | |
| #define CursiveAttachmentSubtable U_ICU_ENTRY_POINT_RENAME(CursiveAttachmen | | | |
| tSubtable) | | | |
| #define DTRedundantEnumeration U_ICU_ENTRY_POINT_RENAME(DTRedundantEnumerat | | | |
| ion) | | | |
| #define DTSkeletonEnumeration U_ICU_ENTRY_POINT_RENAME(DTSkeletonEnumeratio | | | |
| n) | | | |
| #define DateFormat U_ICU_ENTRY_POINT_RENAME(DateFormat) | | | |
| #define DateFormatSymbols U_ICU_ENTRY_POINT_RENAME(DateFormatSymbols) | | | |
| #define DateInterval U_ICU_ENTRY_POINT_RENAME(DateInterval) | | | |
| #define DateIntervalFormat U_ICU_ENTRY_POINT_RENAME(DateIntervalFormat) | | | |
| #define DateIntervalInfo U_ICU_ENTRY_POINT_RENAME(DateIntervalInfo) | | | |
| #define DateTimeMatcher U_ICU_ENTRY_POINT_RENAME(DateTimeMatcher) | | | |
| #define DateTimePatternGenerator U_ICU_ENTRY_POINT_RENAME(DateTimePatternGe | | | |
| nerator) | | | |
| #define DateTimeRule U_ICU_ENTRY_POINT_RENAME(DateTimeRule) | | | |
| #define DecimalFormat U_ICU_ENTRY_POINT_RENAME(DecimalFormat) | | | |
| #define DecimalFormatStaticSets U_ICU_ENTRY_POINT_RENAME(DecimalFormatStati | | | |
| cSets) | | | |
| #define DecimalFormatSymbols U_ICU_ENTRY_POINT_RENAME(DecimalFormatSymbols) | | | |
| #define DecomposeNormalizer2 U_ICU_ENTRY_POINT_RENAME(DecomposeNormalizer2) | | | |
| #define DefaultCalendarFactory U_ICU_ENTRY_POINT_RENAME(DefaultCalendarFact | | | |
| ory) | | | |
| #define DefaultCharMapper U_ICU_ENTRY_POINT_RENAME(DefaultCharMapper) | | | |
| #define DeviceTable U_ICU_ENTRY_POINT_RENAME(DeviceTable) | | | |
| #define DictionaryBreakEngine U_ICU_ENTRY_POINT_RENAME(DictionaryBreakEngin | | | |
| e) | | | |
| #define DigitList U_ICU_ENTRY_POINT_RENAME(DigitList) | | | |
| #define DistanceInfo U_ICU_ENTRY_POINT_RENAME(DistanceInfo) | | | |
| #define ErrorCode U_ICU_ENTRY_POINT_RENAME(ErrorCode) | | | |
| #define EscapeTransliterator U_ICU_ENTRY_POINT_RENAME(EscapeTransliterator) | | | |
| #define EthiopicCalendar U_ICU_ENTRY_POINT_RENAME(EthiopicCalendar) | | | |
| #define EventListener U_ICU_ENTRY_POINT_RENAME(EventListener) | | | |
| #define ExtensionSubtable U_ICU_ENTRY_POINT_RENAME(ExtensionSubtable) | | | |
| #define FCDNormalizer2 U_ICU_ENTRY_POINT_RENAME(FCDNormalizer2) | | | |
| #define FCDTrieSingleton U_ICU_ENTRY_POINT_RENAME(FCDTrieSingleton) | | | |
| #define FeatureListTable U_ICU_ENTRY_POINT_RENAME(FeatureListTable) | | | |
| #define FieldPosition U_ICU_ENTRY_POINT_RENAME(FieldPosition) | | | |
| #define FieldPositionHandler U_ICU_ENTRY_POINT_RENAME(FieldPositionHandler) | | | |
| #define FieldPositionIterator U_ICU_ENTRY_POINT_RENAME(FieldPositionIterato | | | |
| r) | | | |
| #define FieldPositionIteratorHandler U_ICU_ENTRY_POINT_RENAME(FieldPosition | | | |
| IteratorHandler) | | | |
| #define FieldPositionOnlyHandler U_ICU_ENTRY_POINT_RENAME(FieldPositionOnly | | | |
| Handler) | | | |
| #define FilteredNormalizer2 U_ICU_ENTRY_POINT_RENAME(FilteredNormalizer2) | | | |
| #define FontRuns U_ICU_ENTRY_POINT_RENAME(FontRuns) | | | |
| #define Format U_ICU_ENTRY_POINT_RENAME(Format) | | | |
| #define Format1AnchorTable U_ICU_ENTRY_POINT_RENAME(Format1AnchorTable) | | | |
| #define Format2AnchorTable U_ICU_ENTRY_POINT_RENAME(Format2AnchorTable) | | | |
| #define Format3AnchorTable U_ICU_ENTRY_POINT_RENAME(Format3AnchorTable) | | | |
| #define FormatNameEnumeration U_ICU_ENTRY_POINT_RENAME(FormatNameEnumeratio | | | |
| n) | | | |
| #define FormatParser U_ICU_ENTRY_POINT_RENAME(FormatParser) | | | |
| #define Formattable U_ICU_ENTRY_POINT_RENAME(Formattable) | | | |
| #define ForwardCharacterIterator U_ICU_ENTRY_POINT_RENAME(ForwardCharacterI | | | |
| terator) | | | |
| #define ForwardUTrie2StringIterator U_ICU_ENTRY_POINT_RENAME(ForwardUTrie2S | | | |
| tringIterator) | | | |
| #define FractionalPartSubstitution U_ICU_ENTRY_POINT_RENAME(FractionalPartS | | | |
| ubstitution) | | | |
| #define FunctionReplacer U_ICU_ENTRY_POINT_RENAME(FunctionReplacer) | | | |
| #define GDEFMarkFilter U_ICU_ENTRY_POINT_RENAME(GDEFMarkFilter) | | | |
| #define GNameSearchHandler U_ICU_ENTRY_POINT_RENAME(GNameSearchHandler) | | | |
| #define GXLayoutEngine U_ICU_ENTRY_POINT_RENAME(GXLayoutEngine) | | | |
| #define GlyphDefinitionTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphDefinition | | | |
| TableHeader) | | | |
| #define GlyphIterator U_ICU_ENTRY_POINT_RENAME(GlyphIterator) | | | |
| #define GlyphLookupTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphLookupTableHea | | | |
| der) | | | |
| #define GlyphPositionAdjustments U_ICU_ENTRY_POINT_RENAME(GlyphPositionAdju | | | |
| stments) | | | |
| #define GlyphPositioningLookupProcessor U_ICU_ENTRY_POINT_RENAME(GlyphPosit | | | |
| ioningLookupProcessor) | | | |
| #define GlyphPositioningTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphPositioni | | | |
| ngTableHeader) | | | |
| #define GlyphSubstitutionLookupProcessor U_ICU_ENTRY_POINT_RENAME(GlyphSubs | | | |
| titutionLookupProcessor) | | | |
| #define GlyphSubstitutionTableHeader U_ICU_ENTRY_POINT_RENAME(GlyphSubstitu | | | |
| tionTableHeader) | | | |
| #define GoodSuffixTable U_ICU_ENTRY_POINT_RENAME(GoodSuffixTable) | | | |
| #define Grego U_ICU_ENTRY_POINT_RENAME(Grego) | | | |
| #define GregorianCalendar U_ICU_ENTRY_POINT_RENAME(GregorianCalendar) | | | |
| #define HanOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(HanOpenTypeLayoutE | | | |
| ngine) | | | |
| #define HangulOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(HangulOpenTypeL | | | |
| ayoutEngine) | | | |
| #define HebrewCalendar U_ICU_ENTRY_POINT_RENAME(HebrewCalendar) | | | |
| #define ICUBreakIteratorFactory U_ICU_ENTRY_POINT_RENAME(ICUBreakIteratorFa | | | |
| ctory) | | | |
| #define ICUBreakIteratorService U_ICU_ENTRY_POINT_RENAME(ICUBreakIteratorSe | | | |
| rvice) | | | |
| #define ICUCollatorFactory U_ICU_ENTRY_POINT_RENAME(ICUCollatorFactory) | | | |
| #define ICUCollatorService U_ICU_ENTRY_POINT_RENAME(ICUCollatorService) | | | |
| #define ICUDataTable U_ICU_ENTRY_POINT_RENAME(ICUDataTable) | | | |
| #define ICULanguageBreakFactory U_ICU_ENTRY_POINT_RENAME(ICULanguageBreakFa | | | |
| ctory) | | | |
| #define ICULocaleService U_ICU_ENTRY_POINT_RENAME(ICULocaleService) | | | |
| #define ICUNotifier U_ICU_ENTRY_POINT_RENAME(ICUNotifier) | | | |
| #define ICUNumberFormatFactory U_ICU_ENTRY_POINT_RENAME(ICUNumberFormatFact | | | |
| ory) | | | |
| #define ICUNumberFormatService U_ICU_ENTRY_POINT_RENAME(ICUNumberFormatServ | | | |
| ice) | | | |
| #define ICUResourceBundleFactory U_ICU_ENTRY_POINT_RENAME(ICUResourceBundle | | | |
| Factory) | | | |
| #define ICUService U_ICU_ENTRY_POINT_RENAME(ICUService) | | | |
| #define ICUServiceFactory U_ICU_ENTRY_POINT_RENAME(ICUServiceFactory) | | | |
| #define ICUServiceKey U_ICU_ENTRY_POINT_RENAME(ICUServiceKey) | | | |
| #define ICU_Utility U_ICU_ENTRY_POINT_RENAME(ICU_Utility) | | | |
| #define IDNA U_ICU_ENTRY_POINT_RENAME(IDNA) | | | |
| #define IndianCalendar U_ICU_ENTRY_POINT_RENAME(IndianCalendar) | | | |
| #define IndicClassTable U_ICU_ENTRY_POINT_RENAME(IndicClassTable) | | | |
| #define IndicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(IndicOpenTypeLay | | | |
| outEngine) | | | |
| #define IndicRearrangementProcessor U_ICU_ENTRY_POINT_RENAME(IndicRearrange | | | |
| mentProcessor) | | | |
| #define IndicReordering U_ICU_ENTRY_POINT_RENAME(IndicReordering) | | | |
| #define InitialTimeZoneRule U_ICU_ENTRY_POINT_RENAME(InitialTimeZoneRule) | | | |
| #define InputText U_ICU_ENTRY_POINT_RENAME(InputText) | | | |
| #define IntegralPartSubstitution U_ICU_ENTRY_POINT_RENAME(IntegralPartSubst | | | |
| itution) | | | |
| #define IslamicCalendar U_ICU_ENTRY_POINT_RENAME(IslamicCalendar) | | | |
| #define IteratedChar U_ICU_ENTRY_POINT_RENAME(IteratedChar) | | | |
| #define JapaneseCalendar U_ICU_ENTRY_POINT_RENAME(JapaneseCalendar) | | | |
| #define KernTable U_ICU_ENTRY_POINT_RENAME(KernTable) | | | |
| #define KeywordEnumeration U_ICU_ENTRY_POINT_RENAME(KeywordEnumeration) | | | |
| #define KhmerBreakEngine U_ICU_ENTRY_POINT_RENAME(KhmerBreakEngine) | | | |
| #define KhmerClassTable U_ICU_ENTRY_POINT_RENAME(KhmerClassTable) | | | |
| #define KhmerOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(KhmerOpenTypeLay | | | |
| outEngine) | | | |
| #define KhmerReordering U_ICU_ENTRY_POINT_RENAME(KhmerReordering) | | | |
| #define LECharMapper U_ICU_ENTRY_POINT_RENAME(LECharMapper) | | | |
| #define LEFontInstance U_ICU_ENTRY_POINT_RENAME(LEFontInstance) | | | |
| #define LEGlyphFilter U_ICU_ENTRY_POINT_RENAME(LEGlyphFilter) | | | |
| #define LEGlyphStorage U_ICU_ENTRY_POINT_RENAME(LEGlyphStorage) | | | |
| #define LEInsertionCallback U_ICU_ENTRY_POINT_RENAME(LEInsertionCallback) | | | |
| #define LEInsertionList U_ICU_ENTRY_POINT_RENAME(LEInsertionList) | | | |
| #define LXUtilities U_ICU_ENTRY_POINT_RENAME(LXUtilities) | | | |
| #define LanguageBreakEngine U_ICU_ENTRY_POINT_RENAME(LanguageBreakEngine) | | | |
| #define LanguageBreakFactory U_ICU_ENTRY_POINT_RENAME(LanguageBreakFactory) | | | |
| #define LayoutEngine U_ICU_ENTRY_POINT_RENAME(LayoutEngine) | | | |
| #define LigatureSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(LigatureSubs | | | |
| titutionProcessor) | | | |
| #define LigatureSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(LigatureSubst | | | |
| itutionSubtable) | | | |
| #define LocDataParser U_ICU_ENTRY_POINT_RENAME(LocDataParser) | | | |
| #define Locale U_ICU_ENTRY_POINT_RENAME(Locale) | | | |
| #define LocaleBased U_ICU_ENTRY_POINT_RENAME(LocaleBased) | | | |
| #define LocaleDisplayNames U_ICU_ENTRY_POINT_RENAME(LocaleDisplayNames) | | | |
| #define LocaleDisplayNamesImpl U_ICU_ENTRY_POINT_RENAME(LocaleDisplayNamesI | | | |
| mpl) | | | |
| #define LocaleKey U_ICU_ENTRY_POINT_RENAME(LocaleKey) | | | |
| #define LocaleKeyFactory U_ICU_ENTRY_POINT_RENAME(LocaleKeyFactory) | | | |
| #define LocaleRuns U_ICU_ENTRY_POINT_RENAME(LocaleRuns) | | | |
| #define LocaleUtility U_ICU_ENTRY_POINT_RENAME(LocaleUtility) | | | |
| #define LocalizationInfo U_ICU_ENTRY_POINT_RENAME(LocalizationInfo) | | | |
| #define LookupListTable U_ICU_ENTRY_POINT_RENAME(LookupListTable) | | | |
| #define LookupProcessor U_ICU_ENTRY_POINT_RENAME(LookupProcessor) | | | |
| #define LookupSubtable U_ICU_ENTRY_POINT_RENAME(LookupSubtable) | | | |
| #define LookupTable U_ICU_ENTRY_POINT_RENAME(LookupTable) | | | |
| #define LowercaseTransliterator U_ICU_ENTRY_POINT_RENAME(LowercaseTranslite | | | |
| rator) | | | |
| #define MPreFixups U_ICU_ENTRY_POINT_RENAME(MPreFixups) | | | |
| #define MarkArray U_ICU_ENTRY_POINT_RENAME(MarkArray) | | | |
| #define MarkToBasePositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToBasePo | | | |
| sitioningSubtable) | | | |
| #define MarkToLigaturePositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToLi | | | |
| gaturePositioningSubtable) | | | |
| #define MarkToMarkPositioningSubtable U_ICU_ENTRY_POINT_RENAME(MarkToMarkPo | | | |
| sitioningSubtable) | | | |
| #define Measure U_ICU_ENTRY_POINT_RENAME(Measure) | | | |
| #define MeasureFormat U_ICU_ENTRY_POINT_RENAME(MeasureFormat) | | | |
| #define MeasureUnit U_ICU_ENTRY_POINT_RENAME(MeasureUnit) | | | |
| #define MessageFormat U_ICU_ENTRY_POINT_RENAME(MessageFormat) | | | |
| #define MessageFormatAdapter U_ICU_ENTRY_POINT_RENAME(MessageFormatAdapter) | | | |
| #define MessageImpl U_ICU_ENTRY_POINT_RENAME(MessageImpl) | | | |
| #define MessagePattern U_ICU_ENTRY_POINT_RENAME(MessagePattern) | | | |
| #define MetaZoneIDsEnumeration U_ICU_ENTRY_POINT_RENAME(MetaZoneIDsEnumerat | | | |
| ion) | | | |
| #define ModulusSubstitution U_ICU_ENTRY_POINT_RENAME(ModulusSubstitution) | | | |
| #define MoonRiseSetCoordFunc U_ICU_ENTRY_POINT_RENAME(MoonRiseSetCoordFunc) | | | |
| #define MoonTimeAngleFunc U_ICU_ENTRY_POINT_RENAME(MoonTimeAngleFunc) | | | |
| #define MorphSubtableHeader U_ICU_ENTRY_POINT_RENAME(MorphSubtableHeader) | | | |
| #define MorphTableHeader U_ICU_ENTRY_POINT_RENAME(MorphTableHeader) | | | |
| #define MultipleSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(MultipleSubst | | | |
| itutionSubtable) | | | |
| #define MultiplierSubstitution U_ICU_ENTRY_POINT_RENAME(MultiplierSubstitut | | | |
| ion) | | | |
| #define MutableTrieDictionary U_ICU_ENTRY_POINT_RENAME(MutableTrieDictionar | | | |
| y) | | | |
| #define MutableTrieEnumeration U_ICU_ENTRY_POINT_RENAME(MutableTrieEnumerat | | | |
| ion) | | | |
| #define NFDBuffer U_ICU_ENTRY_POINT_RENAME(NFDBuffer) | | | |
| #define NFFactory U_ICU_ENTRY_POINT_RENAME(NFFactory) | | | |
| #define NFRule U_ICU_ENTRY_POINT_RENAME(NFRule) | | | |
| #define NFRuleSet U_ICU_ENTRY_POINT_RENAME(NFRuleSet) | | | |
| #define NFSubstitution U_ICU_ENTRY_POINT_RENAME(NFSubstitution) | | | |
| #define NGramParser U_ICU_ENTRY_POINT_RENAME(NGramParser) | | | |
| #define NameUnicodeTransliterator U_ICU_ENTRY_POINT_RENAME(NameUnicodeTrans | | | |
| literator) | | | |
| #define NonContextualGlyphSubstitutionProcessor U_ICU_ENTRY_POINT_RENAME(No | | | |
| nContextualGlyphSubstitutionProcessor) | | | |
| #define NoopNormalizer2 U_ICU_ENTRY_POINT_RENAME(NoopNormalizer2) | | | |
| #define Norm2AllModes U_ICU_ENTRY_POINT_RENAME(Norm2AllModes) | | | |
| #define NormalizationTransliterator U_ICU_ENTRY_POINT_RENAME(NormalizationT | | | |
| ransliterator) | | | |
| #define Normalizer U_ICU_ENTRY_POINT_RENAME(Normalizer) | | | |
| #define Normalizer2 U_ICU_ENTRY_POINT_RENAME(Normalizer2) | | | |
| #define Normalizer2Factory U_ICU_ENTRY_POINT_RENAME(Normalizer2Factory) | | | |
| #define Normalizer2Impl U_ICU_ENTRY_POINT_RENAME(Normalizer2Impl) | | | |
| #define Normalizer2WithImpl U_ICU_ENTRY_POINT_RENAME(Normalizer2WithImpl) | | | |
| #define NullSubstitution U_ICU_ENTRY_POINT_RENAME(NullSubstitution) | | | |
| #define NullTransliterator U_ICU_ENTRY_POINT_RENAME(NullTransliterator) | | | |
| #define NumberFormat U_ICU_ENTRY_POINT_RENAME(NumberFormat) | | | |
| #define NumberFormatFactory U_ICU_ENTRY_POINT_RENAME(NumberFormatFactory) | | | |
| #define NumberingSystem U_ICU_ENTRY_POINT_RENAME(NumberingSystem) | | | |
| #define NumeratorSubstitution U_ICU_ENTRY_POINT_RENAME(NumeratorSubstitutio | | | |
| n) | | | |
| #define OlsonTimeZone U_ICU_ENTRY_POINT_RENAME(OlsonTimeZone) | | | |
| #define OpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(OpenTypeLayoutEngine) | | | |
| #define OpenTypeUtilities U_ICU_ENTRY_POINT_RENAME(OpenTypeUtilities) | | | |
| #define OrConstraint U_ICU_ENTRY_POINT_RENAME(OrConstraint) | | | |
| #define PCEBuffer U_ICU_ENTRY_POINT_RENAME(PCEBuffer) | | | |
| #define PairPositioningFormat1Subtable U_ICU_ENTRY_POINT_RENAME(PairPositio | | | |
| ningFormat1Subtable) | | | |
| #define PairPositioningFormat2Subtable U_ICU_ENTRY_POINT_RENAME(PairPositio | | | |
| ningFormat2Subtable) | | | |
| #define PairPositioningSubtable U_ICU_ENTRY_POINT_RENAME(PairPositioningSub | | | |
| table) | | | |
| #define ParagraphLayout U_ICU_ENTRY_POINT_RENAME(ParagraphLayout) | | | |
| #define ParseData U_ICU_ENTRY_POINT_RENAME(ParseData) | | | |
| #define ParsePosition U_ICU_ENTRY_POINT_RENAME(ParsePosition) | | | |
| #define PatternMap U_ICU_ENTRY_POINT_RENAME(PatternMap) | | | |
| #define PatternMapIterator U_ICU_ENTRY_POINT_RENAME(PatternMapIterator) | | | |
| #define PatternProps U_ICU_ENTRY_POINT_RENAME(PatternProps) | | | |
| #define PersianCalendar U_ICU_ENTRY_POINT_RENAME(PersianCalendar) | | | |
| #define PluralFormat U_ICU_ENTRY_POINT_RENAME(PluralFormat) | | | |
| #define PluralKeywordEnumeration U_ICU_ENTRY_POINT_RENAME(PluralKeywordEnum | | | |
| eration) | | | |
| #define PluralRules U_ICU_ENTRY_POINT_RENAME(PluralRules) | | | |
| #define PropNameData U_ICU_ENTRY_POINT_RENAME(PropNameData) | | | |
| #define PtnElem U_ICU_ENTRY_POINT_RENAME(PtnElem) | | | |
| #define PtnSkeleton U_ICU_ENTRY_POINT_RENAME(PtnSkeleton) | | | |
| #define Quantifier U_ICU_ENTRY_POINT_RENAME(Quantifier) | | | |
| #define RBBIDataWrapper U_ICU_ENTRY_POINT_RENAME(RBBIDataWrapper) | | | |
| #define RBBINode U_ICU_ENTRY_POINT_RENAME(RBBINode) | | | |
| #define RBBIRuleBuilder U_ICU_ENTRY_POINT_RENAME(RBBIRuleBuilder) | | | |
| #define RBBIRuleScanner U_ICU_ENTRY_POINT_RENAME(RBBIRuleScanner) | | | |
| #define RBBISetBuilder U_ICU_ENTRY_POINT_RENAME(RBBISetBuilder) | | | |
| #define RBBIStateDescriptor U_ICU_ENTRY_POINT_RENAME(RBBIStateDescriptor) | | | |
| #define RBBISymbolTable U_ICU_ENTRY_POINT_RENAME(RBBISymbolTable) | | | |
| #define RBBISymbolTableEntry U_ICU_ENTRY_POINT_RENAME(RBBISymbolTableEntry) | | | |
| #define RBBITableBuilder U_ICU_ENTRY_POINT_RENAME(RBBITableBuilder) | | | |
| #define RCEBuffer U_ICU_ENTRY_POINT_RENAME(RCEBuffer) | | | |
| #define RangeDescriptor U_ICU_ENTRY_POINT_RENAME(RangeDescriptor) | | | |
| #define RegexCompile U_ICU_ENTRY_POINT_RENAME(RegexCompile) | | | |
| #define RegexMatcher U_ICU_ENTRY_POINT_RENAME(RegexMatcher) | | | |
| #define RegexPattern U_ICU_ENTRY_POINT_RENAME(RegexPattern) | | | |
| #define RegexStaticSets U_ICU_ENTRY_POINT_RENAME(RegexStaticSets) | | | |
| #define RegularExpression U_ICU_ENTRY_POINT_RENAME(RegularExpression) | | | |
| #define RelativeDateFormat U_ICU_ENTRY_POINT_RENAME(RelativeDateFormat) | | | |
| #define RemoveTransliterator U_ICU_ENTRY_POINT_RENAME(RemoveTransliterator) | | | |
| #define ReorderingBuffer U_ICU_ENTRY_POINT_RENAME(ReorderingBuffer) | | | |
| #define Replaceable U_ICU_ENTRY_POINT_RENAME(Replaceable) | | | |
| #define ReplaceableGlue U_ICU_ENTRY_POINT_RENAME(ReplaceableGlue) | | | |
| #define ResourceBundle U_ICU_ENTRY_POINT_RENAME(ResourceBundle) | | | |
| #define RiseSetCoordFunc U_ICU_ENTRY_POINT_RENAME(RiseSetCoordFunc) | | | |
| #define RuleBasedBreakIterator U_ICU_ENTRY_POINT_RENAME(RuleBasedBreakItera | | | |
| tor) | | | |
| #define RuleBasedCollator U_ICU_ENTRY_POINT_RENAME(RuleBasedCollator) | | | |
| #define RuleBasedNumberFormat U_ICU_ENTRY_POINT_RENAME(RuleBasedNumberForma | | | |
| t) | | | |
| #define RuleBasedTimeZone U_ICU_ENTRY_POINT_RENAME(RuleBasedTimeZone) | | | |
| #define RuleBasedTransliterator U_ICU_ENTRY_POINT_RENAME(RuleBasedTranslite | | | |
| rator) | | | |
| #define RuleChain U_ICU_ENTRY_POINT_RENAME(RuleChain) | | | |
| #define RuleCharacterIterator U_ICU_ENTRY_POINT_RENAME(RuleCharacterIterato | | | |
| r) | | | |
| #define RuleHalf U_ICU_ENTRY_POINT_RENAME(RuleHalf) | | | |
| #define RuleParser U_ICU_ENTRY_POINT_RENAME(RuleParser) | | | |
| #define RunArray U_ICU_ENTRY_POINT_RENAME(RunArray) | | | |
| #define SPUString U_ICU_ENTRY_POINT_RENAME(SPUString) | | | |
| #define SPUStringPool U_ICU_ENTRY_POINT_RENAME(SPUStringPool) | | | |
| #define SameValueSubstitution U_ICU_ENTRY_POINT_RENAME(SameValueSubstitutio | | | |
| n) | | | |
| #define ScriptListTable U_ICU_ENTRY_POINT_RENAME(ScriptListTable) | | | |
| #define ScriptRunIterator U_ICU_ENTRY_POINT_RENAME(ScriptRunIterator) | | | |
| #define ScriptSet U_ICU_ENTRY_POINT_RENAME(ScriptSet) | | | |
| #define ScriptTable U_ICU_ENTRY_POINT_RENAME(ScriptTable) | | | |
| #define SearchIterator U_ICU_ENTRY_POINT_RENAME(SearchIterator) | | | |
| #define SegmentArrayProcessor U_ICU_ENTRY_POINT_RENAME(SegmentArrayProcesso | | | |
| r) | | | |
| #define SegmentSingleProcessor U_ICU_ENTRY_POINT_RENAME(SegmentSingleProces | | | |
| sor) | | | |
| #define SelectFormat U_ICU_ENTRY_POINT_RENAME(SelectFormat) | | | |
| #define ServiceEnumeration U_ICU_ENTRY_POINT_RENAME(ServiceEnumeration) | | | |
| #define ServiceListener U_ICU_ENTRY_POINT_RENAME(ServiceListener) | | | |
| #define SimpleArrayProcessor U_ICU_ENTRY_POINT_RENAME(SimpleArrayProcessor) | | | |
| #define SimpleDateFormat U_ICU_ENTRY_POINT_RENAME(SimpleDateFormat) | | | |
| #define SimpleDateFormatStaticSets U_ICU_ENTRY_POINT_RENAME(SimpleDateForma | | | |
| tStaticSets) | | | |
| #define SimpleFactory U_ICU_ENTRY_POINT_RENAME(SimpleFactory) | | | |
| #define SimpleLocaleKeyFactory U_ICU_ENTRY_POINT_RENAME(SimpleLocaleKeyFact | | | |
| ory) | | | |
| #define SimpleNumberFormatFactory U_ICU_ENTRY_POINT_RENAME(SimpleNumberForm | | | |
| atFactory) | | | |
| #define SimpleSingleton U_ICU_ENTRY_POINT_RENAME(SimpleSingleton) | | | |
| #define SimpleTimeZone U_ICU_ENTRY_POINT_RENAME(SimpleTimeZone) | | | |
| #define SinglePositioningFormat1Subtable U_ICU_ENTRY_POINT_RENAME(SinglePos | | | |
| itioningFormat1Subtable) | | | |
| #define SinglePositioningFormat2Subtable U_ICU_ENTRY_POINT_RENAME(SinglePos | | | |
| itioningFormat2Subtable) | | | |
| #define SinglePositioningSubtable U_ICU_ENTRY_POINT_RENAME(SinglePositionin | | | |
| gSubtable) | | | |
| #define SingleSubstitutionFormat1Subtable U_ICU_ENTRY_POINT_RENAME(SingleSu | | | |
| bstitutionFormat1Subtable) | | | |
| #define SingleSubstitutionFormat2Subtable U_ICU_ENTRY_POINT_RENAME(SingleSu | | | |
| bstitutionFormat2Subtable) | | | |
| #define SingleSubstitutionSubtable U_ICU_ENTRY_POINT_RENAME(SingleSubstitut | | | |
| ionSubtable) | | | |
| #define SingleTableProcessor U_ICU_ENTRY_POINT_RENAME(SingleTableProcessor) | | | |
| #define SortKeyByteSink U_ICU_ENTRY_POINT_RENAME(SortKeyByteSink) | | | |
| #define SpoofData U_ICU_ENTRY_POINT_RENAME(SpoofData) | | | |
| #define SpoofImpl U_ICU_ENTRY_POINT_RENAME(SpoofImpl) | | | |
| #define StateTableProcessor U_ICU_ENTRY_POINT_RENAME(StateTableProcessor) | | | |
| #define StringCharacterIterator U_ICU_ENTRY_POINT_RENAME(StringCharacterIte | | | |
| rator) | | | |
| #define StringEnumeration U_ICU_ENTRY_POINT_RENAME(StringEnumeration) | | | |
| #define StringList U_ICU_ENTRY_POINT_RENAME(StringList) | | | |
| #define StringLocalizationInfo U_ICU_ENTRY_POINT_RENAME(StringLocalizationI | | | |
| nfo) | | | |
| #define StringMatcher U_ICU_ENTRY_POINT_RENAME(StringMatcher) | | | |
| #define StringPair U_ICU_ENTRY_POINT_RENAME(StringPair) | | | |
| #define StringPiece U_ICU_ENTRY_POINT_RENAME(StringPiece) | | | |
| #define StringReplacer U_ICU_ENTRY_POINT_RENAME(StringReplacer) | | | |
| #define StringSearch U_ICU_ENTRY_POINT_RENAME(StringSearch) | | | |
| #define StringToCEsMap U_ICU_ENTRY_POINT_RENAME(StringToCEsMap) | | | |
| #define StringTrieBuilder U_ICU_ENTRY_POINT_RENAME(StringTrieBuilder) | | | |
| #define StyleRuns U_ICU_ENTRY_POINT_RENAME(StyleRuns) | | | |
| #define SubstitutionLookup U_ICU_ENTRY_POINT_RENAME(SubstitutionLookup) | | | |
| #define SubtableProcessor U_ICU_ENTRY_POINT_RENAME(SubtableProcessor) | | | |
| #define SunTimeAngleFunc U_ICU_ENTRY_POINT_RENAME(SunTimeAngleFunc) | | | |
| #define SymbolTable U_ICU_ENTRY_POINT_RENAME(SymbolTable) | | | |
| #define TZEnumeration U_ICU_ENTRY_POINT_RENAME(TZEnumeration) | | | |
| #define TZNames U_ICU_ENTRY_POINT_RENAME(TZNames) | | | |
| #define TaiwanCalendar U_ICU_ENTRY_POINT_RENAME(TaiwanCalendar) | | | |
| #define Target U_ICU_ENTRY_POINT_RENAME(Target) | | | |
| #define TernaryNode U_ICU_ENTRY_POINT_RENAME(TernaryNode) | | | |
| #define TextTrieMap U_ICU_ENTRY_POINT_RENAME(TextTrieMap) | | | |
| #define TextTrieMapSearchResultHandler U_ICU_ENTRY_POINT_RENAME(TextTrieMap | | | |
| SearchResultHandler) | | | |
| #define ThaiBreakEngine U_ICU_ENTRY_POINT_RENAME(ThaiBreakEngine) | | | |
| #define ThaiLayoutEngine U_ICU_ENTRY_POINT_RENAME(ThaiLayoutEngine) | | | |
| #define ThaiShaping U_ICU_ENTRY_POINT_RENAME(ThaiShaping) | | | |
| #define TibetanClassTable U_ICU_ENTRY_POINT_RENAME(TibetanClassTable) | | | |
| #define TibetanOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(TibetanOpenTyp | | | |
| eLayoutEngine) | | | |
| #define TibetanReordering U_ICU_ENTRY_POINT_RENAME(TibetanReordering) | | | |
| #define TimeArrayTimeZoneRule U_ICU_ENTRY_POINT_RENAME(TimeArrayTimeZoneRul | | | |
| e) | | | |
| #define TimeUnit U_ICU_ENTRY_POINT_RENAME(TimeUnit) | | | |
| #define TimeUnitAmount U_ICU_ENTRY_POINT_RENAME(TimeUnitAmount) | | | |
| #define TimeUnitFormat U_ICU_ENTRY_POINT_RENAME(TimeUnitFormat) | | | |
| #define TimeZone U_ICU_ENTRY_POINT_RENAME(TimeZone) | | | |
| #define TimeZoneFormat U_ICU_ENTRY_POINT_RENAME(TimeZoneFormat) | | | |
| #define TimeZoneFormatDelegate U_ICU_ENTRY_POINT_RENAME(TimeZoneFormatDeleg | | | |
| ate) | | | |
| #define TimeZoneFormatImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneFormatImpl) | | | |
| #define TimeZoneGenericNameMatchInfo U_ICU_ENTRY_POINT_RENAME(TimeZoneGener | | | |
| icNameMatchInfo) | | | |
| #define TimeZoneGenericNames U_ICU_ENTRY_POINT_RENAME(TimeZoneGenericNames) | | | |
| #define TimeZoneNameMatchInfo U_ICU_ENTRY_POINT_RENAME(TimeZoneNameMatchInf | | | |
| o) | | | |
| #define TimeZoneNameMatchInfoImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneNameMatc | | | |
| hInfoImpl) | | | |
| #define TimeZoneNames U_ICU_ENTRY_POINT_RENAME(TimeZoneNames) | | | |
| #define TimeZoneNamesDelegate U_ICU_ENTRY_POINT_RENAME(TimeZoneNamesDelegat | | | |
| e) | | | |
| #define TimeZoneNamesImpl U_ICU_ENTRY_POINT_RENAME(TimeZoneNamesImpl) | | | |
| #define TimeZoneRule U_ICU_ENTRY_POINT_RENAME(TimeZoneRule) | | | |
| #define TimeZoneTransition U_ICU_ENTRY_POINT_RENAME(TimeZoneTransition) | | | |
| #define TitlecaseTransliterator U_ICU_ENTRY_POINT_RENAME(TitlecaseTranslite | | | |
| rator) | | | |
| #define TransliterationRule U_ICU_ENTRY_POINT_RENAME(TransliterationRule) | | | |
| #define TransliterationRuleData U_ICU_ENTRY_POINT_RENAME(TransliterationRul | | | |
| eData) | | | |
| #define TransliterationRuleSet U_ICU_ENTRY_POINT_RENAME(TransliterationRule | | | |
| Set) | | | |
| #define Transliterator U_ICU_ENTRY_POINT_RENAME(Transliterator) | | | |
| #define TransliteratorAlias U_ICU_ENTRY_POINT_RENAME(TransliteratorAlias) | | | |
| #define TransliteratorEntry U_ICU_ENTRY_POINT_RENAME(TransliteratorEntry) | | | |
| #define TransliteratorIDParser U_ICU_ENTRY_POINT_RENAME(TransliteratorIDPar | | | |
| ser) | | | |
| #define TransliteratorParser U_ICU_ENTRY_POINT_RENAME(TransliteratorParser) | | | |
| #define TransliteratorRegistry U_ICU_ENTRY_POINT_RENAME(TransliteratorRegis | | | |
| try) | | | |
| #define TransliteratorSpec U_ICU_ENTRY_POINT_RENAME(TransliteratorSpec) | | | |
| #define TriStateSingleton U_ICU_ENTRY_POINT_RENAME(TriStateSingleton) | | | |
| #define TrieWordDictionary U_ICU_ENTRY_POINT_RENAME(TrieWordDictionary) | | | |
| #define TrimmedArrayProcessor U_ICU_ENTRY_POINT_RENAME(TrimmedArrayProcesso | | | |
| r) | | | |
| #define UCharCharacterIterator U_ICU_ENTRY_POINT_RENAME(UCharCharacterItera | | | |
| tor) | | | |
| #define UCharsTrie U_ICU_ENTRY_POINT_RENAME(UCharsTrie) | | | |
| #define UCharsTrieBuilder U_ICU_ENTRY_POINT_RENAME(UCharsTrieBuilder) | | | |
| #define UCharsTrieElement U_ICU_ENTRY_POINT_RENAME(UCharsTrieElement) | | | |
| #define UCollationPCE U_ICU_ENTRY_POINT_RENAME(UCollationPCE) | | | |
| #define UDataPathIterator U_ICU_ENTRY_POINT_RENAME(UDataPathIterator) | | | |
| #define ULocRuns U_ICU_ENTRY_POINT_RENAME(ULocRuns) | | | |
| #define UMemory U_ICU_ENTRY_POINT_RENAME(UMemory) | | | |
| #define UObject U_ICU_ENTRY_POINT_RENAME(UObject) | | | |
| #define UStack U_ICU_ENTRY_POINT_RENAME(UStack) | | | |
| #define UStringEnumeration U_ICU_ENTRY_POINT_RENAME(UStringEnumeration) | | | |
| #define UTS46 U_ICU_ENTRY_POINT_RENAME(UTS46) | | | |
| #define UTrie2Singleton U_ICU_ENTRY_POINT_RENAME(UTrie2Singleton) | | | |
| #define UVector U_ICU_ENTRY_POINT_RENAME(UVector) | | | |
| #define UVector32 U_ICU_ENTRY_POINT_RENAME(UVector32) | | | |
| #define UVector64 U_ICU_ENTRY_POINT_RENAME(UVector64) | | | |
| #define UnescapeTransliterator U_ICU_ENTRY_POINT_RENAME(UnescapeTranslitera | | | |
| tor) | | | |
| #define UnhandledEngine U_ICU_ENTRY_POINT_RENAME(UnhandledEngine) | | | |
| #define UnicodeArabicOpenTypeLayoutEngine U_ICU_ENTRY_POINT_RENAME(UnicodeA | | | |
| rabicOpenTypeLayoutEngine) | | | |
| #define UnicodeFilter U_ICU_ENTRY_POINT_RENAME(UnicodeFilter) | | | |
| #define UnicodeFunctor U_ICU_ENTRY_POINT_RENAME(UnicodeFunctor) | | | |
| #define UnicodeMatcher U_ICU_ENTRY_POINT_RENAME(UnicodeMatcher) | | | |
| #define UnicodeNameTransliterator U_ICU_ENTRY_POINT_RENAME(UnicodeNameTrans | | | |
| literator) | | | |
| #define UnicodeReplacer U_ICU_ENTRY_POINT_RENAME(UnicodeReplacer) | | | |
| #define UnicodeSet U_ICU_ENTRY_POINT_RENAME(UnicodeSet) | | | |
| #define UnicodeSetIterator U_ICU_ENTRY_POINT_RENAME(UnicodeSetIterator) | | | |
| #define UnicodeSetStringSpan U_ICU_ENTRY_POINT_RENAME(UnicodeSetStringSpan) | | | |
| #define UnicodeString U_ICU_ENTRY_POINT_RENAME(UnicodeString) | | | |
| #define UnicodeStringAppendable U_ICU_ENTRY_POINT_RENAME(UnicodeStringAppen | | | |
| dable) | | | |
| #define UppercaseTransliterator U_ICU_ENTRY_POINT_RENAME(UppercaseTranslite | | | |
| rator) | | | |
| #define VTZReader U_ICU_ENTRY_POINT_RENAME(VTZReader) | | | |
| #define VTZWriter U_ICU_ENTRY_POINT_RENAME(VTZWriter) | | | |
| #define VTimeZone U_ICU_ENTRY_POINT_RENAME(VTimeZone) | | | |
| #define ValueRecord U_ICU_ENTRY_POINT_RENAME(ValueRecord) | | | |
| #define ValueRuns U_ICU_ENTRY_POINT_RENAME(ValueRuns) | | | |
| #define ZNStringPool U_ICU_ENTRY_POINT_RENAME(ZNStringPool) | | | |
| #define ZNStringPoolChunk U_ICU_ENTRY_POINT_RENAME(ZNStringPoolChunk) | | | |
| #define ZNameSearchHandler U_ICU_ENTRY_POINT_RENAME(ZNameSearchHandler) | | | |
| #define ZNames U_ICU_ENTRY_POINT_RENAME(ZNames) | | | |
| #define ZoneMeta U_ICU_ENTRY_POINT_RENAME(ZoneMeta) | | | |
| #define collIterate U_ICU_ENTRY_POINT_RENAME(collIterate) | | | |
| #define locale_set_default_internal U_ICU_ENTRY_POINT_RENAME(locale_set_def | | | |
| ault_internal) | | | |
| #define util64_fromDouble U_ICU_ENTRY_POINT_RENAME(util64_fromDouble) | | | |
| #define util64_pow U_ICU_ENTRY_POINT_RENAME(util64_pow) | | | |
| #define util64_tou U_ICU_ENTRY_POINT_RENAME(util64_tou) | | | |
| | | | |
| #endif | | | |
| #endif | | | |
| | | | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 37 change blocks. |
| 695 lines changed or deleted | | 56 lines changed or added | |
|
| utext.h | | utext.h | |
| /* | | /* | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * | | * | |
|
| * Copyright (C) 2004-2010, International Business Machines | | * Copyright (C) 2004-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| * | | * | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| * file name: utext.h | | * file name: utext.h | |
| * encoding: US-ASCII | | * encoding: US-ASCII | |
| * tab size: 8 (not used) | | * tab size: 8 (not used) | |
| * indentation:4 | | * indentation:4 | |
| * | | * | |
| * created on: 2004oct06 | | * created on: 2004oct06 | |
| * created by: Markus W. Scherer | | * created by: Markus W. Scherer | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 253 | |
| * @param ut Pointer to a UText struct. If NULL, a new UText will be
created. | | * @param ut Pointer to a UText struct. If NULL, a new UText will be
created. | |
| * If non-NULL, must refer to an initialized UText struct,
which will then | | * If non-NULL, must refer to an initialized UText struct,
which will then | |
| * be reset to reference the specified input string. | | * be reset to reference the specified input string. | |
| * @param s A UnicodeString. | | * @param s A UnicodeString. | |
| * @param status Errors are returned here. | | * @param status Errors are returned here. | |
| * @return Pointer to the UText. If a UText was supplied as input,
this | | * @return Pointer to the UText. If a UText was supplied as input,
this | |
| * will always be used and returned. | | * will always be used and returned. | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
|
| utext_openUnicodeString(UText *ut, U_NAMESPACE_QUALIFIER UnicodeString *s,
UErrorCode *status); | | utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *statu
s); | |
| | | | |
| /** | | /** | |
| * Open a UText for a const UnicodeString. The resulting UText will not b
e writable. | | * Open a UText for a const UnicodeString. The resulting UText will not b
e writable. | |
| * | | * | |
| * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | | * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | |
| * If non-NULL, must refer to an initialized UText struct, wh
ich will then | | * If non-NULL, must refer to an initialized UText struct, wh
ich will then | |
| * be reset to reference the specified input string. | | * be reset to reference the specified input string. | |
| * @param s A const UnicodeString to be wrapped. | | * @param s A const UnicodeString to be wrapped. | |
| * @param status Errors are returned here. | | * @param status Errors are returned here. | |
| * @return Pointer to the UText. If a UText was supplied as input, t
his | | * @return Pointer to the UText. If a UText was supplied as input, t
his | |
| * will always be used and returned. | | * will always be used and returned. | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
|
| utext_openConstUnicodeString(UText *ut, const U_NAMESPACE_QUALIFIER Unicode
String *s, UErrorCode *status); | | utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UError
Code *status); | |
| | | | |
| /** | | /** | |
| * Open a writable UText implementation for an ICU Replaceable object. | | * Open a writable UText implementation for an ICU Replaceable object. | |
| * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | | * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | |
| * If non-NULL, must refer to an already existing UText, whic
h will then | | * If non-NULL, must refer to an already existing UText, whic
h will then | |
| * be reset to reference the specified replaceable text. | | * be reset to reference the specified replaceable text. | |
| * @param rep A Replaceable text object. | | * @param rep A Replaceable text object. | |
| * @param status Errors are returned here. | | * @param status Errors are returned here. | |
| * @return Pointer to the UText. If a UText was supplied as input, t
his | | * @return Pointer to the UText. If a UText was supplied as input, t
his | |
| * will always be used and returned. | | * will always be used and returned. | |
| * @see Replaceable | | * @see Replaceable | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
|
| utext_openReplaceable(UText *ut, U_NAMESPACE_QUALIFIER Replaceable *rep, UE
rrorCode *status); | | utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status)
; | |
| | | | |
| /** | | /** | |
| * Open a UText implementation over an ICU CharacterIterator. | | * Open a UText implementation over an ICU CharacterIterator. | |
| * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | | * @param ut Pointer to a UText struct. If NULL, a new UText will be cr
eated. | |
| * If non-NULL, must refer to an already existing UText, whic
h will then | | * If non-NULL, must refer to an already existing UText, whic
h will then | |
| * be reset to reference the specified replaceable text. | | * be reset to reference the specified replaceable text. | |
| * @param ci A Character Iterator. | | * @param ci A Character Iterator. | |
| * @param status Errors are returned here. | | * @param status Errors are returned here. | |
| * @return Pointer to the UText. If a UText was supplied as input, t
his | | * @return Pointer to the UText. If a UText was supplied as input, t
his | |
| * will always be used and returned. | | * will always be used and returned. | |
| * @see Replaceable | | * @see Replaceable | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
|
| utext_openCharacterIterator(UText *ut, U_NAMESPACE_QUALIFIER CharacterItera
tor *ic, UErrorCode *status); | | utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ic, UErrorCo
de *status); | |
| | | | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Clone a UText. This is much like opening a UText where the source tex
t is itself | | * Clone a UText. This is much like opening a UText where the source tex
t is itself | |
| * another UText. | | * another UText. | |
| * | | * | |
| * A deep clone will copy both the UText data structures and the underlyi
ng text. | | * A deep clone will copy both the UText data structures and the underlyi
ng text. | |
| * The original and cloned UText will operate completely independently; m
odifications | | * The original and cloned UText will operate completely independently; m
odifications | |
| * made to the text in one will not affect the other. Text providers are
not | | * made to the text in one will not affect the other. Text providers are
not | |
| | | | |
| skipping to change at line 658 | | skipping to change at line 658 | |
| * @return Number of UChars in the data to be extracted. Does not include
a trailing NUL. | | * @return Number of UChars in the data to be extracted. Does not include
a trailing NUL. | |
| * | | * | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE int32_t U_EXPORT2 | | U_STABLE int32_t U_EXPORT2 | |
| utext_extract(UText *ut, | | utext_extract(UText *ut, | |
| int64_t nativeStart, int64_t nativeLimit, | | int64_t nativeStart, int64_t nativeLimit, | |
| UChar *dest, int32_t destCapacity, | | UChar *dest, int32_t destCapacity, | |
| UErrorCode *status); | | UErrorCode *status); | |
| | | | |
|
| /** | | | |
| * Compare two UTexts (binary order). The comparison begins at each source | | | |
| text's | | | |
| * iteration position. The iteration position of each UText will be left fo | | | |
| llowing | | | |
| * the last character compared. | | | |
| * | | | |
| * The comparison is done in code point order; unlike u_strCompare, you | | | |
| * cannot choose to use code unit order. This is because the characters | | | |
| * in a UText are accessed one code point at a time, and may not be from a | | | |
| UTF-16 | | | |
| * context. | | | |
| * | | | |
| * This functions works with strings of different explicitly specified leng | | | |
| ths | | | |
| * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. | | | |
| * A length argument of -1 signifies that as much of the string should be u | | | |
| sed as | | | |
| * is necessary to compare with the other string. If both length arguments | | | |
| are -1, | | | |
| * the entire remaining portionss of both strings are used. | | | |
| * | | | |
| * @param s1 First source string. | | | |
| * @param length1 Length of first source string in UTF-32 code points. | | | |
| * | | | |
| * @param s2 Second source string. | | | |
| * @param length2 Length of second source string in UTF-32 code points. | | | |
| * | | | |
| * @return <0 or 0 or >0 as usual for string comparisons | | | |
| * | | | |
| * @internal ICU 4.4 technology preview | | | |
| */ | | | |
| U_INTERNAL int32_t U_EXPORT2 | | | |
| utext_compare(UText *s1, int32_t length1, | | | |
| UText *s2, int32_t length2); | | | |
| | | | |
| /** | | | |
| * Compare two UTexts (binary order). The comparison begins at each source | | | |
| text's | | | |
| * iteration position. The iteration position of each UText will be left fo | | | |
| llowing | | | |
| * the last character compared. This method differs from utext_compare in t | | | |
| hat | | | |
| * it accepts native limits rather than lengths for each string. | | | |
| * | | | |
| * The comparison is done in code point order; unlike u_strCompare, you | | | |
| * cannot choose to use code unit order. This is because the characters | | | |
| * in a UText are accessed one code point at a time, and may not be from a | | | |
| UTF-16 | | | |
| * context. | | | |
| * | | | |
| * This functions works with strings of different explicitly specified leng | | | |
| ths | | | |
| * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. | | | |
| * A limit argument of -1 signifies that as much of the string should be us | | | |
| ed as | | | |
| * is necessary to compare with the other string. If both limit arguments a | | | |
| re -1, | | | |
| * the entire remaining portionss of both strings are used. | | | |
| * | | | |
| * @param s1 First source string. | | | |
| * @param limit1 Native index of the last character in the first source str | | | |
| ing to be considered. | | | |
| * | | | |
| * @param s2 Second source string. | | | |
| * @param limit2 Native index of the last character in the second source st | | | |
| ring to be considered. | | | |
| * | | | |
| * @return <0 or 0 or >0 as usual for string comparisons | | | |
| * | | | |
| * @internal ICU 4.4 technology preview | | | |
| */ | | | |
| U_INTERNAL int32_t U_EXPORT2 | | | |
| utext_compareNativeLimit(UText *s1, int64_t limit1, | | | |
| UText *s2, int64_t limit2); | | | |
| | | | |
| /** | | | |
| * Compare two UTexts case-insensitively using full case folding. The compa | | | |
| rison | | | |
| * begins at each source text's iteration position. The iteration position | | | |
| of each | | | |
| * UText will be left following the last character compared. | | | |
| * | | | |
| * The comparison is done in code point order; this is because the characte | | | |
| rs | | | |
| * in a UText are accessed one code point at a time, and may not be from a | | | |
| UTF-16 | | | |
| * context. | | | |
| * | | | |
| * This functions works with strings of different explicitly specified leng | | | |
| ths | | | |
| * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. | | | |
| * A length argument of -1 signifies that as much of the string should be u | | | |
| sed as | | | |
| * is necessary to compare with the other string. If both length arguments | | | |
| are -1, | | | |
| * the entire remaining portionss of both strings are used. | | | |
| * | | | |
| * @param s1 First source string. | | | |
| * @param length1 Length of first source string in UTF-32 code points. | | | |
| * | | | |
| * @param s2 Second source string. | | | |
| * @param length2 Length of second source string in UTF-32 code points. | | | |
| * | | | |
| * @param options A bit set of options: | | | |
| * - U_FOLD_CASE_DEFAULT or 0 is used for default options: | | | |
| * Comparison in code point order with default case folding. | | | |
| * | | | |
| * - U_FOLD_CASE_EXCLUDE_SPECIAL_I | | | |
| * | | | |
| * @param pErrorCode Must be a valid pointer to an error code value, | | | |
| * which must not indicate a failure before the function c | | | |
| all. | | | |
| * | | | |
| * @return <0 or 0 or >0 as usual for string comparisons | | | |
| * | | | |
| * @internal ICU 4.4 technology preview | | | |
| */ | | | |
| U_INTERNAL int32_t U_EXPORT2 | | | |
| utext_caseCompare(UText *s1, int32_t length1, | | | |
| UText *s2, int32_t length2, | | | |
| uint32_t options, UErrorCode *pErrorCode); | | | |
| | | | |
| /** | | | |
| * Compare two UTexts case-insensitively using full case folding. The compa | | | |
| rison | | | |
| * begins at each source text's iteration position. The iteration position | | | |
| of each | | | |
| * UText will be left following the last character compared. This method di | | | |
| ffers from | | | |
| * utext_caseCompare in that it accepts native limits rather than lengths f | | | |
| or each | | | |
| * string. | | | |
| * | | | |
| * The comparison is done in code point order; this is because the characte | | | |
| rs | | | |
| * in a UText are accessed one code point at a time, and may not be from a | | | |
| UTF-16 | | | |
| * context. | | | |
| * | | | |
| * This functions works with strings of different explicitly specified leng | | | |
| ths | | | |
| * unlike the ANSI C-like u_strcmp() and u_memcmp() etc. | | | |
| * A limit argument of -1 signifies that as much of the string should be us | | | |
| ed as | | | |
| * is necessary to compare with the other string. If both length arguments | | | |
| are -1, | | | |
| * the entire remaining portionss of both strings are used. | | | |
| * | | | |
| * @param s1 First source string. | | | |
| * @param limit1 Native index of the last character in the first source str | | | |
| ing to be considered. | | | |
| * | | | |
| * @param s2 Second source string. | | | |
| * @param limit2 Native index of the last character in the second source st | | | |
| ring to be considered. | | | |
| * | | | |
| * @param options A bit set of options: | | | |
| * - U_FOLD_CASE_DEFAULT or 0 is used for default options: | | | |
| * Comparison in code point order with default case folding. | | | |
| * | | | |
| * - U_FOLD_CASE_EXCLUDE_SPECIAL_I | | | |
| * | | | |
| * @param pErrorCode Must be a valid pointer to an error code value, | | | |
| * which must not indicate a failure before the function c | | | |
| all. | | | |
| * | | | |
| * @return <0 or 0 or >0 as usual for string comparisons | | | |
| * | | | |
| * @internal ICU 4.4 technology preview | | | |
| */ | | | |
| U_INTERNAL int32_t U_EXPORT2 | | | |
| utext_caseCompareNativeLimit(UText *s1, int64_t limit1, | | | |
| UText *s2, int64_t limit2, | | | |
| uint32_t options, UErrorCode *pErrorCode); | | | |
| | | | |
| /**************************************************************************
********** | | /**************************************************************************
********** | |
| * | | * | |
| * #define inline versions of selected performance-critical text access fu
nctions | | * #define inline versions of selected performance-critical text access fu
nctions | |
| * Caution: do not use auto increment++ or decrement-- expression
s | | * Caution: do not use auto increment++ or decrement-- expression
s | |
| * as parameters to these macros. | | * as parameters to these macros. | |
| * | | * | |
| * For most use, where there is no extreme performance constraint,
the | | * For most use, where there is no extreme performance constraint,
the | |
| * normal, non-inline functions are a better choice. The resultin
g code | | * normal, non-inline functions are a better choice. The resultin
g code | |
| * will be smaller, and, if the need ever arises, easier to debug. | | * will be smaller, and, if the need ever arises, easier to debug. | |
| * | | * | |
| * These are implemented as #defines rather than real functions | | * These are implemented as #defines rather than real functions | |
| * because there is no fully portable way to do inline functions i
n plain C. | | * because there is no fully portable way to do inline functions i
n plain C. | |
| * | | * | |
| **************************************************************************
**********/ | | **************************************************************************
**********/ | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * inline version of utext_current32(), for performance-critical situations
. | | * inline version of utext_current32(), for performance-critical situations
. | |
| * | | * | |
| * Get the code point at the current iteration position of the UText. | | * Get the code point at the current iteration position of the UText. | |
| * Returns U_SENTINEL (-1) if the position is at the end of the | | * Returns U_SENTINEL (-1) if the position is at the end of the | |
| * text. | | * text. | |
| * | | * | |
| * @internal ICU 4.4 technology preview | | * @internal ICU 4.4 technology preview | |
| */ | | */ | |
| #define UTEXT_CURRENT32(ut) \ | | #define UTEXT_CURRENT32(ut) \ | |
| ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->c
hunkOffset]<0xd800 ? \ | | ((ut)->chunkOffset < (ut)->chunkLength && ((ut)->chunkContents)[(ut)->c
hunkOffset]<0xd800 ? \ | |
| ((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut)) | | ((ut)->chunkContents)[((ut)->chunkOffset)] : utext_current32(ut)) | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * inline version of utext_next32(), for performance-critical situations. | | * inline version of utext_next32(), for performance-critical situations. | |
| * | | * | |
| * Get the code point at the current iteration position of the UText, and | | * Get the code point at the current iteration position of the UText, and | |
| * advance the position to the first index following the character. | | * advance the position to the first index following the character. | |
| * This is a post-increment operation. | | * This is a post-increment operation. | |
| * Returns U_SENTINEL (-1) if the position is at the end of the | | * Returns U_SENTINEL (-1) if the position is at the end of the | |
| * text. | | * text. | |
| * | | * | |
| | | | |
| skipping to change at line 1653 | | skipping to change at line 1514 | |
| * @param extraSpace The amount of additional space to be allocated as part | | * @param extraSpace The amount of additional space to be allocated as part | |
| * of this UText, for use by types of providers that require | | * of this UText, for use by types of providers that require | |
| * additional storage. | | * additional storage. | |
| * @param status Errors are returned here. | | * @param status Errors are returned here. | |
| * @return pointer to the UText, allocated if necessary, with extra space s
et up if requested. | | * @return pointer to the UText, allocated if necessary, with extra space s
et up if requested. | |
| * @stable ICU 3.4 | | * @stable ICU 3.4 | |
| */ | | */ | |
| U_STABLE UText * U_EXPORT2 | | U_STABLE UText * U_EXPORT2 | |
| utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status); | | utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status); | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * @internal | | * @internal | |
| * Value used to help identify correctly initialized UText structs. | | * Value used to help identify correctly initialized UText structs. | |
| * Note: must be publicly visible so that UTEXT_INITIALIZER can access i
t. | | * Note: must be publicly visible so that UTEXT_INITIALIZER can access i
t. | |
| */ | | */ | |
| enum { | | enum { | |
| UTEXT_MAGIC = 0x345ad82c | | UTEXT_MAGIC = 0x345ad82c | |
| }; | | }; | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * initializer to be used with local (stack) instances of a UText | | * initializer to be used with local (stack) instances of a UText | |
| * struct. UText structs must be initialized before passing | | * struct. UText structs must be initialized before passing | |
| * them to one of the utext_open functions. | | * them to one of the utext_open functions. | |
| * | | * | |
| * @stable ICU 3.6 | | * @stable ICU 3.6 | |
| */ | | */ | |
| #define UTEXT_INITIALIZER { \ | | #define UTEXT_INITIALIZER { \ | |
| UTEXT_MAGIC, /* magic */ \ | | UTEXT_MAGIC, /* magic */ \ | |
| | | | |
End of changes. 10 change blocks. |
| 181 lines changed or deleted | | 9 lines changed or added | |
|
| utypes.h | | utypes.h | |
| /* | | /* | |
| ********************************************************************** | | ********************************************************************** | |
|
| * Copyright (C) 1996-2011, International Business Machines | | * Copyright (C) 1996-2012, International Business Machines | |
| * Corporation and others. All Rights Reserved. | | * Corporation and others. All Rights Reserved. | |
| ********************************************************************** | | ********************************************************************** | |
| * | | * | |
| * FILE NAME : UTYPES.H (formerly ptypes.h) | | * FILE NAME : UTYPES.H (formerly ptypes.h) | |
| * | | * | |
| * Date Name Description | | * Date Name Description | |
| * 12/11/96 helena Creation. | | * 12/11/96 helena Creation. | |
| * 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32
, | | * 02/27/97 aliu Added typedefs for UClassID, int8, int16, int32
, | |
| * uint8, uint16, and uint32. | | * uint8, uint16, and uint32. | |
| * 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C
as | | * 04/01/97 aliu Added XP_CPLUSPLUS and modified to work under C
as | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| * Renamed to utypes.h. | | * Renamed to utypes.h. | |
| * 05/05/99 stephen Changed to use <inttypes.h> | | * 05/05/99 stephen Changed to use <inttypes.h> | |
| * 12/07/99 helena Moved copyright notice string from ucnv_bld.h h
ere. | | * 12/07/99 helena Moved copyright notice string from ucnv_bld.h h
ere. | |
| ***************************************************************************
**** | | ***************************************************************************
**** | |
| */ | | */ | |
| | | | |
| #ifndef UTYPES_H | | #ifndef UTYPES_H | |
| #define UTYPES_H | | #define UTYPES_H | |
| | | | |
| #include "unicode/umachine.h" | | #include "unicode/umachine.h" | |
|
| #include "unicode/utf.h" | | | |
| #include "unicode/uversion.h" | | #include "unicode/uversion.h" | |
| #include "unicode/uconfig.h" | | #include "unicode/uconfig.h" | |
|
| #include "float.h" | | #include <float.h> | |
| | | | |
| | | #if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS | |
| | | # include "unicode/utf.h" | |
| | | #endif | |
| | | | |
| /*! | | /*! | |
| * \file | | * \file | |
| * \brief Basic definitions for ICU, for both C and C++ APIs | | * \brief Basic definitions for ICU, for both C and C++ APIs | |
| * | | * | |
| * This file defines basic types, constants, and enumerations directly or | | * This file defines basic types, constants, and enumerations directly or | |
| * indirectly by including other header files, especially utf.h for the | | * indirectly by including other header files, especially utf.h for the | |
| * basic character and string definitions and umachine.h for consistent | | * basic character and string definitions and umachine.h for consistent | |
| * integer and other types. | | * integer and other types. | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \def U_SHOW_CPLUSPLUS_API | | * \def U_SHOW_CPLUSPLUS_API | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #ifdef XP_CPLUSPLUS | | #ifdef __cplusplus | |
| # ifndef U_SHOW_CPLUSPLUS_API | | # ifndef U_SHOW_CPLUSPLUS_API | |
| # define U_SHOW_CPLUSPLUS_API 1 | | # define U_SHOW_CPLUSPLUS_API 1 | |
| # endif | | # endif | |
| #else | | #else | |
| # undef U_SHOW_CPLUSPLUS_API | | # undef U_SHOW_CPLUSPLUS_API | |
| # define U_SHOW_CPLUSPLUS_API 0 | | # define U_SHOW_CPLUSPLUS_API 0 | |
| #endif | | #endif | |
| | | | |
| /** @{ API visibility control */ | | /** @{ API visibility control */ | |
| | | | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 86 | |
| * Define this to 1 to request that internal API be "hidden" | | * Define this to 1 to request that internal API be "hidden" | |
| * @internal | | * @internal | |
| */ | | */ | |
| #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API) | | #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_DRAFT_API) | |
| #define U_HIDE_DRAFT_API 1 | | #define U_HIDE_DRAFT_API 1 | |
| #endif | | #endif | |
| #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API) | | #if !U_DEFAULT_SHOW_DRAFT && !defined(U_SHOW_INTERNAL_API) | |
| #define U_HIDE_INTERNAL_API 1 | | #define U_HIDE_INTERNAL_API 1 | |
| #endif | | #endif | |
| | | | |
|
| #ifdef U_HIDE_DRAFT_API | | | |
| #include "unicode/udraft.h" | | | |
| #endif | | | |
| | | | |
| #ifdef U_HIDE_DEPRECATED_API | | | |
| #include "unicode/udeprctd.h" | | | |
| #endif | | | |
| | | | |
| #ifdef U_HIDE_DEPRECATED_API | | | |
| #include "unicode/uobslete.h" | | | |
| #endif | | | |
| | | | |
| #ifdef U_HIDE_INTERNAL_API | | | |
| #include "unicode/uintrnal.h" | | | |
| #endif | | | |
| | | | |
| #ifdef U_HIDE_SYSTEM_API | | | |
| #include "unicode/usystem.h" | | | |
| #endif | | | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
|
| /* char Character set family | | | |
| */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| /** | | | |
| * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII ba | | | |
| sed platform. | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| #define U_ASCII_FAMILY 0 | | | |
| | | | |
| /** | | | |
| * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC b | | | |
| ased platform. | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| #define U_EBCDIC_FAMILY 1 | | | |
| | | | |
| /** | | | |
| * \def U_CHARSET_FAMILY | | | |
| * | | | |
| * <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.</p> | | | |
| * | | | |
| * <p>Those "invariant characters" should be all the uppercase and lowercas | | | |
| e | | | |
| * latin letters, the digits, the space, and "basic punctuation". | | | |
| * Also, '\\n', '\\r', '\\t' should be available.</p> | | | |
| * | | | |
| * <p>The list of "invariant characters" is:<br> | | | |
| * \code | | | |
| * A-Z a-z 0-9 SPACE " % & ' ( ) * + , - . / : ; < | | | |
| = > ? _ | | | |
| * \endcode | | | |
| * <br> | | | |
| * (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p> | | | |
| * | | | |
| * <p>This matches the IBM Syntactic Character Set (CS 640).</p> | | | |
| * | | | |
| * <p>In other words, all the graphic characters in 7-bit ASCII should | | | |
| * be safely accessible except the following:</p> | | | |
| * | | | |
| * \code | | | |
| * '\' <backslash> | | | |
| * '[' <left bracket> | | | |
| * ']' <right bracket> | | | |
| * '{' <left brace> | | | |
| * '}' <right brace> | | | |
| * '^' <circumflex> | | | |
| * '~' <tilde> | | | |
| * '!' <exclamation mark> | | | |
| * '#' <number sign> | | | |
| * '|' <vertical line> | | | |
| * '$' <dollar sign> | | | |
| * '@' <commercial at> | | | |
| * '`' <grave accent> | | | |
| * \endcode | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| | | | |
| #ifndef U_CHARSET_FAMILY | | | |
| # define U_CHARSET_FAMILY 0 | | | |
| #endif | | | |
| | | | |
| /** | | | |
| * \def U_CHARSET_IS_UTF8 | | | |
| * | | | |
| * Hardcode the default charset to UTF-8. | | | |
| * | | | |
| * If this is set to 1, then | | | |
| * - ICU will assume that all non-invariant char*, StringPiece, std::string | | | |
| etc. | | | |
| * contain UTF-8 text, regardless of what the system API uses | | | |
| * - some ICU code will use fast functions like u_strFromUTF8() | | | |
| * rather than the more general and more heavy-weight conversion API (ucn | | | |
| v.h) | | | |
| * - ucnv_getDefaultName() always returns "UTF-8" | | | |
| * - ucnv_setDefaultName() is disabled and will not change the default char | | | |
| set | | | |
| * - static builds of ICU are smaller | | | |
| * - more functionality is available with the UCONFIG_NO_CONVERSION build-t | | | |
| ime | | | |
| * configuration option (see unicode/uconfig.h) | | | |
| * - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable | | | |
| * | | | |
| * @stable ICU 4.2 | | | |
| * @see UCONFIG_NO_CONVERSION | | | |
| */ | | | |
| #ifndef U_CHARSET_IS_UTF8 | | | |
| # define U_CHARSET_IS_UTF8 0 | | | |
| #endif | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /* ICUDATA naming scheme
*/ | | /* ICUDATA naming scheme
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
| /** | | /** | |
| * \def U_ICUDATA_TYPE_LETTER | | * \def U_ICUDATA_TYPE_LETTER | |
| * | | * | |
| * This is a platform-dependent string containing one letter: | | * This is a platform-dependent string containing one letter: | |
| * - b for big-endian, ASCII-family platforms | | * - b for big-endian, ASCII-family platforms | |
| * - l for little-endian, ASCII-family platforms | | * - l for little-endian, ASCII-family platforms | |
| * - e for big-endian, EBCDIC-family platforms | | * - e for big-endian, EBCDIC-family platforms | |
| | | | |
| skipping to change at line 239 | | skipping to change at line 135 | |
| # define U_ICUDATA_TYPE_LETTER "l" | | # define U_ICUDATA_TYPE_LETTER "l" | |
| # define U_ICUDATA_TYPE_LITLETTER l | | # define U_ICUDATA_TYPE_LITLETTER l | |
| # endif | | # endif | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * A single string literal containing the icudata stub name. i.e. 'icudt18e
' for | | * A single string literal containing the icudata stub name. i.e. 'icudt18e
' for | |
| * ICU 1.8.x on EBCDIC, etc.. | | * ICU 1.8.x on EBCDIC, etc.. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
|
| #define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER | | #define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER | |
| /**< @internal */ | | #ifndef U_HIDE_INTERNAL_API | |
| #define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
/**< @internal */ | | #define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
/**< @internal */ | |
| #define U_USE_USRDATA 1 /**< @internal */ | | #define U_USE_USRDATA 1 /**< @internal */ | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data li
brary. | | * U_ICU_ENTRY_POINT is the name of the DLL entry point to the ICU data li
brary. | |
| * Defined as a literal, not a string. | | * Defined as a literal, not a string. | |
| * Tricky Preprocessor use - ## operator replaces macro paramters with t
he literal string | | * Tricky Preprocessor use - ## operator replaces macro paramters with t
he literal string | |
| * from the corresponding macro invocation, _b
efore_ other macro substitutions. | | * from the corresponding macro invocation, _b
efore_ other macro substitutions. | |
| * Need a nested \#defines to get the actual v
ersion numbers rather than | | * Need a nested \#defines to get the actual v
ersion numbers rather than | |
| * the literal text U_ICU_VERSION_MAJOR_NUM in
to the name. | | * the literal text U_ICU_VERSION_MAJOR_NUM in
to the name. | |
| * The net result will be something of the for
m | | * The net result will be something of the for
m | |
| * \#define U_ICU_ENTRY_POINT icudt19_dat | | * \#define U_ICU_ENTRY_POINT icudt19_dat | |
| * @stable ICU 2.4 | | * @stable ICU 2.4 | |
| */ | | */ | |
|
| #define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJ
OR_NUM, U_ICU_VERSION_MINOR_NUM) | | #define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJ
OR_NUM,U_LIB_SUFFIX_C_NAME) | |
| | | | |
|
| | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
|
| * Do not use. | | * Do not use. Note that it's OK for the 2nd argument to be undefined (lite
ral). | |
| * @internal | | * @internal | |
| */ | | */ | |
|
| #define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT( | | #define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(ma | |
| major, minor) | | jor,suff) | |
| | | | |
| /** | | /** | |
| * Do not use. | | * Do not use. | |
| * @internal | | * @internal | |
| */ | | */ | |
| #ifndef U_DEF_ICUDATA_ENTRY_POINT | | #ifndef U_DEF_ICUDATA_ENTRY_POINT | |
| /* affected by symbol renaming. See platform.h */ | | /* affected by symbol renaming. See platform.h */ | |
|
| #define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat | | #ifndef U_LIB_SUFFIX_C_NAME | |
| #endif | | #define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat | |
| | | | |
| /** | | | |
| * \def U_CALLCONV | | | |
| * 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. | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| #if defined(OS390) && defined(XP_CPLUSPLUS) | | | |
| # define U_CALLCONV __cdecl | | | |
| #else | | #else | |
|
| # define U_CALLCONV U_EXPORT2 | | #define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##suff ## major##_dat | |
| | | #endif | |
| #endif | | #endif | |
|
| | | #endif /* U_HIDE_INTERNAL_API */ | |
| | | | |
| /** | | /** | |
| * \def NULL | | * \def NULL | |
| * Define NULL if necessary, to 0 for C++ and to ((void *)0) for C. | | * Define NULL if necessary, to 0 for C++ and to ((void *)0) for C. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| #ifndef NULL | | #ifndef NULL | |
|
| #ifdef XP_CPLUSPLUS | | #ifdef __cplusplus | |
| #define NULL 0 | | #define NULL 0 | |
| #else | | #else | |
| #define NULL ((void *)0) | | #define NULL ((void *)0) | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| /* Calendar/TimeZone data types
*/ | | /* Calendar/TimeZone data types
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
| | | | |
| skipping to change at line 324 | | skipping to change at line 212 | |
| #define U_MILLIS_PER_SECOND (1000) | | #define U_MILLIS_PER_SECOND (1000) | |
| /** The number of milliseconds per minute @stable ICU 2.0 */ | | /** The number of milliseconds per minute @stable ICU 2.0 */ | |
| #define U_MILLIS_PER_MINUTE (60000) | | #define U_MILLIS_PER_MINUTE (60000) | |
| /** The number of milliseconds per hour @stable ICU 2.0 */ | | /** The number of milliseconds per hour @stable ICU 2.0 */ | |
| #define U_MILLIS_PER_HOUR (3600000) | | #define U_MILLIS_PER_HOUR (3600000) | |
| /** The number of milliseconds per day @stable ICU 2.0 */ | | /** The number of milliseconds per day @stable ICU 2.0 */ | |
| #define U_MILLIS_PER_DAY (86400000) | | #define U_MILLIS_PER_DAY (86400000) | |
| | | | |
| /** | | /** | |
| * Maximum UDate value | | * Maximum UDate value | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| #define U_DATE_MAX DBL_MAX | | #define U_DATE_MAX DBL_MAX | |
| | | | |
| /** | | /** | |
| * Minimum UDate value | | * Minimum UDate value | |
|
| * @draft ICU 4.8 | | * @stable ICU 4.8 | |
| */ | | */ | |
| #define U_DATE_MIN -U_DATE_MAX | | #define U_DATE_MIN -U_DATE_MAX | |
| | | | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
|
| /* UClassID-based RTTI */ | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| | | | |
| /** | | | |
| * UClassID is used to identify classes without using RTTI, since RTTI | | | |
| * is not yet supported by all C++ compilers. Each class hierarchy which n | | | |
| eeds | | | |
| * 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. | | | |
| * | | | |
| * \par | | | |
| * getDynamicClassID() is declared in the base class of the hierarchy as | | | |
| * a pure virtual. Each concrete subclass implements it in the same way: | | | |
| * | | | |
| * \code | | | |
| * class Base { | | | |
| * public: | | | |
| * virtual UClassID getDynamicClassID() const = 0; | | | |
| * } | | | |
| * | | | |
| * class Derived { | | | |
| * public: | | | |
| * virtual UClassID getDynamicClassID() const | | | |
| * { return Derived::getStaticClassID(); } | | | |
| * } | | | |
| * \endcode | | | |
| * | | | |
| * Each concrete class implements getStaticClassID() as well, which allows | | | |
| * clients to test for a specific type. | | | |
| * | | | |
| * \code | | | |
| * class Derived { | | | |
| * public: | | | |
| * static UClassID U_EXPORT2 getStaticClassID(); | | | |
| * private: | | | |
| * static char fgClassID; | | | |
| * } | | | |
| * | | | |
| * // In Derived.cpp: | | | |
| * UClassID Derived::getStaticClassID() | | | |
| * { return (UClassID)&Derived::fgClassID; } | | | |
| * char Derived::fgClassID = 0; // Value is irrelevant | | | |
| * \endcode | | | |
| * @stable ICU 2.0 | | | |
| */ | | | |
| typedef void* UClassID; | | | |
| | | | |
| /*========================================================================= | | | |
| ==*/ | | | |
| /* Shared library/DLL import-export API control
*/ | | /* Shared library/DLL import-export API control
*/ | |
| /*=========================================================================
==*/ | | /*=========================================================================
==*/ | |
| | | | |
| /* | | /* | |
| * Control of symbol import/export. | | * Control of symbol import/export. | |
| * ICU is separated into three libraries. | | * ICU is separated into three libraries. | |
| */ | | */ | |
| | | | |
|
| /* | | /** | |
| * \def U_COMBINED_IMPLEMENTATION | | * \def U_COMBINED_IMPLEMENTATION | |
| * Set to export library symbols from inside the ICU library | | * Set to export library symbols from inside the ICU library | |
| * when all of ICU is in a single library. | | * when all of ICU is in a single library. | |
| * This can be set as a compiler option while building ICU, and it | | * This can be set as a compiler option while building ICU, and it | |
| * needs to be the first one tested to override U_COMMON_API, U_I18N_API, e
tc. | | * needs to be the first one tested to override U_COMMON_API, U_I18N_API, e
tc. | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * \def U_DATA_API | | * \def U_DATA_API | |
| | | | |
| skipping to change at line 557 | | skipping to change at line 397 | |
| * b) Verify that new is never imported. | | * b) Verify that new is never imported. | |
| * c) Verify that delete is only imported from object code for interface/mi
xin classes. | | * c) Verify that delete is only imported from object code for interface/mi
xin classes. | |
| * d) Add global delete and delete[] only for the ICU4C library itself | | * d) Add global delete and delete[] only for the ICU4C library itself | |
| * and define them in a way that crashes or otherwise easily shows a pro
blem. | | * and define them in a way that crashes or otherwise easily shows a pro
blem. | |
| * | | * | |
| * The following implements d). | | * The following implements d). | |
| * The operator implementations crash; this is intentional and used for lib
rary debugging. | | * The operator implementations crash; this is intentional and used for lib
rary debugging. | |
| * | | * | |
| * Note: This is currently only done on Windows because | | * Note: This is currently only done on Windows because | |
| * some Linux/Unix compilers have problems with defining global new/delete. | | * some Linux/Unix compilers have problems with defining global new/delete. | |
|
| * On Windows, U_WINDOWS is defined, and it is _MSC_VER>=1200 for MSVC 6.0
and higher. | | * On Windows, it is _MSC_VER>=1200 for MSVC 6.0 and higher. | |
| */ | | */ | |
|
| #if defined(XP_CPLUSPLUS) && defined(U_WINDOWS) && U_DEBUG && U_OVERRIDE_CX
X_ALLOCATION && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (d
efined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || define
d(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAY
OUTEX_IMPLEMENTATION)) | | #if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && (_MSC_V
ER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEME
NTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
|| defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION)) | |
| | | | |
| #ifndef U_HIDE_INTERNAL_API | | #ifndef U_HIDE_INTERNAL_API | |
| /** | | /** | |
| * Global operator new, defined only inside ICU4C, must not be used. | | * Global operator new, defined only inside ICU4C, must not be used. | |
| * Crashes intentionally. | | * Crashes intentionally. | |
| * @internal | | * @internal | |
| */ | | */ | |
| inline void * | | inline void * | |
| operator new(size_t /*size*/) { | | operator new(size_t /*size*/) { | |
| char *q=NULL; | | char *q=NULL; | |
| | | | |
| skipping to change at line 759 | | skipping to change at line 599 | |
| U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern *
/ | | U_PATTERN_SYNTAX_ERROR, /**< Syntax error in format pattern *
/ | |
| U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p
attern */ | | U_ILLEGAL_PAD_POSITION, /**< Pad symbol misplaced in number p
attern */ | |
| U_UNMATCHED_BRACES, /**< Braces do not match in message p
attern */ | | U_UNMATCHED_BRACES, /**< Braces do not match in message p
attern */ | |
| U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */ | | U_UNSUPPORTED_PROPERTY, /**< UNUSED as of ICU 2.4 */ | |
| U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */ | | U_UNSUPPORTED_ATTRIBUTE, /**< UNUSED as of ICU 2.4 */ | |
| U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index
mismatch in MessageFormat functions */ | | U_ARGUMENT_TYPE_MISMATCH, /**< Argument name and argument index
mismatch in MessageFormat functions */ | |
| U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma
t */ | | U_DUPLICATE_KEYWORD, /**< Duplicate keyword in PluralForma
t */ | |
| U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */ | | U_UNDEFINED_KEYWORD, /**< Undefined Plural keyword */ | |
| U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r
ules */ | | U_DEFAULT_KEYWORD_MISSING, /**< Missing DEFAULT rule in plural r
ules */ | |
| U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */ | | U_DECIMAL_NUMBER_SYNTAX_ERROR, /**< Decimal number syntax error */ | |
|
| U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly a
nd rounding mode is ROUND_UNNECESSARY @draft ICU 4.8 */ | | U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly a
nd rounding mode is ROUND_UNNECESSARY @stable ICU 4.8 */ | |
| U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err
ors */ | | U_FMT_PARSE_ERROR_LIMIT, /**< The limit for format library err
ors */ | |
| | | | |
| /* | | /* | |
| * the error code range 0x10200 0x102ff are reserved for Break Iterator
related error | | * the error code range 0x10200 0x102ff are reserved for Break Iterator
related error | |
| */ | | */ | |
| U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was
detected. */ | | U_BRK_INTERNAL_ERROR=0x10200, /**< An internal error (bug) was
detected. */ | |
| U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B
reak Iterator failures */ | | U_BRK_ERROR_START=0x10200, /**< Start of codes indicating B
reak Iterator failures */ | |
| U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part
of a escaped char in a rule. */ | | U_BRK_HEX_DIGITS_EXPECTED, /**< Hex digits expected as part
of a escaped char in a rule. */ | |
| U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a
RBBI rule. */ | | U_BRK_SEMICOLON_EXPECTED, /**< Missing ';' at the end of a
RBBI rule. */ | |
| U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule.
*/ | | U_BRK_RULE_SYNTAX, /**< Syntax error in RBBI rule.
*/ | |
| | | | |
| skipping to change at line 843 | | skipping to change at line 683 | |
| U_PLUGIN_TOO_HIGH=0x10500, /**< The plugin's level is too hi
gh to be loaded right now. */ | | U_PLUGIN_TOO_HIGH=0x10500, /**< The plugin's level is too hi
gh to be loaded right now. */ | |
| U_PLUGIN_DIDNT_SET_LEVEL, /**< The plugin didn't call uplug
_setPlugLevel in response to a QUERY */ | | U_PLUGIN_DIDNT_SET_LEVEL, /**< The plugin didn't call uplug
_setPlugLevel in response to a QUERY */ | |
| U_PLUGIN_ERROR_LIMIT, /**< This must always be the last
value to indicate the limit for plugin errors */ | | U_PLUGIN_ERROR_LIMIT, /**< This must always be the last
value to indicate the limit for plugin errors */ | |
| | | | |
| U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT /**< This must always be the la
st value to indicate the limit for UErrorCode (last error code +1) */ | | U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT /**< This must always be the la
st value to indicate the limit for UErrorCode (last error code +1) */ | |
| } UErrorCode; | | } UErrorCode; | |
| | | | |
| /* Use the following to determine if an UErrorCode represents */ | | /* Use the following to determine if an UErrorCode represents */ | |
| /* operational success or failure. */ | | /* operational success or failure. */ | |
| | | | |
|
| #ifdef XP_CPLUSPLUS | | #ifdef __cplusplus | |
| /** | | /** | |
| * Does the error code indicate success? | | * Does the error code indicate success? | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| static | | static | |
| inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_E
RROR); } | | inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_E
RROR); } | |
| /** | | /** | |
| * Does the error code indicate a failure? | | * Does the error code indicate a failure? | |
| * @stable ICU 2.0 | | * @stable ICU 2.0 | |
| */ | | */ | |
| | | | |
End of changes. 24 change blocks. |
| 205 lines changed or deleted | | 29 lines changed or added | |
|