ICU-10764 API Promotions for ICU4C 53.

X-SVN-Rev: 35459
This commit is contained in:
Andy Heninger 2014-03-13 20:33:16 +00:00
parent 27b3e24d4d
commit dfe8c061e0
26 changed files with 297 additions and 304 deletions

View file

@ -19,8 +19,6 @@
#include "unicode/utypes.h"
#ifndef U_HIDE_DRAFT_API
#include "unicode/unistr.h"
#include "unicode/locid.h"
@ -59,12 +57,13 @@ struct ListFormatData : public UMemory {
* as "Alice, Bob, Charlie and Delta" in English.
*
* The ListFormatter class is not intended for public subclassing.
* @draft ICU 50
* @stable ICU 50
*/
class U_COMMON_API ListFormatter : public UObject{
public:
#ifndef U_HIDE_DRAFT_API
/**
* Copy constructor.
* @draft ICU 52
@ -76,6 +75,7 @@ class U_COMMON_API ListFormatter : public UObject{
* @draft ICU 52
*/
ListFormatter& operator=(const ListFormatter& other);
#endif /* U_HIDE_DRAFT_API */
/**
* Creates a ListFormatter appropriate for the default locale.
@ -83,7 +83,7 @@ class U_COMMON_API ListFormatter : public UObject{
* @param errorCode ICU error code, set if no data available for default locale.
* @return Pointer to a ListFormatter object for the default locale,
* created from internal data derived from CLDR data.
* @draft ICU 50
* @stable ICU 50
*/
static ListFormatter* createInstance(UErrorCode& errorCode);
@ -94,7 +94,7 @@ class U_COMMON_API ListFormatter : public UObject{
* @param errorCode ICU error code, set if no data available for the given locale.
* @return A ListFormatter object created from internal data derived from
* CLDR data.
* @draft ICU 50
* @stable ICU 50
*/
static ListFormatter* createInstance(const Locale& locale, UErrorCode& errorCode);
@ -115,7 +115,7 @@ class U_COMMON_API ListFormatter : public UObject{
/**
* Destructor.
*
* @draft ICU 50
* @stable ICU 50
*/
virtual ~ListFormatter();
@ -128,7 +128,7 @@ class U_COMMON_API ListFormatter : public UObject{
* @param appendTo The string to which the result should be appended to.
* @param errorCode ICU error code, set if there is an error.
* @return Formatted string combining the elements of items, appended to appendTo.
* @draft ICU 50
* @stable ICU 50
*/
UnicodeString& format(const UnicodeString items[], int32_t n_items,
UnicodeString& appendTo, UErrorCode& errorCode) const;
@ -148,6 +148,9 @@ class U_COMMON_API ListFormatter : public UObject{
* @internal constructor made public for testing.
*/
ListFormatter(const ListFormatData &data);
/**
* @internal constructor made public for testing.
*/
ListFormatter(const ListFormatInternal* listFormatterInternal);
#endif /* U_HIDE_INTERNAL_API */
@ -163,5 +166,4 @@ class U_COMMON_API ListFormatter : public UObject{
U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-2013, International Business Machines
* Copyright (C) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -517,27 +517,25 @@ uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity,
UErrorCode *errorCode);
#ifndef U_HIDE_DRAFT_API
/**
* Script usage constants.
* See UAX #31 Unicode Identifier and Pattern Syntax.
* http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers
*
* @draft ICU 51
* @stable ICU 51
*/
typedef enum UScriptUsage {
/** Not encoded in Unicode. @draft ICU 51 */
/** Not encoded in Unicode. @stable ICU 51 */
USCRIPT_USAGE_NOT_ENCODED,
/** Unknown script usage. @draft ICU 51 */
/** Unknown script usage. @stable ICU 51 */
USCRIPT_USAGE_UNKNOWN,
/** Candidate for Exclusion from Identifiers. @draft ICU 51 */
/** Candidate for Exclusion from Identifiers. @stable ICU 51 */
USCRIPT_USAGE_EXCLUDED,
/** Limited Use script. @draft ICU 51 */
/** Limited Use script. @stable ICU 51 */
USCRIPT_USAGE_LIMITED_USE,
/** Aspirational Use script. @draft ICU 51 */
/** Aspirational Use script. @stable ICU 51 */
USCRIPT_USAGE_ASPIRATIONAL,
/** Recommended script. @draft ICU 51 */
/** Recommended script. @stable ICU 51 */
USCRIPT_USAGE_RECOMMENDED
} UScriptUsage;
@ -551,9 +549,9 @@ typedef enum UScriptUsage {
* @param capacity number of UChars in the dest array
* @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input
* @return the string length, even if U_BUFFER_OVERFLOW_ERROR
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT int32_t U_EXPORT2
U_STABLE int32_t U_EXPORT2
uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode);
#if U_SHOW_CPLUSPLUS_API
@ -569,7 +567,7 @@ U_NAMESPACE_END
*
* @param script script code
* @return the sample character string
* @draft ICU 51
* @stable ICU 51
*/
U_COMMON_API icu::UnicodeString U_EXPORT2
uscript_getSampleUnicodeString(UScriptCode script);
@ -583,9 +581,9 @@ uscript_getSampleUnicodeString(UScriptCode script);
* @param script script code
* @return script usage
* @see UScriptUsage
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT UScriptUsage U_EXPORT2
U_STABLE UScriptUsage U_EXPORT2
uscript_getUsage(UScriptCode script);
/**
@ -594,9 +592,9 @@ uscript_getUsage(UScriptCode script);
*
* @param script script code
* @return TRUE if the script is right-to-left
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT UBool U_EXPORT2
U_STABLE UBool U_EXPORT2
uscript_isRightToLeft(UScriptCode script);
/**
@ -606,9 +604,9 @@ uscript_isRightToLeft(UScriptCode script);
*
* @param script script code
* @return TRUE if the script allows line breaks between letters
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT UBool U_EXPORT2
U_STABLE UBool U_EXPORT2
uscript_breaksBetweenLetters(UScriptCode script);
/**
@ -617,11 +615,9 @@ uscript_breaksBetweenLetters(UScriptCode script);
*
* @param script script code
* @return TRUE if the script is cased
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT UBool U_EXPORT2
U_STABLE UBool U_EXPORT2
uscript_isCased(UScriptCode script);
#endif /* U_HIDE_DRAFT_API */
#endif

View file

@ -253,7 +253,6 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
U8_NEXT(s, _u8_get_index, length, c); \
}
#ifndef U_HIDE_DRAFT_API
/**
* Get a code point from a string at a random-access offset,
* without changing the offset.
@ -277,14 +276,13 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
* @param length int32_t string length
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_GET
* @draft ICU 51
* @stable ICU 51
*/
#define U8_GET_OR_FFFD(s, start, i, length, c) { \
int32_t _u8_get_index=(i); \
U8_SET_CP_START(s, start, _u8_get_index); \
U8_NEXT_OR_FFFD(s, _u8_get_index, length, c); \
}
#endif /* U_HIDE_DRAFT_API */
/* definitions with forward iteration --------------------------------------- */
@ -368,7 +366,6 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
} \
}
#ifndef U_HIDE_DRAFT_API
/**
* Get a code point from a string at a code point boundary offset,
* and advance the offset to the next code point boundary.
@ -391,7 +388,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
* @param length int32_t string length
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_NEXT
* @draft ICU 51
* @stable ICU 51
*/
#define U8_NEXT_OR_FFFD(s, i, length, c) { \
(c)=(uint8_t)(s)[(i)++]; \
@ -419,7 +416,6 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
} \
} \
}
#endif /* U_HIDE_DRAFT_API */
/**
* Append a code point to a string, overwriting 1 to 4 bytes.
@ -676,7 +672,6 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
} \
}
#ifndef U_HIDE_DRAFT_API
/**
* Move the string offset from one code point boundary to the previous one
* and get the code point between them.
@ -699,7 +694,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
* @param i int32_t string offset, must be start<i
* @param c output UChar32 variable, set to U+FFFD in case of an error
* @see U8_PREV
* @draft ICU 51
* @stable ICU 51
*/
#define U8_PREV_OR_FFFD(s, start, i, c) { \
(c)=(uint8_t)(s)[--(i)]; \
@ -707,7 +702,6 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
(c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -3); \
} \
}
#endif /* U_HIDE_DRAFT_API */
/**
* Move the string offset from one code point boundary to the previous one.

View file

@ -185,22 +185,19 @@ class UVector;
*/
class U_I18N_API AlphabeticIndex: public UObject {
public:
#ifdef U_HIDE_DRAFT_API
class Bucket;
#else
/**
* An index "bucket" with a label string and type.
* It is referenced by getBucketIndex(),
* and returned by ImmutableIndex.getBucket().
*
* The Bucket class is not intended for public subclassing.
* @draft ICU 51
* @stable ICU 51
*/
class U_I18N_API Bucket : public UObject {
public:
/**
* Destructor.
* @draft ICU 51
* @stable ICU 51
*/
virtual ~Bucket();
@ -208,14 +205,14 @@ public:
* Returns the label string.
*
* @return the label string for the bucket
* @draft ICU 51
* @stable ICU 51
*/
const UnicodeString &getLabel() const { return label_; }
/**
* Returns whether this bucket is a normal, underflow, overflow, or inflow bucket.
*
* @return the bucket label type
* @draft ICU 51
* @stable ICU 51
*/
UAlphabeticIndexLabelType getLabelType() const { return labelType_; }
@ -243,13 +240,13 @@ public:
*
* The ImmutableIndex class is not intended for public subclassing.
*
* @draft ICU 51
* @stable ICU 51
*/
class U_I18N_API ImmutableIndex : public UObject {
public:
/**
* Destructor.
* @draft ICU 51
* @stable ICU 51
*/
virtual ~ImmutableIndex();
@ -257,7 +254,7 @@ public:
* Returns the number of index buckets and labels, including underflow/inflow/overflow.
*
* @return the number of index buckets
* @draft ICU 51
* @stable ICU 51
*/
int32_t getBucketCount() const;
@ -267,7 +264,7 @@ public:
*
* @param name the string to be sorted into an index bucket
* @return the bucket number for the name
* @draft ICU 51
* @stable ICU 51
*/
int32_t getBucketIndex(const UnicodeString &name, UErrorCode &errorCode) const;
@ -276,7 +273,7 @@ public:
*
* @param index bucket number
* @return the index-th bucket
* @draft ICU 51
* @stable ICU 51
*/
const Bucket *getBucket(int32_t index) const;
@ -289,7 +286,6 @@ public:
BucketList *buckets_;
Collator *collatorPrimaryOnly_;
};
#endif /* U_HIDE_DRAFT_API */
/**
* Construct an AlphabeticIndex object for the specified locale. If the locale's
@ -305,7 +301,6 @@ public:
*/
AlphabeticIndex(const Locale &locale, UErrorCode &status);
#ifndef U_HIDE_DRAFT_API
/**
* Construct an AlphabeticIndex that uses a specific collator.
*
@ -318,10 +313,9 @@ public:
* @param collator The collator to use to order the contents of this index.
* @param status Error code, will be set with the reason if the
* operation fails.
* @draft ICU 51
* @stable ICU 51
*/
AlphabeticIndex(RuleBasedCollator *collator, UErrorCode &status);
#endif /* U_HIDE_DRAFT_API */
/**
* Add Labels to this Index. The labels are additions to those
@ -356,15 +350,13 @@ public:
*/
virtual ~AlphabeticIndex();
#ifndef U_HIDE_DRAFT_API
/**
* Builds an immutable, thread-safe version of this instance, without data records.
*
* @return an immutable index instance
* @draft ICU 51
* @stable ICU 51
*/
ImmutableIndex *buildImmutableIndex(UErrorCode &errorCode);
#endif /* U_HIDE_DRAFT_API */
/**
* Get the Collator that establishes the ordering of the items in this index.

View file

@ -858,6 +858,7 @@ public:
virtual UColAttributeValue getAttribute(UColAttribute attr,
UErrorCode &status) const = 0;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft methods since they are virtual */
/**
* Sets the variable top to the top of the specified reordering group.
* The variable top determines the highest-sorting character

View file

@ -1,6 +1,6 @@
/*
********************************************************************************
* Copyright (C) 2012-2013, International Business Machines
* Copyright (C) 2012-2014, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@ -18,7 +18,6 @@
*/
#if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/decimfmt.h"
@ -48,7 +47,7 @@ class PluralRules;
* Resetting the pattern prefixes or suffixes is not supported; the method calls
* are ignored.
* <p>
* @draft ICU 51
* @stable ICU 51
*/
class U_I18N_API CompactDecimalFormat : public DecimalFormat {
public:
@ -58,7 +57,7 @@ public:
* @param inLocale the given locale.
* @param style whether to use short or long style.
* @param status error code returned here.
* @draft ICU 51
* @stable ICU 51
*/
static CompactDecimalFormat* U_EXPORT2 createInstance(
const Locale& inLocale, UNumberCompactStyle style, UErrorCode& status);
@ -67,13 +66,13 @@ public:
* Copy constructor.
*
* @param source the DecimalFormat object to be copied from.
* @draft ICU 51
* @stable ICU 51
*/
CompactDecimalFormat(const CompactDecimalFormat& source);
/**
* Destructor.
* @draft ICU 51
* @stable ICU 51
*/
virtual ~CompactDecimalFormat();
@ -81,7 +80,7 @@ public:
* Assignment operator.
*
* @param rhs the DecimalFormat object to be copied.
* @draft ICU 51
* @stable ICU 51
*/
CompactDecimalFormat& operator=(const CompactDecimalFormat& rhs);
@ -90,7 +89,7 @@ public:
* result and should delete it when done.
*
* @return a polymorphic copy of this CompactDecimalFormat.
* @draft ICU 51
* @stable ICU 51
*/
virtual Format* clone() const;
@ -100,7 +99,7 @@ public:
*
* @param other the object to be compared with.
* @return TRUE if the given Format objects are semantically equal.
* @draft ICU 51
* @stable ICU 51
*/
virtual UBool operator==(const Format& other) const;
@ -116,7 +115,7 @@ public:
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @draft ICU 51
* @stable ICU 51
*/
virtual UnicodeString& format(double number,
UnicodeString& appendTo,
@ -150,7 +149,7 @@ public:
* @param pos On input: an alignment field, if desired.
* On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
* @draft ICU 51
* @stable ICU 51
*/
virtual UnicodeString& format(int64_t number,
UnicodeString& appendTo,
@ -243,7 +242,7 @@ public:
* @param result Does not change.
* @param parsePosition Does not change.
* @see Formattable
* @draft ICU 51
* @stable ICU 51
*/
virtual void parse(const UnicodeString& text,
Formattable& result,
@ -256,13 +255,12 @@ public:
* @param text Unused.
* @param result Does not change.
* @param status Always set to U_UNSUPPORTED_ERROR.
* @draft ICU 51
* @stable ICU 51
*/
virtual void parse(const UnicodeString& text,
Formattable& result,
UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_INTERNAL_API for the following draft method since it is virtual */
/**
* Parses text from the given string as a currency amount. Unlike
* the parse() method, this method will attempt to parse a generic
@ -295,7 +293,7 @@ public:
* . Derived::getStaticClassID()) ...
* </pre>
* @return The class ID for all objects of this class.
* @draft ICU 51
* @stable ICU 51
*/
static UClassID U_EXPORT2 getStaticClassID();
@ -308,7 +306,7 @@ public:
* @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of
* other classes have different class IDs.
* @draft ICU 51
* @stable ICU 51
*/
virtual UClassID getDynamicClassID() const;
@ -326,7 +324,6 @@ private:
U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif // __COMPACT_DECIMAL_FORMAT_H__

View file

@ -610,6 +610,7 @@ public:
virtual void setLenient(UBool lenient);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/**
* Returns whether date/time parsing in the encapsulated Calendar object processing is lenient.
* @draft ICU 53
@ -617,6 +618,7 @@ public:
virtual UBool isCalendarLenient(void) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/**
* Specifies whether encapsulated Calendar date/time parsing is to be lenient. With
* lenient parsing, the parser may use heuristics to interpret inputs that
@ -730,6 +732,7 @@ public:
*/
virtual UDisplayContext getContext(UDisplayContextType type, UErrorCode& status) const;
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/**
* Sets an boolean attribute on this DateFormat.
* May return U_UNSUPPORTED_ERROR if this instance does not support
@ -745,6 +748,7 @@ public:
UBool newvalue,
UErrorCode &status);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/**
* Returns a boolean from this DateFormat
* May return U_UNSUPPORTED_ERROR if this instance does not support

View file

@ -785,7 +785,7 @@ public:
* @param newvalue new value
* @param status the error type
* @return *this - for chaining (example: format.setAttribute(...).setAttribute(...) )
* @draft ICU 51
* @stable ICU 51
*/
virtual DecimalFormat& setAttribute( UNumberFormatAttribute attr,
int32_t newvalue,
@ -798,7 +798,7 @@ public:
* @param attr the attribute to set
* @param status the error type
* @return the attribute value. Undefined if there is an error.
* @draft ICU 51
* @stable ICU 51
*/
virtual int32_t getAttribute( UNumberFormatAttribute attr,
UErrorCode &status) const;
@ -821,6 +821,7 @@ public:
*/
virtual void setParseIntegerOnly(UBool value);
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
/**
* Set a particular UDisplayContext value in the formatter, such as
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE.

View file

@ -283,13 +283,11 @@ public:
ABBREVIATED,
WIDE,
NARROW,
#ifndef U_HIDE_DRAFT_API
/**
* Short width is currently only supported for weekday names.
* @draft ICU 51
* @stable ICU 51
*/
SHORT,
#endif /* U_HIDE_DRAFT_API */
/**
*/
DT_WIDTH_COUNT = 4

View file

@ -34,6 +34,7 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
public:
/**
* destructor.
* @internal technology preview
*/
virtual ~FilteredBreakIteratorBuilder();
@ -47,6 +48,7 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
* @param where the locale.
* @param status The error code.
* @return the new builder
* @internal technology preview
*/
static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status);
@ -55,6 +57,7 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
* In this state, it will not suppress any segment boundaries.
* @param status The error code.
* @return the new builder
* @internal technology preview
*/
static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status);
@ -66,6 +69,7 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
* @param status error code
* @return returns TRUE if the string was not present and now added,
* FALSE if the call was a no-op because the string was already being suppressed.
* @internal technology preview
*/
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@ -78,6 +82,7 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
* @param status error code
* @return returns TRUE if the string was present and now removed,
* FALSE if the call was a no-op because the string was not being suppressed.
* @internal technology preview
*/
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@ -91,12 +96,14 @@ class U_I18N_API FilteredBreakIteratorBuilder : public UObject {
* @param adoptBreakIterator the break iterator to adopt
* @param status error code
* @return the new BreakIterator, owned by the caller.
* @internal technology preview
*/
virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
protected:
/**
* For subclass use
* @internal technology preview
*/
FilteredBreakIteratorBuilder();
};

View file

@ -1,6 +1,6 @@
/*
******************************************************************************
* Copyright (C) 2010-2012, International Business Machines Corporation and
* Copyright (C) 2010-2014, International Business Machines Corporation and
* others. All Rights Reserved.
******************************************************************************
*/
@ -61,7 +61,6 @@ public:
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale,
UDialectHandling dialectHandling);
#ifndef U_HIDE_DRAFT_API
/**
* Returns an instance of LocaleDisplayNames that returns names formatted
* for the provided locale, using the provided UDisplayContext settings.
@ -71,11 +70,10 @@ public:
* handling, capitalization, etc.
* @param length Number of items in the contexts list
* @return a LocaleDisplayNames instance
* @draft ICU 51
* @stable ICU 51
*/
static LocaleDisplayNames* U_EXPORT2 createInstance(const Locale& locale,
UDisplayContext *contexts, int32_t length);
#endif /* U_HIDE_DRAFT_API */
// getters for state
/**
@ -97,7 +95,7 @@ public:
* Returns the UDisplayContext value for the specified UDisplayContextType.
* @param type the UDisplayContextType whose value to return
* @return the UDisplayContext for the specified type.
* @draft ICU 51
* @stable ICU 51
*/
virtual UDisplayContext getContext(UDisplayContextType type) const = 0;

View file

@ -24,6 +24,7 @@
* \brief C++ API: Formatter for measure objects.
*/
#ifndef U_HIDE_DRAFT_API
/**
* Constants for various widths.
* There are 3 widths: Wide, Short, Narrow.
@ -67,6 +68,7 @@ enum UMeasureFormatWidth {
};
/** @draft ICU 53 */
typedef enum UMeasureFormatWidth UMeasureFormatWidth;
#endif /* U_HIDE_DRAFT_API */
U_NAMESPACE_BEGIN
@ -92,16 +94,17 @@ class U_I18N_API MeasureFormat : public Format {
using Format::parseObject;
using Format::format;
#ifndef U_HIDE_DRAFT_API
/**
* Constructor.
* @draft ICU 53.
* @draft ICU 53
*/
MeasureFormat(
const Locale &locale, UMeasureFormatWidth width, UErrorCode &status);
/**
* Constructor.
* @draft ICU 53.
* @draft ICU 53
*/
MeasureFormat(
const Locale &locale,
@ -111,15 +114,17 @@ class U_I18N_API MeasureFormat : public Format {
/**
* Copy constructor.
* @draft ICU 53.
* @draft ICU 53
*/
MeasureFormat(const MeasureFormat &other);
/**
* Assignment operator.
* @draft ICU 53.
* @draft ICU 53
*/
MeasureFormat &operator=(const MeasureFormat &rhs);
#endif /* U_HIDE_DRAFT_API */
/**
* Destructor.
@ -160,6 +165,7 @@ class U_I18N_API MeasureFormat : public Format {
Formattable &reslt,
ParsePosition &pos) const;
#ifndef U_HIDE_DRAFT_API
/**
* Formats measure objects to produce a string. An example of such a
* formatted string is 3 meters, 3.5 centimeters. Measure objects appear
@ -182,6 +188,7 @@ class U_I18N_API MeasureFormat : public Format {
UnicodeString &appendTo,
FieldPosition &pos,
UErrorCode &status) const;
#endif /* U_HIDE_DRAFT_API */
/**

View file

@ -44,6 +44,7 @@ class U_I18N_API MeasureUnit: public UObject {
fCurrency[0] = 0;
}
#ifndef U_HIDE_DRAFT_API
/**
* Copy constructor.
* @draft ICU 53
@ -52,9 +53,10 @@ class U_I18N_API MeasureUnit: public UObject {
/**
* Assignment operator.
* @draft ICU 53.
* @draft ICU 53
*/
MeasureUnit &operator=(const MeasureUnit &other);
#endif /* U_HIDE_DRAFT_API */
/**
* Returns a polymorphic clone of this object. The result will
@ -76,6 +78,7 @@ class U_I18N_API MeasureUnit: public UObject {
*/
virtual UBool operator==(const UObject& other) const;
#ifndef U_HIDE_DRAFT_API
/**
* Inequality operator. Return true if this object is not equal
* to the given object.
@ -140,6 +143,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @draft ICU 53
*/
static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
#endif /* U_HIDE_DRAFT_API */
/**
* Return the class ID for this class. This is useful only for comparing to
@ -189,323 +193,369 @@ class U_I18N_API MeasureUnit: public UObject {
// Start generated createXXX methods
/**
* Returns unit of acceleration: g-force.
* Creates a unit of acceleration: g-force.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createGForce(UErrorCode &status);
/**
* Returns unit of angle: arc-minute.
* Creates a unit of angle: arc-minute.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createArcMinute(UErrorCode &status);
/**
* Returns unit of angle: arc-second.
* Creates a unit of angle: arc-second.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createArcSecond(UErrorCode &status);
/**
* Returns unit of angle: degree.
* Creates a unit of angle: degree.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createDegree(UErrorCode &status);
/**
* Returns unit of area: acre.
* Creates a unit of area: acre.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createAcre(UErrorCode &status);
/**
* Returns unit of area: hectare.
* Creates a unit of area: hectare.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createHectare(UErrorCode &status);
/**
* Returns unit of area: square-foot.
* Creates a unit of area: square-foot.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createSquareFoot(UErrorCode &status);
/**
* Returns unit of area: square-kilometer.
* Creates a unit of area: square-kilometer.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createSquareKilometer(UErrorCode &status);
/**
* Returns unit of area: square-meter.
* Creates a unit of area: square-meter.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createSquareMeter(UErrorCode &status);
/**
* Returns unit of area: square-mile.
* Creates a unit of area: square-mile.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createSquareMile(UErrorCode &status);
/**
* Returns unit of duration: day.
* Creates a unit of duration: day.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createDay(UErrorCode &status);
/**
* Returns unit of duration: hour.
* Creates a unit of duration: hour.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createHour(UErrorCode &status);
/**
* Returns unit of duration: millisecond.
* Creates a unit of duration: millisecond.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMillisecond(UErrorCode &status);
/**
* Returns unit of duration: minute.
* Creates a unit of duration: minute.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMinute(UErrorCode &status);
/**
* Returns unit of duration: month.
* Creates a unit of duration: month.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMonth(UErrorCode &status);
/**
* Returns unit of duration: second.
* Creates a unit of duration: second.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createSecond(UErrorCode &status);
/**
* Returns unit of duration: week.
* Creates a unit of duration: week.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createWeek(UErrorCode &status);
/**
* Returns unit of duration: year.
* Creates a unit of duration: year.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createYear(UErrorCode &status);
/**
* Returns unit of length: centimeter.
* Creates a unit of length: centimeter.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createCentimeter(UErrorCode &status);
/**
* Returns unit of length: foot.
* Creates a unit of length: foot.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createFoot(UErrorCode &status);
/**
* Returns unit of length: inch.
* Creates a unit of length: inch.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createInch(UErrorCode &status);
/**
* Returns unit of length: kilometer.
* Creates a unit of length: kilometer.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createKilometer(UErrorCode &status);
/**
* Returns unit of length: light-year.
* Creates a unit of length: light-year.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createLightYear(UErrorCode &status);
/**
* Returns unit of length: meter.
* Creates a unit of length: meter.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMeter(UErrorCode &status);
/**
* Returns unit of length: mile.
* Creates a unit of length: mile.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMile(UErrorCode &status);
/**
* Returns unit of length: millimeter.
* Creates a unit of length: millimeter.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMillimeter(UErrorCode &status);
/**
* Returns unit of length: picometer.
* Creates a unit of length: picometer.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createPicometer(UErrorCode &status);
/**
* Returns unit of length: yard.
* Creates a unit of length: yard.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createYard(UErrorCode &status);
/**
* Returns unit of mass: gram.
* Creates a unit of mass: gram.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createGram(UErrorCode &status);
/**
* Returns unit of mass: kilogram.
* Creates a unit of mass: kilogram.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createKilogram(UErrorCode &status);
/**
* Returns unit of mass: ounce.
* Creates a unit of mass: ounce.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createOunce(UErrorCode &status);
/**
* Returns unit of mass: pound.
* Creates a unit of mass: pound.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createPound(UErrorCode &status);
/**
* Returns unit of power: horsepower.
* Creates a unit of power: horsepower.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createHorsepower(UErrorCode &status);
/**
* Returns unit of power: kilowatt.
* Creates a unit of power: kilowatt.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createKilowatt(UErrorCode &status);
/**
* Returns unit of power: watt.
* Creates a unit of power: watt.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createWatt(UErrorCode &status);
/**
* Returns unit of pressure: hectopascal.
* Creates a unit of pressure: hectopascal.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createHectopascal(UErrorCode &status);
/**
* Returns unit of pressure: inch-hg.
* Creates a unit of pressure: inch-hg.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createInchHg(UErrorCode &status);
/**
* Returns unit of pressure: millibar.
* Creates a unit of pressure: millibar.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMillibar(UErrorCode &status);
/**
* Returns unit of speed: kilometer-per-hour.
* Creates a unit of speed: kilometer-per-hour.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createKilometerPerHour(UErrorCode &status);
/**
* Returns unit of speed: meter-per-second.
* Creates a unit of speed: meter-per-second.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMeterPerSecond(UErrorCode &status);
/**
* Returns unit of speed: mile-per-hour.
* Creates a unit of speed: mile-per-hour.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createMilePerHour(UErrorCode &status);
/**
* Returns unit of temperature: celsius.
* Creates a unit of temperature: celsius.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createCelsius(UErrorCode &status);
/**
* Returns unit of temperature: fahrenheit.
* Creates a unit of temperature: fahrenheit.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createFahrenheit(UErrorCode &status);
/**
* Returns unit of volume: cubic-kilometer.
* Creates a unit of volume: cubic-kilometer.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createCubicKilometer(UErrorCode &status);
/**
* Returns unit of volume: cubic-mile.
* Creates a unit of volume: cubic-mile.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createCubicMile(UErrorCode &status);
/**
* Returns unit of volume: liter.
* Creates a unit of volume: liter.
* Caller owns returned value and must free it.
* @param status ICU error code.
* @draft ICU 53
*/
static MeasureUnit *createLiter(UErrorCode &status);

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2013, International Business Machines Corporation and others.
* Copyright (C) 2014, International Business Machines Corporation and others.
* All Rights Reserved.
*******************************************************************************
*/
@ -17,7 +17,6 @@
#include "unicode/uregion.h"
#if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
#include "unicode/uobject.h"
#include "unicode/uniset.h"
@ -63,26 +62,26 @@ U_NAMESPACE_BEGIN
* The Region class is not intended for public subclassing.
*
* @author John Emmons
* @draft ICU 51
* @stable ICU 51
*/
class U_I18N_API Region : public UObject {
public:
/**
* Destructor.
* @draft ICU 51
* @stable ICU 51
*/
virtual ~Region();
/**
* Returns true if the two regions are equal.
* @draft ICU 51
* @stable ICU 51
*/
UBool operator==(const Region &that) const;
/**
* Returns true if the two regions are NOT equal; that is, if operator ==() returns false.
* @draft ICU 51
* @stable ICU 51
*/
UBool operator!=(const Region &that) const;
@ -91,20 +90,20 @@ public:
* 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification.
* The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR.
* If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR )
* @draft ICU 51
* @stable ICU 51
*/
static const Region* U_EXPORT2 getInstance(const char *region_code, UErrorCode &status);
/**
* Returns a pointer to a Region using the given numeric region code. If the numeric region code is not recognized,
* the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ).
* @draft ICU 51
* @stable ICU 51
*/
static const Region* U_EXPORT2 getInstance (int32_t code, UErrorCode &status);
/**
* Returns an enumeration over the IDs of all known regions that match the given type.
* @draft ICU 51
* @draft ICU 51
*/
static StringEnumeration* U_EXPORT2 getAvailable(URegionType type);
@ -112,7 +111,7 @@ public:
* Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World)
* or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the
* region "039" (Southern Europe).
* @draft ICU 51
* @stable ICU 51
*/
const Region* getContainingRegion() const;
@ -122,7 +121,7 @@ public:
* that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN"
* are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method
* with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ).
* @draft ICU 51
* @stable ICU 51
*/
const Region* getContainingRegion(URegionType type) const;
@ -148,7 +147,7 @@ public:
/**
* Returns true if this region contains the supplied other region anywhere in the region hierarchy.
* @draft ICU 51
* @stable ICU 51
*/
UBool contains(const Region &other) const;
@ -163,20 +162,20 @@ public:
/**
* Return this region's canonical region code.
* @draft ICU 51
* @stable ICU 51
*/
const char* getRegionCode() const;
/**
* Return this region's numeric code.
* Returns a negative value if the given region does not have a numeric code assigned to it.
* @draft ICU 51
* @stable ICU 51
*/
int32_t getNumericCode() const;
/**
* Returns the region type of this region.
* @draft ICU 51
* @stable ICU 51
*/
URegionType getType() const;
@ -218,7 +217,6 @@ private:
U_NAMESPACE_END
#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif // REGION_H

View file

@ -338,7 +338,7 @@ public:
* @param target the second UTF-8 string
* @param status ICU status
* @return UCOL_LESS, UCOL_EQUAL or UCOL_GREATER
* @draft ICU 51
* @stable ICU 51
*/
virtual UCollationResult compareUTF8(const StringPiece &source,
const StringPiece &target,

View file

@ -57,99 +57,97 @@ typedef enum UTimeZoneFormatStyle {
* @stable ICU 50
*/
UTZFMT_STYLE_LOCALIZED_GMT,
#ifndef U_HIDE_DRAFT_API
/**
* Short localized GMT offset format, such as "GMT-5", "UTC+1:30"
* This style is equivalent to the LDML date format pattern "O".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_LOCALIZED_GMT_SHORT,
/**
* Short ISO 8601 local time difference (basic format) or the UTC indicator.
* For example, "-05", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "X".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_SHORT,
/**
* Short ISO 8601 locale time difference (basic format).
* For example, "-05" and "+0530".
* This style is equivalent to the LDML date format pattern "x".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT,
/**
* Fixed width ISO 8601 local time difference (basic format) or the UTC indicator.
* For example, "-0500", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XX".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_FIXED,
/**
* Fixed width ISO 8601 local time difference (basic format).
* For example, "-0500" and "+0530".
* This style is equivalent to the LDML date format pattern "xx".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED,
/**
* ISO 8601 local time difference (basic format) with optional seconds field, or the UTC indicator.
* For example, "-0500", "+052538", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXX".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_FULL,
/**
* ISO 8601 local time difference (basic format) with optional seconds field.
* For example, "-0500" and "+052538".
* This style is equivalent to the LDML date format pattern "xxxx".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL,
/**
* Fixed width ISO 8601 local time difference (extended format) or the UTC indicator.
* For example, "-05:00", "+05:30", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXX".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_FIXED,
/**
* Fixed width ISO 8601 local time difference (extended format).
* For example, "-05:00" and "+05:30".
* This style is equivalent to the LDML date format pattern "xxx" and "ZZZZZ".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED,
/**
* ISO 8601 local time difference (extended format) with optional seconds field, or the UTC indicator.
* For example, "-05:00", "+05:25:38", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXXX".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_FULL,
/**
* ISO 8601 local time difference (extended format) with optional seconds field.
* For example, "-05:00" and "+05:25:38".
* This style is equivalent to the LDML date format pattern "xxxxx".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL,
/**
* Time Zone ID, such as "America/Los_Angeles".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ZONE_ID,
/**
* Short Time Zone ID (BCP 47 Unicode location extension, time zone type value), such as "uslax".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_ZONE_ID_SHORT,
/**
* Exemplar location, such as "Los Angeles" and "Paris".
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_STYLE_EXEMPLAR_LOCATION
#endif /* U_HIDE_DRAFT_API */
} UTimeZoneFormatStyle;
/**
@ -177,18 +175,16 @@ typedef enum UTimeZoneFormatGMTOffsetPatternType {
* @stable ICU 50
*/
UTZFMT_PAT_NEGATIVE_HMS,
#ifndef U_HIDE_DRAFT_API
/**
* Positive offset with hours field
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_PAT_POSITIVE_H,
/**
* Negative offset with hours field
* @draft ICU 51
* @stable ICU 51
*/
UTZFMT_PAT_NEGATIVE_H,
#endif /* U_HIDE_DRAFT_API */
/* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed for other .h declarations */
/**
@ -434,7 +430,6 @@ public:
*/
void setDefaultParseOptions(uint32_t flags);
#ifndef U_HIDE_DRAFT_API
/**
* Returns the ISO 8601 basic time zone string for the given offset.
* For example, "-08", "-0830" and "Z"
@ -448,7 +443,7 @@ public:
* @return the ISO 8601 basic format.
* @see #formatOffsetISO8601Extended
* @see #parseOffsetISO8601
* @draft ICU 51
* @stable ICU 51
*/
UnicodeString& formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const;
@ -466,11 +461,10 @@ public:
* @return the ISO 8601 basic format.
* @see #formatOffsetISO8601Extended
* @see #parseOffsetISO8601
* @draft ICU 51
* @stable ICU 51
*/
UnicodeString& formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const;
#endif /* U_HIDE_DRAFT_API */
/**
* Returns the localized GMT(UTC) offset format for the given offset.
@ -493,7 +487,6 @@ public:
*/
UnicodeString& formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
#ifndef U_HIDE_DRAFT_API
/**
* Returns the short localized GMT(UTC) offset format for the given offset.
* The short localized GMT offset is defined by;
@ -511,10 +504,9 @@ public:
* @param result Receives the short localized GMT format string.
* @return A reference to the result.
* @see #parseOffsetShortLocalizedGMT
* @draft ICU 51
* @stable ICU 51
*/
UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
#endif /* U_HIDE_DRAFT_API */
using Format::format;
@ -564,7 +556,6 @@ public:
*/
int32_t parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
#ifndef U_HIDE_DRAFT_API
/**
* Returns offset from GMT(UTC) in milliseconds for the given short localized GMT
* offset format string. When the given string cannot be parsed, this method
@ -575,10 +566,9 @@ public:
* @return The offset from GMT(UTC) in milliseconds for the given short localized GMT
* offset format string.
* @see #formatOffsetShortLocalizedGMT
* @draft ICU 51
* @stable ICU 51
*/
int32_t parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const;
#endif /* U_HIDE_DRAFT_API */
/**
* Returns a <code>TimeZone</code> by parsing the time zone string according to

View file

@ -60,13 +60,11 @@ typedef enum UTimeZoneNameType {
* @stable ICU 50
*/
UTZNM_SHORT_DAYLIGHT = 0x20,
#ifndef U_HIDE_DRAFT_API
/**
* Exemplar location name, such as "Los Angeles".
* @draft ICU 51
* @stable ICU 51
*/
UTZNM_EXEMPLAR_LOCATION = 0x40
#endif /* U_HIDE_DRAFT_API */
} UTimeZoneNameType;
U_CDECL_END

View file

@ -745,7 +745,6 @@ ucal_setTimeZone(UCalendar* cal,
int32_t len,
UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Get the ID of the UCalendar's time zone.
*
@ -754,14 +753,13 @@ ucal_setTimeZone(UCalendar* cal,
* @param resultLength The maximum size of result.
* @param status Receives the status.
* @return The total buffer size needed; if greater than resultLength, the output was truncated.
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT int32_t U_EXPORT2
ucal_getTimeZoneID(const UCalendar *cal,
UChar *result,
int32_t resultLength,
UErrorCode *status);
#endif /* U_HIDE_DRAFT_API */
/**
* Possible formats for a UCalendar's display name

View file

@ -199,18 +199,16 @@ typedef enum UDateFormatStyle {
* @stable ICU 4.0
*/
#define UDAT_YEAR "y"
#ifndef U_HIDE_DRAFT_API
/**
* Constant for date skeleton with quarter.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_QUARTER "QQQQ"
/**
* Constant for date skeleton with abbreviated quarter.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_ABBR_QUARTER "QQQ"
#endif /* U_HIDE_DRAFT_API */
/**
* Constant for date skeleton with year and quarter.
* @stable ICU 4.0
@ -274,18 +272,16 @@ typedef enum UDateFormatStyle {
* @stable ICU 4.0
*/
#define UDAT_YEAR_NUM_MONTH_DAY "yMd"
#ifndef U_HIDE_DRAFT_API
/**
* Constant for date skeleton with weekday.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_WEEKDAY "EEEE"
/**
* Constant for date skeleton with abbreviated weekday.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_ABBR_WEEKDAY "E"
#endif /* U_HIDE_DRAFT_API */
/**
* Constant for date skeleton with year, month, weekday, and day.
* Used in combinations date + time, date + time + zone, or time + zone.
@ -348,18 +344,16 @@ typedef enum UDateFormatStyle {
* @stable ICU 4.0
*/
#define UDAT_HOUR "j"
#ifndef U_HIDE_DRAFT_API
/**
* Constant for date skeleton with hour in 24-hour presentation.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_HOUR24 "H"
/**
* Constant for date skeleton with minute.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_MINUTE "m"
#endif /* U_HIDE_DRAFT_API */
/**
* Constant for date skeleton with hour and minute, with the locale's preferred hour format (12 or 24).
* Used in combinations date + time, date + time + zone, or time + zone.
@ -372,13 +366,11 @@ typedef enum UDateFormatStyle {
* @stable ICU 4.0
*/
#define UDAT_HOUR24_MINUTE "Hm"
#ifndef U_HIDE_DRAFT_API
/**
* Constant for date skeleton with second.
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_SECOND "s"
#endif /* U_HIDE_DRAFT_API */
/**
* Constant for date skeleton with hour, minute, and second,
* with the locale's preferred hour format (12 or 24).
@ -402,13 +394,12 @@ typedef enum UDateFormatStyle {
/* Skeletons for time zones. */
#ifndef U_HIDE_DRAFT_API
/**
* Constant for <i>generic location format</i>, such as Los Angeles Time;
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_LOCATION_TZ "VVVV"
/**
@ -416,7 +407,7 @@ typedef enum UDateFormatStyle {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_GENERIC_TZ "vvvv"
/**
@ -424,7 +415,7 @@ typedef enum UDateFormatStyle {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_ABBR_GENERIC_TZ "v"
/**
@ -432,7 +423,7 @@ typedef enum UDateFormatStyle {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_SPECIFIC_TZ "zzzz"
/**
@ -440,7 +431,7 @@ typedef enum UDateFormatStyle {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_ABBR_SPECIFIC_TZ "z"
/**
@ -448,10 +439,9 @@ typedef enum UDateFormatStyle {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 51
* @stable ICU 51
*/
#define UDAT_ABBR_UTC_TZ "ZZZZ"
#endif /* U_HIDE_DRAFT_API */
/* deprecated skeleton constants */
@ -737,12 +727,11 @@ typedef enum UDateFormatField {
*/
UDAT_YEAR_NAME_FIELD = 30,
#ifndef U_HIDE_DRAFT_API
/**
* FieldPosition selector for 'O' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
* This displays the localized GMT format.
* @draft ICU 51
* @stable ICU 51
*/
UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31,
@ -750,7 +739,7 @@ typedef enum UDateFormatField {
* FieldPosition selector for 'X' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSETfields.
* This displays the ISO 8601 local time offset format or UTC indicator ("Z").
* @draft ICU 51
* @stable ICU 51
*/
UDAT_TIMEZONE_ISO_FIELD = 32,
@ -758,10 +747,9 @@ typedef enum UDateFormatField {
* FieldPosition selector for 'x' field alignment,
* corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OFFSET fields.
* This displays the ISO 8601 local time offset format.
* @draft ICU 51
* @stable ICU 51
*/
UDAT_TIMEZONE_ISO_LOCAL_FIELD = 33,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
@ -910,7 +898,7 @@ udat_getBooleanAttribute(const UDateFormat* fmt, UDateFormatBooleanAttribute att
* @draft ICU 53
*/
U_DRAFT void U_EXPORT2
udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool, UErrorCode* status);
udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode* status);
#endif /* U_HIDE_DRAFT_API */
@ -1244,21 +1232,19 @@ typedef enum UDateFormatSymbolType {
/** Standalone context versions of quarters */
UDAT_STANDALONE_QUARTERS,
UDAT_STANDALONE_SHORT_QUARTERS,
#ifndef U_HIDE_DRAFT_API
/**
* The CLDR-style short weekday names, e.g. "Su", Mo", etc.
* These are named "SHORTER" to contrast with the constants using _SHORT_
* above, which actually get the CLDR-style *abbreviated* versions of the
* corresponding names.
* @draft ICU 51
* @stable ICU 51
*/
UDAT_SHORTER_WEEKDAYS,
/**
* Standalone version of UDAT_SHORTER_WEEKDAYS.
* @draft ICU 51
* @stable ICU 51
*/
UDAT_STANDALONE_SHORTER_WEEKDAYS
#endif /* U_HIDE_DRAFT_API */
} UDateFormatSymbolType;
struct UDateFormatSymbols;
@ -1345,18 +1331,18 @@ udat_getLocaleByType(const UDateFormat *fmt,
ULocDataLocaleType type,
UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Set a particular UDisplayContext value in the formatter, such as
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE.
* @param fmt The formatter for which to set a UDisplayContext value.
* @param value The UDisplayContext value to set.
* @param status A pointer to an UErrorCode to receive any errors
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT void U_EXPORT2
udat_setContext(UDateFormat* fmt, UDisplayContext value, UErrorCode* status);
#ifndef U_HIDE_DRAFT_API
/**
* Get the formatter's UDisplayContext value for the specified UDisplayContextType,
* such as UDISPCTX_TYPE_CAPITALIZATION.

View file

@ -1,6 +1,6 @@
/*
*****************************************************************************************
* Copyright (C) 2013, International Business Machines
* Copyright (C) 2014, International Business Machines
* Corporation and others. All Rights Reserved.
*****************************************************************************************
*/
@ -12,7 +12,6 @@
#if !UCONFIG_NO_FORMATTING
/* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
/**
* \file
* \brief C API: Display context types (enum values)
@ -21,38 +20,34 @@
/**
* Display context types, for getting values of a particular setting.
* Note, the specific numeric values are internal and may change.
* @draft ICU 51
* @stable ICU 51
*/
enum UDisplayContextType {
#ifndef U_HIDE_DRAFT_API
/**
* Type to retrieve the dialect handling setting, e.g.
* UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
/**
* Type to retrieve the capitalization context setting, e.g.
* UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
* UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_TYPE_CAPITALIZATION = 1
#endif /* U_HIDE_DRAFT_API */
};
/**
* @draft ICU 51
* @stable ICU 51
*/
typedef enum UDisplayContextType UDisplayContextType;
/* Dont hide with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
/**
* Display context settings.
* Note, the specific numeric values are internal and may change.
* @draft ICU 51
* @stable ICU 51
*/
enum UDisplayContext {
#ifndef U_HIDE_DRAFT_API
/**
* ================================
* DIALECT_HANDLING can be set to one of UDISPCTX_STANDARD_NAMES or
@ -63,14 +58,14 @@ enum UDisplayContext {
* A possible setting for DIALECT_HANDLING:
* use standard names when generating a locale name,
* e.g. en_GB displays as 'English (United Kingdom)'.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_STANDARD_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 0,
/**
* A possible setting for DIALECT_HANDLING:
* use dialect names, when generating a locale name,
* e.g. en_GB displays as 'British English'.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_DIALECT_NAMES = (UDISPCTX_TYPE_DIALECT_HANDLING<<8) + 1,
/**
@ -84,38 +79,37 @@ enum UDisplayContext {
*/
/**
* The capitalization context to be used is unknown (this is the default value).
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_CAPITALIZATION_NONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 0,
/**
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the middle of a sentence.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 1,
/**
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the beginning of a sentence.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 2,
/**
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for a user-interface list or menu item.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 3,
/**
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for stand-alone usage such as an
* isolated name on a calendar page.
* @draft ICU 51
* @stable ICU 51
*/
UDISPCTX_CAPITALIZATION_FOR_STANDALONE = (UDISPCTX_TYPE_CAPITALIZATION<<8) + 4
#endif /* U_HIDE_DRAFT_API */
};
/**
* @draft ICU 51
* @stable ICU 51
*/
typedef enum UDisplayContext UDisplayContext;

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines Corporation and *
* Copyright (C) 2010-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -266,7 +266,6 @@ uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
int32_t maxResultSize,
UErrorCode *pErrorCode);
#ifndef U_HIDE_DRAFT_API
/**
* Returns an instance of LocaleDisplayNames that returns names formatted
* for the provided locale, using the provided UDisplayContext settings.
@ -279,9 +278,9 @@ uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
* a failure status, the function will do nothing; otherwise this will be
* updated with any new status from the function.
* @return a ULocaleDisplayNames instance
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT ULocaleDisplayNames * U_EXPORT2
U_STABLE ULocaleDisplayNames * U_EXPORT2
uldn_openForContext(const char * locale, UDisplayContext *contexts,
int32_t length, UErrorCode *pErrorCode);
@ -293,13 +292,11 @@ uldn_openForContext(const char * locale, UDisplayContext *contexts,
* a failure status, the function will do nothing; otherwise this will be
* updated with any new status from the function.
* @return the UDisplayContextValue for the specified type.
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT UDisplayContext U_EXPORT2
U_STABLE UDisplayContext U_EXPORT2
uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
UErrorCode *pErrorCode);
#endif /* U_HIDE_DRAFT_API */
#endif /* !UCONFIG_NO_FORMATTING */
#endif /* __ULDNAMES_H__ */

View file

@ -1,7 +1,7 @@
/*
******************************************************************************
* *
* Copyright (C) 2003-2013, International Business Machines *
* Copyright (C) 2003-2014, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
@ -45,10 +45,8 @@ typedef enum ULocaleDataExemplarSetType {
ULOCDATA_ES_AUXILIARY=1,
/** Index Character set @stable ICU 4.8 */
ULOCDATA_ES_INDEX=2,
#ifndef U_HIDE_DRAFT_API
/** Punctuation set @draft ICU 51 */
/** Punctuation set @stable ICU 51 */
ULOCDATA_ES_PUNCTUATION=3,
#endif /* U_HIDE_DRAFT_API */
/** One higher than the last valid type @stable ICU 3.4 */
ULOCDATA_ES_COUNT=4
} ULocaleDataExemplarSetType;

View file

@ -259,19 +259,17 @@ typedef enum UNumberFormatPadPosition {
UNUM_PAD_AFTER_SUFFIX
} UNumberFormatPadPosition;
#ifndef U_HIDE_DRAFT_API
/**
* Constants for specifying short or long format.
* @draft ICU 51
* @stable ICU 51
*/
typedef enum UNumberCompactStyle {
/** @draft ICU 51 */
/** @stable ICU 51 */
UNUM_SHORT,
/** @draft ICU 51 */
/** @stable ICU 51 */
UNUM_LONG
/** @draft ICU 51 */
/** @stable ICU 51 */
} UNumberCompactStyle;
#endif /* U_HIDE_DRAFT_API */
/**
* Constants for specifying currency spacing
@ -884,7 +882,6 @@ typedef enum UNumberFormatAttribute {
*/
UNUM_PARSE_ALL_INPUT = UNUM_LENIENT_PARSE + 1,
#endif
#ifndef U_HIDE_DRAFT_API
/**
* Scale, which adjusts the position of the
* decimal point when formatting. Amounts will be multiplied by 10 ^ (scale)
@ -893,9 +890,8 @@ typedef enum UNumberFormatAttribute {
* <p>Example: setting the scale to 3, 123 formats as "123,000"
* <p>Example: setting the scale to -4, 123 formats as "0.0123"
*
* @draft ICU 51 */
* @stable ICU 51 */
UNUM_SCALE = UNUM_LENIENT_PARSE + 2,
#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/** Count of "regular" numeric attributes.

View file

@ -1,6 +1,6 @@
/*
*****************************************************************************************
* Copyright (C) 2013, International Business Machines
* Copyright (C) 2014, International Business Machines
* Corporation and others. All Rights Reserved.
*****************************************************************************************
*/
@ -53,66 +53,64 @@
* to open or close them.
*/
#ifndef U_HIDE_DRAFT_API
/**
* URegionType is an enumeration defining the different types of regions. Current possible
* values are URGN_WORLD, URGN_CONTINENT, URGN_SUBCONTINENT, URGN_TERRITORY, URGN_GROUPING,
* URGN_DEPRECATED, and URGN_UNKNOWN.
*
* @draft ICU 51
* @stable ICU 51
*/
typedef enum URegionType {
/**
* Type representing the unknown region.
* @draft ICU 51
* @stable ICU 51
*/
URGN_UNKNOWN,
/**
* Type representing a territory.
* @draft ICU 51
* @stable ICU 51
*/
URGN_TERRITORY,
/**
* Type representing the whole world.
* @draft ICU 51
* @stable ICU 51
*/
URGN_WORLD,
/**
* Type representing a continent.
* @draft ICU 51
* @stable ICU 51
*/
URGN_CONTINENT,
/**
* Type representing a sub-continent.
* @draft ICU 51
* @stable ICU 51
*/
URGN_SUBCONTINENT,
/**
* Type representing a grouping of territories that is not to be used in
* the normal WORLD/CONTINENT/SUBCONTINENT/TERRITORY containment tree.
* @draft ICU 51
* @stable ICU 51
*/
URGN_GROUPING,
/**
* Type representing a region whose code has been deprecated, usually
* due to a country splitting into multiple territories or changing its name.
* @draft ICU 51
* @stable ICU 51
*/
URGN_DEPRECATED,
/**
* Maximum value for this unumeration.
* @draft ICU 51
* @stable ICU 51
*/
URGN_LIMIT
} URegionType;
#endif /* U_HIDE_DRAFT_API */
#if !UCONFIG_NO_FORMATTING

View file

@ -226,15 +226,13 @@ typedef enum USpoofChecks {
*/
USPOOF_CHAR_LIMIT = 64,
#ifndef U_HIDE_DRAFT_API
/**
* Check that an identifier does not include decimal digits from
* more than one numbering system.
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_MIXED_NUMBERS = 128,
#endif /* U_HIDE_DRAFT_API */
/**
* Enable all spoof checks.
@ -243,7 +241,6 @@ typedef enum USpoofChecks {
*/
USPOOF_ALL_CHECKS = 0xFFFF,
#ifndef U_HIDE_DRAFT_API
/**
* Enable the return of auxillary (non-error) information in the
* upper bits of the check results value.
@ -254,67 +251,68 @@ typedef enum USpoofChecks {
* If this "check" is enabled, (uspoof_check() & USPOOF_ALL_CHECKS) will be zero
* when an identifier passes all checks.
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_AUX_INFO = 0x40000000
#endif /* U_HIDE_DRAFT_API */
} USpoofChecks;
#ifndef U_HIDE_DRAFT_API
/**
* Constants from UAX #39 for use in setRestrictionLevel(), and
* for returned identifier restriction levels in check results.
* @draft ICU 51
* @stable ICU 51
*/
typedef enum URestrictionLevel {
/**
* Only ASCII characters: U+0000..U+007F
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_ASCII = 0x10000000,
#ifndef U_HIDE_DRAFT_API
/**
* All characters in each identifier must be from a single script.
*
* @draft ICU 53
*/
USPOOF_SINGLE_SCRIPT_RESTRICTIVE = 0x20000000,
#endif /* U_HIDE_DRAFT_API */
/**
* All characters in each identifier must be from a single script, or from the combinations: Latin + Han +
* Hiragana + Katakana; Latin + Han + Bopomofo; or Latin + Han + Hangul. Note that this level will satisfy the
* vast majority of Latin-script users; also that TR36 has ASCII instead of Latin.
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_HIGHLY_RESTRICTIVE = 0x30000000,
/**
* Allow Latin with other scripts except Cyrillic, Greek, Cherokee Otherwise, the same as Highly Restrictive
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_MODERATELY_RESTRICTIVE = 0x40000000,
/**
* Allow arbitrary mixtures of scripts. Otherwise, the same as Moderately Restrictive.
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_MINIMALLY_RESTRICTIVE = 0x50000000,
/**
* Any valid identifiers, including characters outside of the Identifier Profile.
*
* @draft ICU 51
* @stable ICU 51
*/
USPOOF_UNRESTRICTIVE = 0x60000000,
#ifndef U_HIDE_DRAFT_API
/**
* Mask for selecting the Restriction Level bits from the return value of uspoof_check().
*
* @draft ICU 53
*/
USPOOF_RESTRICTION_LEVEL_MASK = 0x7F000000
} URestrictionLevel;
#endif /* U_HIDE_DRAFT_API */
} URestrictionLevel;
/**
* Create a Unicode Spoof Checker, configured to perform all
@ -461,16 +459,15 @@ uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status);
U_STABLE int32_t U_EXPORT2
uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status);
#ifndef U_HIDE_DRAFT_API
/**
* Set the loosest restriction level allowed. The default if this function
* is not called is HIGHLY_RESTRICTIVE.
* Calling this function also enables the RESTRICTION_LEVEL check.
* @param restrictionLevel The loosest restriction level allowed.
* @see URestrictionLevel
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT void U_EXPORT2
U_STABLE void U_EXPORT2
uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel);
@ -479,11 +476,10 @@ uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel
*
* @return The restriction level
* @see URestrictionLevel
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT URestrictionLevel U_EXPORT2
U_STABLE URestrictionLevel U_EXPORT2
uspoof_getRestrictionLevel(const USpoofChecker *sc);
#endif /* U_HIDE_DRAFT_API */
/**
* Limit characters that are acceptable in identifiers being checked to those
@ -975,7 +971,6 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
UErrorCode *status);
#endif /* U_SHOW_CPLUSPLUS_API */
#ifndef U_HIDE_DRAFT_API
/**
* Get the set of Candidate Characters for Inclusion in Identifiers, as defined

View file

@ -1,7 +1,7 @@
/*
******************************************************************************
*
* Copyright (C) 1998-2013, International Business Machines
* Copyright (C) 1998-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@ -439,15 +439,13 @@ u_fsetcodepage(const char *codepage,
U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
#if !UCONFIG_NO_FORMATTING
#ifndef U_HIDE_DRAFT_API
/**
* Returns an alias to the number formatter being used for this file.
* @param f The UFILE to get the value from
* @return alias to the number formatter (The formatter <EM>must not</EM> be modified or closed)
* @draft ICU 51
* @stable ICU 51
*/
U_DRAFT const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
#endif /* U_HIDE_DRAFT_API */
U_STABLE const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
/* Output functions */