* An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary-
* based break iteration has been folded into the base class. This class
* is deprecated as of ICU 3.6.
+ * @deprecated ICU 3.6
*/
typedef RuleBasedBreakIterator DictionaryBasedBreakIterator;
/** @internal */
class Hashtable;
+#ifndef U_HIDE_INTERNAL_API
/** @internal */
struct ListFormatData : public UMemory {
UnicodeString twoPattern;
ListFormatData(const UnicodeString& two, const UnicodeString& start, const UnicodeString& middle, const UnicodeString& end) :
twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end) {}
};
+#endif /* U_HIDE_INTERNAL_API */
/**
*/
ListFormatter& operator=(const ListFormatter& other);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Creates a ListFormatter appropriate for the default locale.
*
* @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.
- * @deprecated
- * @draft ICU 50
+ * @deprecated ICU 52 (was draft ICU 50)
*/
static ListFormatter* createInstance(UErrorCode& errorCode);
* @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.
- * @deprecated
- * @draft ICU 50
+ * @deprecated ICU 52 (was draft ICU 50)
*/
static ListFormatter* createInstance(const Locale& locale, UErrorCode& errorCode);
+#endif /* U_HIDE_DEPRECATED_API */
+#ifndef U_HIDE_INTERNAL_API
/**
* Creates a ListFormatter appropriate for a locale and style.
*
* @internal
*/
static ListFormatter* createInstance(const Locale& locale, const char* style, UErrorCode& errorCode);
+#endif /* U_HIDE_INTERNAL_API */
/**
* Destructor.
UnicodeString& format(const UnicodeString items[], int32_t n_items,
UnicodeString& appendTo, UErrorCode& errorCode) const;
+#ifndef U_HIDE_INTERNAL_API
/**
* @internal constructor made public for testing.
*/
ListFormatter(const ListFormatData* listFormatterData);
+#endif /* U_HIDE_INTERNAL_API */
private:
static void initializeHash(UErrorCode& errorCode);
/** String property Case_Folding.
Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
UCHAR_CASE_FOLDING=0x4002,
+#ifndef U_HIDE_DEPRECATED_API
/** Deprecated string property ISO_Comment.
Corresponds to u_getISOComment. @deprecated ICU 49 */
UCHAR_ISO_COMMENT=0x4003,
+#endif /* U_HIDE_DEPRECATED_API */
/** String property Lowercase_Mapping.
Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
UCHAR_LOWERCASE_MAPPING=0x4004,
/** String property Titlecase_Mapping.
Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
UCHAR_TITLECASE_MAPPING=0x400A,
+#ifndef U_HIDE_DEPRECATED_API
/** String property Unicode_1_Name.
This property is of little practical value.
Beginning with ICU 49, ICU APIs return an empty string for this property.
Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */
UCHAR_UNICODE_1_NAME=0x400B,
+#endif /* U_HIDE_DEPRECATED_API */
/** String property Uppercase_Mapping.
Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
UCHAR_UPPERCASE_MAPPING=0x400C,
* (YEAR_WOY and WEEK_OF_YEAR) to an extended year in the case
* where YEAR, EXTENDED_YEAR are not set.
* The Calendar implementation assumes yearWoy is in extended gregorian form
- * @internal
* @return the extended year, UCAL_EXTENDED_YEAR
+ * @internal
*/
virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy);
#endif /* !UCONFIG_NO_SERVICE */
/**
- * @internal
* @return TRUE if this calendar has a default century (i.e. 03 -> 2003)
+ * @internal
*/
virtual UBool haveDefaultCentury() const = 0;
/**
- * @internal
* @return the start of the default century, as a UDate
+ * @internal
*/
virtual UDate defaultCenturyStart() const = 0;
/**
- * @internal
* @return the beginning year of the default century, as a year
+ * @internal
*/
virtual int32_t defaultCenturyStartYear() const = 0;
*/
DecimalFormatSymbols(UErrorCode& status);
+#ifndef U_HIDE_DRAFT_API
/**
* Creates a DecimalFormatSymbols object with last-resort data.
* Intended for callers who cache the symbols data and
* @draft ICU 52
*/
static DecimalFormatSymbols* createWithLastResortData(UErrorCode& status);
+#endif /* U_HIDE_DRAFT_API */
/**
* Copy constructor.
void setCurrencyForSymbols();
public:
+#ifndef U_HIDE_INTERNAL_API
/**
* _Internal_ function - more efficient version of getSymbol,
* returning a const reference to one of the symbol strings.
*/
inline const UnicodeString &getConstSymbol(ENumberFormatSymbol symbol) const;
-#ifndef U_HIDE_INTERNAL_API
/**
* Returns that pattern stored in currecy info. Internal API for use by NumberFormat API.
* @internal
return *strPtr;
}
+#ifndef U_HIDE_INTERNAL_API
+
inline const UnicodeString &
DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
const UnicodeString *strPtr;
return *strPtr;
}
+#endif /* U_HIDE_INTERNAL_API */
+
// -------------------------------------
*/
static const char fgNumberPatterns[];
+#ifndef U_HIDE_INTERNAL_API
/**
* Get a FixedDecimal corresponding to a double as it would be
* formatted by this DecimalFormat.
* @internal
*/
FixedDecimal getFixedDecimal(DigitList &number, UErrorCode &status) const;
+#endif /* U_HIDE_INTERNAL_API */
public:
* Also, the first date appears in an interval pattern could be
* the earlier date or the later date.
* And such information is saved in the interval pattern as well.
- * @internal ICU 4.0
*/
struct PatternInfo {
UnicodeString firstPart;
* @param dtItvInfo the DateIntervalInfo object to be adopted.
* @param skeleton the skeleton of the date formatter
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
DateIntervalFormat(const Locale& locale, DateIntervalInfo* dtItvInfo,
const UnicodeString* skeleton, UErrorCode& status);
* @param skeleton the skeleton of this formatter.
* @param status Output param set to success/failure code.
* @return a date time interval formatter which the caller owns.
- * @internal ICU 4.0
*/
static DateIntervalFormat* U_EXPORT2 create(const Locale& locale,
DateIntervalInfo* dtitvinf,
* If it is failure, the returned date formatter will
* be NULL.
* @return a simple date formatter which the caller owns.
- * @internal ICU 4.0
*/
static SimpleDateFormat* U_EXPORT2 createSDFPatternInstance(
const UnicodeString& skeleton,
* On output: the offsets of the alignment field.
* @param status output param set to success/failure code on exit
* @return Reference to 'appendTo' parameter.
- * @internal ICU 4.0
*/
UnicodeString& fallbackFormat(Calendar& fromCalendar,
Calendar& toCalendar,
*
*
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void initializePattern(UErrorCode& status);
* @param field the largest different calendar field
* @param skeleton a skeleton
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void setFallbackPattern(UCalendarDateFields field,
const UnicodeString& skeleton,
* @param normalizedTime Output parameter for normalized time only
* skeleton.
*
- * @internal ICU 4.0
*/
static void U_EXPORT2 getDateTimeSkeleton(const UnicodeString& skeleton,
UnicodeString& date,
* @return whether the resource is found for the skeleton.
* TRUE if interval pattern found for the skeleton,
* FALSE otherwise.
- * @internal ICU 4.0
*/
UBool setSeparateDateTimePtn(const UnicodeString& dateSkeleton,
const UnicodeString& timeSkeleton);
* through extending skeleton or not.
* TRUE if interval pattern is found by
* extending skeleton, FALSE otherwise.
- * @internal ICU 4.0
*/
UBool setIntervalPattern(UCalendarDateFields field,
const UnicodeString* skeleton,
* 1 means only field width differs
* 2 means v/z exchange
* @param adjustedIntervalPattern adjusted interval pattern
- * @internal ICU 4.0
*/
static void U_EXPORT2 adjustFieldWidth(
const UnicodeString& inputSkeleton,
* @param datePattern date pattern
* @param field time calendar field: AM_PM, HOUR, MINUTE
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void concatSingleDate2TimeInterval(const UChar* format,
int32_t formatLen,
* @param field calendar field need to check
* @param skeleton given skeleton on which to check the calendar field
* @return true if field present in a skeleton.
- * @internal ICU 4.0
*/
static UBool U_EXPORT2 fieldExistsInSkeleton(UCalendarDateFields field,
const UnicodeString& skeleton);
* Split interval patterns into 2 part.
* @param intervalPattern interval pattern
* @return the index in interval pattern which split the pattern into 2 part
- * @internal ICU 4.0
*/
static int32_t U_EXPORT2 splitPatternInto2Part(const UnicodeString& intervalPattern);
* Break interval patterns as 2 part and save them into pattern info.
* @param field calendar field
* @param intervalPattern interval pattern
- * @internal ICU 4.0
*/
void setIntervalPattern(UCalendarDateFields field,
const UnicodeString& intervalPattern);
* @param field calendar field
* @param intervalPattern interval pattern
* @param laterDateFirst whether later date appear first in interval pattern
- * @internal ICU 4.0
*/
void setIntervalPattern(UCalendarDateFields field,
const UnicodeString& intervalPattern,
* @param secondPart the second part in interval pattern
* @param laterDateFirst whether the first date in intervalPattern
* is earlier date or later date
- * @internal ICU 4.0
*/
void setPatternInfo(UCalendarDateFields field,
const UnicodeString* firstPart,
/*
*******************************************************************************
- * Copyright (C) 2008-2011, International Business Machines Corporation and
+ * Copyright (C) 2008-2011,2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* Initialize the DateIntervalInfo from locale
* @param locale the given locale.
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void initializeData(const Locale& locale, UErrorCode& status);
* @param intervalPattern the interval pattern on the largest different
* calendar unit.
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void setIntervalPatternInternally(const UnicodeString& skeleton,
UCalendarDateFields lrgDiffCalUnit,
* -1, if there is calendar field difference between
* the best match and the input skeleton
* @return best match skeleton
- * @internal ICU 4.0
*/
const UnicodeString* getBestSkeleton(const UnicodeString& skeleton,
int8_t& bestMatchDistanceInfo) const;
* and adjust pattern field width.
* @param skeleton skeleton to be parsed
* @param skeletonFieldWidth parsed skeleton field width
- * @internal ICU 4.0
*/
static void U_EXPORT2 parseSkeleton(const UnicodeString& skeleton,
int32_t* skeletonFieldWidth);
* @param patternLetter pattern letter char
* @return true if one field width is numeric and the other is string,
* false otherwise.
- * @internal ICU 4.0
*/
static UBool U_EXPORT2 stringNumeric(int32_t fieldWidth,
int32_t anotherFieldWidth,
* @param field calendar field
* @param status output param set to success/failure code on exit
* @return interval pattern index in hash table
- * @internal ICU 4.0
*/
static IntervalPatternIndex U_EXPORT2 calendarFieldToIntervalIndex(
UCalendarDateFields field,
* delete hash table (of type fIntervalPatterns).
*
* @param hTable hash table to be deleted
- * @internal ICU 4.0
*/
void deleteHash(Hashtable* hTable);
*
* @param status output param set to success/failure code on exit
* @return hash table initialized
- * @internal ICU 4.0
*/
Hashtable* initHash(UErrorCode& status);
* @param source the source to copy from
* @param target the target to copy to
* @param status output param set to success/failure code on exit
- * @internal ICU 4.0
*/
void copyHash(const Hashtable* source, Hashtable* target, UErrorCode& status);
*/
static UClassID U_EXPORT2 getStaticClassID();
+#ifndef U_HIDE_DRAFT_API
/**
* Convert the UFormattable to a Formattable. Internally, this is a reinterpret_cast.
* @param fmt a valid UFormattable
* @draft ICU 52
*/
inline const UFormattable *toUFormattable() const;
+#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DEPRECATED_API
/**
}
#endif /* U_HIDE_DEPRECATED_API */
+#ifndef U_HIDE_DRAFT_API
inline UFormattable* Formattable::toUFormattable() {
return reinterpret_cast<UFormattable*>(this);
}
inline const Formattable* Formattable::fromUFormattable(const UFormattable *fmt) {
return reinterpret_cast<const Formattable *>(fmt);
}
+#endif /* U_HIDE_DRAFT_API */
U_NAMESPACE_END
* (Gregorian) 00:00:00 UTC, that is, October 4, 1582 (Julian) is followed
* by October 15, 1582 (Gregorian). This corresponds to Julian day number
* 2299161. This is measured from the standard epoch, not in Julian Days.
- * @internal
*/
UDate fGregorianCutover;
public: // internal implementation
/**
- * @internal
* @return TRUE if this calendar has the notion of a default century
+ * @internal
*/
virtual UBool haveDefaultCentury() const;
/**
- * @internal
* @return the start of the default century
+ * @internal
*/
virtual UDate defaultCenturyStart() const;
/**
- * @internal
* @return the beginning year of the default century
+ * @internal
*/
virtual int32_t defaultCenturyStartYear() const;
};
* for public consumption.
* @param listCount Output parameter to receive the size of array
* @return The array of formattable types in the pattern
- * @internal
*/
const Formattable::Type* getArgTypeList(int32_t& listCount) const {
listCount = argTypeCount;
/**
* A DummyFormatter that we use solely to store a NULL value. UHash does
* not support storing NULL values.
- * @internal
*/
class U_I18N_API DummyFormat : public Format {
public:
*/
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UPluralType type, UErrorCode& status);
+#ifndef U_HIDE_INTERNAL_API
/**
* Return a StringEnumeration over the locales for which there is plurals data.
* @return a StringEnumeration over the locales available.
* @internal
*/
static UBool hasOverride(const Locale &locale);
+#endif /* U_HIDE_INTERNAL_API */
/**
* Given a number, returns the keyword of the first rule that applies to
*/
UnicodeString select(double number) const;
+#ifndef U_HIDE_INTERNAL_API
/**
* @internal
*/
UnicodeString select(const FixedDecimal &number) const;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Returns a list of all rule keywords used in this <code>PluralRules</code>
*/
UnicodeString getKeywordOther() const;
+#ifndef U_HIDE_INTERNAL_API
/**
*
* @internal
*/
UnicodeString getRules() const;
+#endif /* U_HIDE_INTERNAL_API */
/**
* Compares the equality of two PluralRules objects.
* or in a UText, using
* <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
*
- * @internal
*/
RegexMatcher *matcher(const UChar *input,
UErrorCode &status) const;
* or in a UText, using
* <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
*
- * @internal
*/
RegexMatcher(const UnicodeString ®exp, const UChar *input,
uint32_t flags, UErrorCode &status);
* or in a UText, using
* <code>utext_openUChars(UText *ut, const UChar *text, int64_t textLength, UErrorCode *status);</code>
*
- * @internal
*/
RegexMatcher &reset(const UChar *input);
public:
/**
* Default Constructor. Internal - use factory methods only.
- *
- * @internal
*/
Region();
*
* If the region data has already loaded, then this method simply returns without doing
* anything meaningful.
- * @internal
*/
static void loadRegionData();
static const UChar* getRegion(const UnicodeString& id);
public:
+#ifndef U_HIDE_INTERNAL_API
/**
* Returns the region code associated with the given zone,
* or NULL if the zone is not known.
* @internal
*/
static const UChar* getRegion(const UnicodeString& id, UErrorCode& status);
+#endif /* U_HIDE_INTERNAL_API */
private:
/**
* Number of UTimeZoneFormatGMTOffsetPatternType types.
* @internal
*/
- UTZFMT_PAT_COUNT
+ UTZFMT_PAT_COUNT = 6
} UTimeZoneFormatGMTOffsetPatternType;
/**
* @stable ICU 2.0
*/
UCOL_STRENGTH,
+#ifndef U_HIDE_DEPRECATED_API
/** When turned on, this attribute positions Hiragana before all
* non-ignorables on quaternary level This is a sneaky way to produce JIS
* sort order.
* Since ICU 50, this attribute is not settable any more via API functions.
* @deprecated ICU 50 Implementation detail, cannot be set via API, might be removed from implementation.
*/
- UCOL_HIRAGANA_QUATERNARY_MODE,
+ UCOL_HIRAGANA_QUATERNARY_MODE = UCOL_STRENGTH + 1,
+#endif /* U_HIDE_DEPRECATED_API */
/** When turned on, this attribute generates a collation key
* for the numeric value of substrings of digits.
* This is a way to get '100' to sort AFTER '2'. Note that the longest
* separate digit substring associated with a separate collation element.
* @stable ICU 2.8
*/
- UCOL_NUMERIC_COLLATION,
+ UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2,
/**
* The number of UColAttribute constants.
* @stable ICU 2.0
U_STABLE UBool U_EXPORT2
ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
-
+#ifndef U_HIDE_INTERNAL_API
/**
* Get an iterator over the set of detectable charsets -
* over the charsets that are enabled by the specified charset detector.
* the specified charset detector.
* @internal
*/
-U_DRAFT UEnumeration * U_EXPORT2
+U_INTERNAL UEnumeration * U_EXPORT2
ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
/**
* is not supported, U_ILLEGAL_ARGUMENT_ERROR is set.
* @internal
*/
-U_DRAFT void U_EXPORT2
+U_INTERNAL void U_EXPORT2
ucsdet_setDetectableCharset(UCharsetDetector *ucsd, const char *encoding, UBool enabled, UErrorCode *status);
+#endif /* U_HIDE_INTERNAL_API */
#endif
#endif /* __UCSDET_H */
UDAT_BOOLEAN_ATTRIBUTE_COUNT
} UDateFormatBooleanAttribute;
-
+#ifndef U_HIDE_INTERNAL_API
/**
* Get a boolean attribute associated with a UDateFormat.
* An example would be a true value for a key of UDAT_PARSE_ALLOW_WHITESPACE indicating allowing whitespace leniency.
U_INTERNAL void U_EXPORT2
udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool, UErrorCode* status);
+#endif /* U_HIDE_INTERNAL_API */
+
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
+#ifndef U_HIDE_DRAFT_API
+
#include "unicode/localpointer.h"
/**
*/
U_DRAFT const char * U_EXPORT2
ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status);
+#endif /* U_HIDE_DRAFT_API */
#endif
*/
UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN,
#endif /* U_HIDE_DEPRECATED_API */
- UNUM_ROUND_HALFDOWN,
+ UNUM_ROUND_HALFDOWN = UNUM_ROUND_HALFEVEN + 1,
UNUM_ROUND_HALFUP,
/**
* ROUND_UNNECESSARY reports an error if formatted result is not exact.
UFieldPosition* pos,
UErrorCode* status);
+#ifndef U_HIDE_DRAFT_API
/**
* Format a UFormattable into a string.
* @param fmt the formatter to use
int32_t resultLength,
UFieldPosition *pos,
UErrorCode *status);
+#endif /* U_HIDE_DRAFT_API */
/**
* Parse a string into an integer using a UNumberFormat.
UChar* currency,
UErrorCode* status);
+#ifndef U_HIDE_DRAFT_API
/**
* Parse a UChar string into a UFormattable.
* Example code:
int32_t textLength,
int32_t* parsePos, /* 0 = start */
UErrorCode* status);
+#endif /* U_HIDE_DRAFT_API */
/**
* Set the pattern used by a UNumberFormat. This can only be used
* This is an internal ICU API. Do not use.
* @internal
*/
- UNUM_PARSE_ALL_INPUT,
+ UNUM_PARSE_ALL_INPUT = UNUM_LENIENT_PARSE + 1,
#endif
#ifndef U_HIDE_DRAFT_API
/**
UNUM_SCALE = UNUM_LENIENT_PARSE + 2,
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_INTERNAL_API
/** Count of "regular" numeric attributes.
* @internal */
- UNUM_NUMERIC_ATTRIBUTE_COUNT,
+ UNUM_NUMERIC_ATTRIBUTE_COUNT = UNUM_LENIENT_PARSE + 3,
/** One below the first bitfield-boolean item.
* All items after this one are stored in boolean form.
* @internal */
UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF,
+#endif /* U_HIDE_INTERNAL_API */
/** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating.
* For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing.
*/
UNUM_PARSE_NO_EXPONENT,
+#ifndef U_HIDE_INTERNAL_API
/** Limit of boolean attributes.
* @internal */
UNUM_LIMIT_BOOLEAN_ATTRIBUTE
+#endif /* U_HIDE_INTERNAL_API */
} UNumberFormatAttribute;
/**