ICU-1953 Check APIs comments for @param, @return...

X-SVN-Rev: 9024
This commit is contained in:
GCL Shanghai 2002-07-03 12:05:56 +00:00
parent 80dfca0dc5
commit bcb21ca4f1
35 changed files with 588 additions and 99 deletions

View file

@ -103,6 +103,8 @@ public:
/**
* Constructor. Creates the BreakDictionary by using readDictionaryFile() to
* load the dictionary tables from the disk.
* @param dictionaryFilename The name of the dictionary file
* @param status for errors if it occurs
*/
BreakDictionary(const char* dictionaryFilename, UErrorCode& status);
@ -114,6 +116,7 @@ public:
/**
* Reads the dictionary file on the disk and constructs the appropriate in-memory
* representation.
* @param in The given memory stream
*/
void readDictionaryFile(UMemoryStream* in);
@ -161,6 +164,9 @@ private:
/**
* Given (logical) row and column numbers, returns true if the
* cell in that position is populated
* @param row The LOGICAL row number of the cell
* @param col The PHYSICAL row number of the cell
* @return true if the cell in that position is populated
*/
UBool cellIsPopulated(int32_t row, int32_t col) const;

View file

@ -44,6 +44,10 @@ public:
//=======================================================================
// constructor
//=======================================================================
/* @param dictionaryFilename The name of the dictionary file
* @param status The error code
* @return the newly created DictionaryBasedBreakIteratorTables
**/
DictionaryBasedBreakIteratorTables(const char* dictionaryFilename,
UErrorCode& status);
@ -74,6 +78,8 @@ private:
/**
* The copy constructor is declared private and not implemented.
* THIS CLASS MAY NOT BE COPIED.
* @param that The DictionaryBasedBreakIteratorTables to be copied.
* @return the newly constructed DictionaryBasedBreakIteratorTables.
*/
DictionaryBasedBreakIteratorTables(const DictionaryBasedBreakIteratorTables& that);
@ -86,6 +92,8 @@ private:
* The assignment operator is declared private and not implemented.
* THIS CLASS MAY NOT BE COPIED.
* Call addReference() and share an existing copy instead.
* @that The object to be copied
* @return the newly created DictionaryBasedBreakIteratorTables.
*/
DictionaryBasedBreakIteratorTables& operator=(
const DictionaryBasedBreakIteratorTables& that);

View file

@ -66,17 +66,31 @@ public:
DigitList();
~DigitList();
/* copy constructor
* @param DigitList The object to be copied.
* @return the newly created object.
*/
DigitList(const DigitList&); // copy constructor
/* assignment operator
* @param DigitList The object to be copied.
* @return the newly created object.
*/
DigitList& operator=(const DigitList&); // assignment operator
/**
* Return true if another object is semantically equal to this one.
* @param other The DigitList to be compared for equality
* @return true if another object is semantically equal to this one.
* return false otherwise.
*/
UBool operator==(const DigitList& other) const;
/**
* Return true if another object is semantically unequal to this one.
* @param other The DigitList to be compared for inequality
* @return true if another object is semantically unequal to this one.
* return false otherwise.
*/
UBool operator!=(const DigitList& other) const { return !operator==(other); }
@ -92,12 +106,14 @@ public:
/**
* Appends digits to the list. Ignores all digits beyond the first DBL_DIG,
* since they are not significant for either longs or doubles.
* @param digit The digit to be appended.
*/
inline void append(char digit);
/**
* Utility routine to get the value of the digit list
* Returns 0.0 if zero length.
* @return the value of the digit list.
*/
double getDouble(void);
@ -105,12 +121,16 @@ public:
* Utility routine to get the value of the digit list
* Make sure that fitsIntoLong() is called before calling this function.
* Returns 0 if zero length.
* @return the value of the digit list, return 0 if it is zero length
*/
int32_t getLong(void);
/**
* Return true if the number represented by this object can fit into
* a long.
* @param ignoreNegativeZero True if negative zero is ignored.
* @return true if the number represented by this object can fit into
* a long, return false otherwise.
*/
UBool fitsIntoLong(UBool ignoreNegativeZero);
@ -118,6 +138,9 @@ public:
* Utility routine to set the value of the digit list from a double
* Input must be non-negative, and must not be Inf, -Inf, or NaN.
* The maximum fraction digits helps us round properly.
* @param source The value to be set
* @param maximunDigits The maximum number of digits to be shown
* @param fixedPoint True if the point is fixed
*/
void set(double source, int32_t maximumDigits, UBool fixedPoint = TRUE);
@ -125,11 +148,14 @@ public:
* Utility routine to set the value of the digit list from a long.
* If a non-zero maximumDigits is specified, no more than that number of
* significant digits will be produced.
* @param source The value to be set
* @param maximunDigits The maximum number of digits to be shown
*/
void set(int32_t source, int32_t maximumDigits = 0);
/**
* Return true if this is a representation of zero.
* @return true if this is a representation of zero.
*/
UBool isZero(void) const;
@ -143,14 +169,14 @@ public:
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @return a UClassID for the actual class.
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @returns a UClassID for this class.
* @draft ICU 2.2
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
@ -196,6 +222,7 @@ private:
/**
* Initializes the buffer that records the mimimum long value.
* @param maximumDigits The maximum number of digits to be shown.
*/
/*static void initializeLONG_MIN_REP(void);*/

View file

@ -28,6 +28,11 @@ class U_COMMON_API Hashtable : public UObject {
UHashtable* hash;
public:
/**
* Construct a hashtable
* @param ignoreKeyCase If true, keys are case insensitive.
* @param status Error code
*/
Hashtable(UBool ignoreKeyCase, UErrorCode& status);
/**

View file

@ -20,7 +20,7 @@
#include "unicode/utypes.h"
/* These are the cleanup functions for various APIs. */
/* @return true if cleanup complete successfully.*/
U_CFUNC UBool unames_cleanup(void);
U_CFUNC UBool unorm_cleanup(void);
@ -34,6 +34,7 @@ U_CFUNC UBool uloc_cleanup(void);
U_CFUNC UBool ustring_cleanup(void);
/* @deprecated this functionality is going away */
/* @return true if cleanup complete successfully*/
U_CFUNC UBool UnicodeConverter_cleanup(void);
U_CAPI UBool U_EXPORT2 ucnv_cleanup(void);

View file

@ -72,6 +72,7 @@ U_CAPI CompactByteArray* U_EXPORT2 ucmp8_open(int8_t defaultValue);
* @param indexArray the index array to be adopted
* @param newValues the value array to be adopted
* @param count the number of entries in the value array
* @return the newly constructed ComapctByteArray
* @see compact
*/
U_CAPI CompactByteArray* U_EXPORT2 ucmp8_openAdopt(uint16_t* indexArray,
@ -88,6 +89,7 @@ U_CAPI CompactByteArray* U_EXPORT2 ucmp8_openAdopt(uint16_t* indexArray,
* @param indexArray the index array to be adopted
* @param newValues the value array to be adopted
* @param count the number of entries in the value array
* @return the newly constructed CompactByteArray
* @see compact
*/
U_CAPI CompactByteArray* U_EXPORT2 ucmp8_openAlias(uint16_t* indexArray,
@ -125,9 +127,11 @@ U_CAPI void U_EXPORT2 ucmp8_initBogus(CompactByteArray* array);
* may re-use blocks at any position in the values array. The indexArray and newValues
* will be uprv_free'd when ucmp16_close() is called.
*
* @param this_obj An uninitialized CompactByteArray
* @param indexArray the index array to be adopted
* @param newValues the value array to be adopted
* @param count the number of entries in the value array
* @return the pointer refers to the CompactByteArray
* @see compact
*/
U_CAPI CompactByteArray* U_EXPORT2 ucmp8_initAdopt(CompactByteArray *this_obj,
@ -142,9 +146,11 @@ U_CAPI CompactByteArray* U_EXPORT2 ucmp8_initAdopt(CompactByteArray *this_obj,
* that are on a block boundary. The pre-computed arrays passed in to this constructor
* may re-use blocks at any position in the values array.
*
* @param this_obj An uninitialized CompactByteArray
* @param indexArray the index array to be adopted
* @param newValues the value array to be adopted
* @param count the number of entries in the value array
* @return the pointer refers to the CompactByteArray
* @see compact
*/
U_CAPI CompactByteArray* U_EXPORT2 ucmp8_initAlias(CompactByteArray *this_obj,
@ -163,6 +169,8 @@ U_CAPI void U_EXPORT2 ucmp8_close(CompactByteArray* array);
/**
* Returns TRUE if the creation of the compact array fails.
* @param array The CompactByteArray to be created.
* @return TRUE if the creation of the compact array fails.
*/
U_CAPI UBool U_EXPORT2 ucmp8_isBogus(const CompactByteArray* array);
@ -181,6 +189,7 @@ U_CAPI UBool U_EXPORT2 ucmp8_isBogus(const CompactByteArray* array);
* Set a new value for a Unicode character.
* Set automatically expands the array if it is compacted.
*
* @param array the CompactByteArray to be set
* @param character the character to set the mapped value with
* @param value the new mapped value
*/
@ -191,6 +200,7 @@ U_CAPI void U_EXPORT2 ucmp8_set(CompactByteArray* array,
/**
* Set new values for a range of Unicode character.
*
* @param array the CompactByteArray to be set
* @param start the starting offset of the range
* @param end the ending offset of the range
* @param value the new mapped value
@ -211,11 +221,14 @@ U_CAPI const uint16_t* U_EXPORT2 ucmp8_getIndex(const CompactByteArray* array);
* If values stored in the array tend to repeat in cycles of, say, 16,
* then using that will be faster than cycle = 1, and get almost the
* same compression.
* @param array The CompactByteArray to be compacted
* @param cycle The value determines how large the overlap can be.
*/
U_CAPI void U_EXPORT2 ucmp8_compact(CompactByteArray* array,
uint32_t cycle);
/** Expanded takes the array back to a 65536 element array*/
/* @param array The CompactByteArray to be expanded*/
U_CAPI void U_EXPORT2 ucmp8_expand(CompactByteArray* array);
/** (more) INTERNAL USE ONLY **/

View file

@ -24,14 +24,20 @@
#include "ucnv_bld.h"
/* figures out if we need to go to file to read in the data tables.
* @param converterName The name of the converter
* @param err The error code
* @return the newly created converter
*/
UConverter *ucnv_createConverter (const char *converterName, UErrorCode * err);
/* Stores the shared data in the SHARED_DATA_HASHTABLE
* @param data The shared data
*/
void ucnv_shareConverterData (UConverterSharedData * data);
/* gets the shared data from the SHARED_DATA_HASHTABLE (might return NULL if it isn't there)
* @param name The name of the shared data
* @return the shared data from the SHARED_DATA_HASHTABLE
*/
UConverterSharedData *ucnv_getSharedConverterData (const char *name);
@ -39,10 +45,15 @@ UConverterSharedData *ucnv_getSharedConverterData (const char *name);
* see if anyone is using it, if not it frees all the memory stemming from sharedConverterData and
* returns TRUE,
* otherwise returns FALSE
* @param sharedConverterData The shared data
* @return if not it frees all the memory stemming from sharedConverterData and
* returns TRUE, otherwise returns FALSE
*/
UBool ucnv_deleteSharedConverterData (UConverterSharedData * sharedConverterData);
/* returns true if "name" is in algorithmicConverterNames
* @param name The converter name.
* @return TRUE if "name" is in algorithmicConverterNames.
*/
UBool ucnv_isDataBasedConverter (const char *name);

View file

@ -23,12 +23,18 @@
* The alias is searched for case-insensitively, the converter name
* is returned in mixed-case.
* Returns NULL if the alias is not found.
* @param alias The alias name to be searched.
* @pErrorCode The error code
* @return the converter name in mixed-case, return NULL if the alias is not found.
*/
U_CFUNC const char *
ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode);
/**
* The count for ucnv_io_getAliases and ucnv_io_getAlias
* @param alias The alias name to be counted
* @pErrorCode The error code
* @return the alias count
*/
U_CFUNC uint16_t
ucnv_io_countAliases(const char *alias, UErrorCode *pErrorCode);
@ -41,6 +47,10 @@ ucnv_io_countAliases(const char *alias, UErrorCode *pErrorCode);
* There are as many strings in this list as the return value specifies.
* Returns the number of aliases including the canonical converter name,
* or 0 if the alias is not found.
* @param alias The canonical converter name
* @param start
* @param aliases A pointer to the list of aliases for the actual converter
* @return the number of aliases including the canonical converter name, or 0 if the alias is not found.
*/
U_CFUNC uint16_t
ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErrorCode *pErrorCode);
@ -49,18 +59,26 @@ ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErr
* Search case-insensitively for a converter alias and return
* the (n)th alias.
* Returns NULL if the alias is not found.
* @param alias The converter alias
* @param n The number specifies which alias to get
* @pErrorCode The error code
* @return the (n)th alias and return NULL if the alias is not found.
*/
U_CFUNC const char *
ucnv_io_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode);
/**
* Return the number of all standard names.
* @param pErrorCode The error code
* @return the number of all standard names
*/
U_CFUNC uint16_t
ucnv_io_countStandards(UErrorCode *pErrorCode);
/**
* Return the number of all converter names.
* @param pErrorCode The error code
* @return the number of all converter names
*/
U_CFUNC uint16_t
ucnv_io_countAvailableConverters(UErrorCode *pErrorCode);
@ -69,6 +87,9 @@ ucnv_io_countAvailableConverters(UErrorCode *pErrorCode);
* Return the (n)th converter name in mixed case, or NULL
* if there is none (typically, if the data cannot be loaded).
* 0<=index<ucnv_io_countAvailableConverters().
* @param n The number specifies which converter name to get
* @param pErrorCode The error code
* @return the (n)th converter name in mixed case, or NULL if there is none.
*/
U_CFUNC const char *
ucnv_io_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode);
@ -76,6 +97,8 @@ ucnv_io_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode);
/**
* Fill an array const char *aliases[ucnv_io_countAvailableConverters()]
* with pointers to all converter names in mixed-case.
* @param aliases The alias array to be filled
* @param pErrorCode The error code
*/
U_CFUNC void
ucnv_io_fillAvailableConverters(const char **aliases, UErrorCode *pErrorCode);
@ -90,6 +113,8 @@ ucnv_io_flushAvailableConverterCache(void);
/**
* Return the number of all aliases (and converter names).
* @param pErrorCode The error code
* @return the number of all aliases
*/
U_CFUNC uint16_t
ucnv_io_countAvailableAliases(UErrorCode *pErrorCode);
@ -97,12 +122,14 @@ ucnv_io_countAvailableAliases(UErrorCode *pErrorCode);
/**
* Get the name of the default converter.
* This name is already resolved by <code>ucnv_io_getConverterName()</code>.
* @return the name of the default converter
*/
U_CFUNC const char *
ucnv_io_getDefaultConverterName(void);
/**
* Set the name of the default converter.
* @param name The name set to the default converter
*/
U_CFUNC void
ucnv_io_setDefaultConverterName(const char *name);

View file

@ -225,6 +225,7 @@ uhash_close(UHashtable *hash);
/**
* Set the function used to hash keys.
* @param hash The UHashtable to set
* @param fn the function to be used hash keys; must not be NULL
* @return the previous key hasher; non-NULL
*/
@ -234,6 +235,7 @@ uhash_setKeyHasher(UHashtable *hash, UHashFunction fn);
/**
* Set the function used to compare keys. The default comparison is a
* void* pointer comparison.
* @param hash The UHashtable to set
* @param fn the function to be used compare keys; must not be NULL
* @return the previous key comparator; non-NULL
*/
@ -246,6 +248,7 @@ uhash_setKeyComparator(UHashtable *hash, UKeyComparator fn);
* hashtable does delete keys. This function should be set once
* before any elements are added to the hashtable and should not be
* changed thereafter.
* @param hash The UHashtable to set
* @param fn the function to be used delete keys, or NULL
* @return the previous key deleter; may be NULL
*/
@ -258,6 +261,7 @@ uhash_setKeyDeleter(UHashtable *hash, UObjectDeleter fn);
* this hashtable does delete values. This function should be set
* once before any elements are added to the hashtable and should not
* be changed thereafter.
* @param hash The UHashtable to set
* @param fn the function to be used delete values, or NULL
* @return the previous value deleter; may be NULL
*/
@ -268,6 +272,8 @@ uhash_setValueDeleter(UHashtable *hash, UObjectDeleter fn);
* Specify whether or not, and how, the hastable resizes itself.
* By default, tables grow but do not shrink (policy U_GROW).
* See enum UHashResizePolicy.
* @param hash The UHashtable to set
* @param policy The way the hashtable resizes itself, {U_GROW, U_GROW_AND_SHRINK, U_FIXED}
*/
U_CAPI void U_EXPORT2
uhash_setResizePolicy(UHashtable *hash, enum UHashResizePolicy policy);
@ -456,12 +462,16 @@ uhash_removeElement(UHashtable *hash, const UHashElement* e);
/**
* Return a UHashTok for an integer.
* @param i The given integer
* @return a UHashTok for an integer.
*/
U_CAPI UHashTok U_EXPORT2
uhash_toki(int32_t i);
/**
* Return a UHashTok for a pointer.
* @param p The given pointer
* @return a UHashTok for a pointer.
*/
U_CAPI UHashTok U_EXPORT2
uhash_tokp(void* p);
@ -507,6 +517,9 @@ uhash_hashIChars(const UHashTok key);
/**
* Comparator for null-terminated UChar* strings. Use together with
* uhash_hashUChars.
* @param key1 The string for comparison
* @param key2 The string for comparison
* @return true if key1 and key2 are equal, return false otherwise.
*/
U_CAPI UBool U_EXPORT2
uhash_compareUChars(const UHashTok key1, const UHashTok key2);
@ -514,6 +527,9 @@ uhash_compareUChars(const UHashTok key1, const UHashTok key2);
/**
* Comparator for null-terminated char* strings. Use together with
* uhash_hashChars.
* @param key1 The string for comparison
* @param key2 The string for comparison
* @return true if key1 and key2 are equal, return false otherwise.
*/
U_CAPI UBool U_EXPORT2
uhash_compareChars(const UHashTok key1, const UHashTok key2);
@ -521,6 +537,9 @@ uhash_compareChars(const UHashTok key1, const UHashTok key2);
/**
* Case-insensitive comparator for null-terminated char* strings. Use
* together with uhash_hashIChars.
* @param key1 The string for comparison
* @param key2 The string for comparison
* @return true if key1 and key2 are equal, return false otherwise.
*/
U_CAPI UBool U_EXPORT2
uhash_compareIChars(const UHashTok key1, const UHashTok key2);
@ -531,6 +550,8 @@ uhash_compareIChars(const UHashTok key1, const UHashTok key2);
/**
* Hash function for UnicodeString* keys.
* @param key The string (const char*) to hash.
* @return A hash code for the key.
*/
U_CAPI int32_t U_EXPORT2
uhash_hashUnicodeString(const UHashTok key);
@ -538,12 +559,17 @@ uhash_hashUnicodeString(const UHashTok key);
/**
* Hash function for UnicodeString* keys (case insensitive).
* Make sure to use together with uhash_compareCaselessUnicodeString.
* @param key The string (const char*) to hash.
* @return A hash code for the key.
*/
U_CAPI int32_t U_EXPORT2
uhash_hashCaselessUnicodeString(const UHashTok key);
/**
* Comparator function for UnicodeString* keys.
* @param key1 The string for comparison
* @param key2 The string for comparison
* @return true if key1 and key2 are equal, return false otherwise.
*/
U_CAPI UBool U_EXPORT2
uhash_compareUnicodeString(const UHashTok key1, const UHashTok key2);
@ -551,12 +577,16 @@ uhash_compareUnicodeString(const UHashTok key1, const UHashTok key2);
/**
* Comparator function for UnicodeString* keys (case insensitive).
* Make sure to use together with uhash_hashCaselessUnicodeString.
* @param key1 The string for comparison
* @param key2 The string for comparison
* @return true if key1 and key2 are equal, return false otherwise.
*/
U_CAPI UBool U_EXPORT2
uhash_compareCaselessUnicodeString(const UHashTok key1, const UHashTok key2);
/**
* Deleter function for UnicodeString* keys or values.
* @param obj The object to be deleted
*/
U_CAPI void U_EXPORT2
uhash_deleteUnicodeString(void *obj);
@ -567,12 +597,17 @@ uhash_deleteUnicodeString(void *obj);
/**
* Hash function for 32-bit integer keys.
* @param key The string (const char*) to hash.
* @return A hash code for the key.
*/
U_CAPI int32_t U_EXPORT2
uhash_hashLong(const UHashTok key);
/**
* Comparator function for 32-bit integer keys.
* @param key1 The integer for comparison
* @param Key2 The integer for comparison
* @return true if key1 and key2 are equal, return false otherwise
*/
U_CAPI UBool U_EXPORT2
uhash_compareLong(const UHashTok key1, const UHashTok key2);
@ -583,12 +618,14 @@ uhash_compareLong(const UHashTok key1, const UHashTok key2);
/**
* Deleter for Hashtable objects.
* @param obj The object to be deleted
*/
U_CAPI void U_EXPORT2
uhash_deleteHashtable(void *obj);
/**
* Deleter for UVector objects.
* @param obj The object to be deleted
*/
U_CAPI void U_EXPORT2
uhash_deleteUVector(void *obj);
@ -596,6 +633,7 @@ uhash_deleteUVector(void *obj);
/**
* Deleter for any key or value allocated using uprv_malloc. Calls
* uprv_free.
* @param obj The object to be deleted
*/
U_CAPI void U_EXPORT2
uhash_freeBlock(void *obj);

View file

@ -59,20 +59,28 @@ typedef void *UMTX;
/* Lock a mutex. Pass in NULL if you want the (ick) Single Global
Mutex. */
Mutex.
* @param mutex The given mutex to be locked
*/
U_CAPI void U_EXPORT2 umtx_lock ( UMTX* mutex );
/* Unlock a mutex. Pass in NULL if you want the single global
mutex. */
mutex.
* @param mutex The given mutex to be unlocked
*/
U_CAPI void U_EXPORT2 umtx_unlock ( UMTX* mutex );
/* Initialize a mutex. Use it this way:
umtx_init( &aMutex ); */
umtx_init( &aMutex );
* @param mutex The given mutex to be initialized
*/
U_CAPI void U_EXPORT2 umtx_init ( UMTX* mutex );
/* Destroy a mutex. This will free the resources of a mutex.
Use it this way:
umtx_destroy( &aMutex ); */
umtx_destroy( &aMutex );
* @param mutex The given mutex to be destroyed
*/
U_CAPI void U_EXPORT2 umtx_destroy( UMTX *mutex );
/* Is a mutex initialized? This function isn't normally needed

View file

@ -199,6 +199,8 @@ public:
/**
* Returns the complement of the result of operator==
* @param ths The BreakIterator to be compared for inequality
* @return the complement of the result of operator==
* @stable
*/
UBool operator!=(const BreakIterator& rhs) const { return !operator==(rhs); }
@ -241,6 +243,7 @@ public:
/**
* Change the text over which this operates. The text boundary is
* reset to the start.
* @param text The UnicodeString used to change the text.
* @stable
*/
virtual void setText(const UnicodeString &text) = 0;
@ -248,6 +251,7 @@ public:
/**
* Change the text over which this operates. The text boundary is
* reset to the start.
* @param it The CharacterIterator used to change the text.
* @stable
*/
virtual void adoptText(CharacterIterator* it) = 0;
@ -362,7 +366,8 @@ public:
* breaks are logically possible line breaks, actual line breaks are
* usually determined based on display width.
* LineBreak is useful for word wrapping text.
* @param where the locale. .
* @param where the locale.
* @param status The error code.
* @return A BreakIterator for line-breaks. The UErrorCode& status
* parameter is used to return status information to the user.
* To check whether the construction succeeded or not, you should check
@ -384,6 +389,7 @@ public:
* Returns an instance of a BreakIterator implementing character breaks.
* Character breaks are boundaries of combining character sequences.
* @param where the locale.
* @param status The error code.
* @return A BreakIterator for character-breaks. The UErrorCode& status
* parameter is used to return status information to the user.
* To check whether the construction succeeded or not, you should check
@ -404,6 +410,7 @@ public:
* Create BreakIterator for sentence-breaks using specified locale
* Returns an instance of a BreakIterator implementing sentence breaks.
* @param where the locale.
* @param status The error code.
* @return A BreakIterator for sentence-breaks. The UErrorCode& status
* parameter is used to return status information to the user.
* To check whether the construction succeeded or not, you should check
@ -424,6 +431,7 @@ public:
* Create BreakIterator for title-casing breaks using the specified locale
* Returns an instance of a BreakIterator implementing title breaks.
* @param where the locale.
* @param status The error code.
* @return A BreakIterator for title-breaks. The UErrorCode& status
* parameter is used to return status information to the user.
* To check whether the construction succeeded or not, you should check

View file

@ -100,6 +100,9 @@ public:
/**
* Returns true when both iterators refer to the same
* character in the same character-storage object.
* @param that The ForwardCharacterIterator to be compared for equality
* @return true when both iterators refer to the same
* character in the same character-storage object
* @stable
*/
virtual UBool operator==(const ForwardCharacterIterator& that) const = 0;
@ -108,12 +111,17 @@ public:
* Returns true when the iterators refer to different
* text-storage objects, or to different characters in the
* same text-storage object.
* @param that The ForwardCharacterIterator to be compared for inequality
* @Returns true when the iterators refer to different
* text-storage objects, or to different characters in the
* same text-storage object
* @stable
*/
inline UBool operator!=(const ForwardCharacterIterator& that) const;
/**
* Generates a hash code for this iterator.
* @return the hash code.
* @stable
*/
virtual int32_t hashCode(void) const = 0;
@ -121,7 +129,8 @@ public:
/**
* Returns a UClassID for this ForwardCharacterIterator ("poor man's
* RTTI").<P> Despite the fact that this function is public,
* DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API!
* DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API!
* @Returns a UClassID for this ForwardCharacterIterator
* @stable
*/
virtual UClassID getDynamicClassID(void) const = 0;
@ -131,6 +140,7 @@ public:
* in the iteration range
* (toward endIndex()). If there are
* no more code units to return, returns DONE.
* @return the current code unit.
* @stable
*/
virtual UChar nextPostInc(void) = 0;
@ -140,6 +150,7 @@ public:
* in the iteration range
* (toward endIndex()). If there are
* no more code points to return, returns DONE.
* @return the current code point.
* @stable
*/
virtual UChar32 next32PostInc(void) = 0;
@ -149,13 +160,25 @@ public:
* at or after the current position in the iteration range.
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
* @returns FALSE if there are no more code units or code points
* at or after the current position in the iteration range.
* @stable
*/
virtual UBool hasNext() = 0;
protected:
/*Constructor*/
ForwardCharacterIterator() : UObject() {}
/* copy constructor
* @return the newly created Unicode Converter.
* */
ForwardCharacterIterator(const ForwardCharacterIterator &other) : UObject(other) {}
/**
* Assignment operator.
* @return the newly created ForwardCharacterIterator.
*/
ForwardCharacterIterator &operator=(const ForwardCharacterIterator&) { return *this; }
};
@ -341,6 +364,7 @@ public:
* concrete class as this one, and referring to the same
* character in the same text-storage object as this one. The
* caller is responsible for deleting the new clone.
* @return a pointer to a new CharacterIterator
* @stable
*/
virtual CharacterIterator* clone(void) const = 0;
@ -349,6 +373,7 @@ public:
* Sets the iterator to refer to the first code unit in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with next().
* @return the first code unit in its iteration range.
* @stable
*/
virtual UChar first(void) = 0;
@ -358,6 +383,7 @@ public:
* iteration range, returns that code unit, and moves the position
* to the second code unit. This is an alternative to setToStart()
* for forward iteration with nextPostInc().
* @return the first code unit in its iteration range.
* @stable
*/
virtual UChar firstPostInc(void);
@ -368,6 +394,7 @@ public:
* This can be used to begin an iteration with next32().
* Note that an iteration with next32PostInc(), beginning with,
* e.g., setToStart() or firstPostInc(), is more efficient.
* @return the first code point in its iteration range.
* @stable
*/
virtual UChar32 first32(void) = 0;
@ -377,6 +404,7 @@ public:
* iteration range, returns that code point, and moves the position
* to the second code point. This is an alternative to setToStart()
* for forward iteration with next32PostInc().
* @return the first code point in its iteration range.
* @stable
*/
virtual UChar32 first32PostInc(void);
@ -394,6 +422,7 @@ public:
* Sets the iterator to refer to the last code unit in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with previous().
* @return the last code unit.
* @stable
*/
virtual UChar last(void) = 0;
@ -402,6 +431,7 @@ public:
* Sets the iterator to refer to the last code point in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with previous32().
* @return the last code point.
* @stable
*/
virtual UChar32 last32(void) = 0;
@ -419,6 +449,8 @@ public:
* Sets the iterator to refer to the "position"-th code unit
* in the text-storage object the iterator refers to, and
* returns that code unit.
* @param position the "position"-th code unit in the text-storage object
* @return the "position"-th code unit.
* @stable
*/
virtual UChar setIndex(int32_t position) = 0;
@ -430,18 +462,22 @@ public:
* returns that code point.
* The current position is adjusted to the beginning of the code point
* (its first code unit).
* @param position the "position"-th code unit in the text-storage object
* @return the "position"-th code point.
* @stable
*/
virtual UChar32 setIndex32(int32_t position) = 0;
/**
* Returns the code unit the iterator currently refers to.
* Returns the code unit the iterator currently refers to.
* @return the current code unit.
* @stable
*/
virtual UChar current(void) const = 0;
/**
* Returns the code point the iterator currently refers to.
* @return the current code point.
* @stable
*/
virtual UChar32 current32(void) const = 0;
@ -450,6 +486,7 @@ public:
* Advances to the next code unit in the iteration range
* (toward endIndex()), and returns that code unit. If there are
* no more code units to return, returns DONE.
* @return the next code unit.
* @stable
*/
virtual UChar next(void) = 0;
@ -461,6 +498,7 @@ public:
* Note that iteration with "pre-increment" semantics is less
* efficient than iteration with "post-increment" semantics
* that is provided by next32PostInc().
* @return the next code point.
* @stable
*/
virtual UChar32 next32(void) = 0;
@ -469,6 +507,7 @@ public:
* Advances to the previous code unit in the iteration range
* (toward startIndex()), and returns that code unit. If there are
* no more code units to return, returns DONE.
* @return the previous code unit.
* @stable
*/
virtual UChar previous(void) = 0;
@ -476,7 +515,8 @@ public:
/**
* Advances to the previous code point in the iteration range
* (toward startIndex()), and returns that code point. If there are
* no more code points to return, returns DONE.
* no more code points to return, returns DONE.
* @return the previous code point.
* @stable
*/
virtual UChar32 previous32(void) = 0;
@ -486,6 +526,8 @@ public:
* before the current position in the iteration range.
* This is used with previous() or previous32() in backward
* iteration.
* @return FALSE if there are no more code units or code points
* before the current position in the iteration range, return TRUE otherwise.
* @stable
*/
virtual UBool hasPrevious() = 0;
@ -496,6 +538,8 @@ public:
* possible to create an iterator that iterates across only
* part of a text-storage object, this number isn't
* necessarily 0.
* @returns the numeric index in the underlying text-storage
* object of the character returned by first().
* @stable
*/
inline int32_t startIndex(void) const;
@ -504,6 +548,9 @@ public:
* Returns the numeric index in the underlying text-storage
* object of the position immediately BEYOND the character
* returned by last().
* @return the numeric index in the underlying text-storage
* object of the position immediately BEYOND the character
* returned by last().
* @stable
*/
inline int32_t endIndex(void) const;
@ -512,6 +559,8 @@ public:
* Returns the numeric index in the underlying text-storage
* object of the character the iterator currently refers to
* (i.e., the character returned by current()).
* @return the numberic index in the text-storage object of
* the character the iterator currently refers to
* @stable
*/
inline int32_t getIndex(void) const;
@ -519,6 +568,7 @@ public:
/**
* Returns the length of the entire text in the underlying
* text-storage object.
* @return the length of the entire text in the text-storage object
* @stable
*/
inline int32_t getLength() const;
@ -528,6 +578,9 @@ public:
* iteration range, or relative to the current position itself.
* The movement is expressed in numbers of code units forward
* or backward by specifying a positive or negative delta.
* @delta the position relative to origin. A positive delta means forward;
* a negative delta means backward.
* @origin Origin enumeration {kStart, kCurrent, kEnd}
* @return the new position
* @stable
*/
@ -538,6 +591,9 @@ public:
* iteration range, or relative to the current position itself.
* The movement is expressed in numbers of code points forward
* or backward by specifying a positive or negative delta.
* @delta the position relative to origin. A positive delta means forward;
* a negative delta means backward.
* @origin Origin enumeration {kStart, kCurrent, kEnd}
* @return the new position
* @stable
*/
@ -556,8 +612,18 @@ protected:
CharacterIterator(int32_t length);
CharacterIterator(int32_t length, int32_t position);
CharacterIterator(int32_t length, int32_t textBegin, int32_t textEnd, int32_t position);
/*copy constructor
* @param that The CharacterIterator to be copied
* @return the newly created CharacterIterator. */
CharacterIterator(const CharacterIterator &that);
/**
* Assignment operator. Sets this CharacterIterator to have the same behavior,
* as the one passed in.
* @param that The CharacterIterator passed in.
* @return the newly set CharacterIterator.
*/
CharacterIterator &operator=(const CharacterIterator &that);
int32_t textLength; // need this for correct getText() and hashCode()

View file

@ -58,8 +58,8 @@ class U_COMMON_API UnicodeConverter : public UObject {
/**
* Creates Unicode Conversion Object by specifying the codepage name. The name
* string is in ASCII format.
* @param code_set the pointer to a char[] object containing a codepage name. (I)
* @param UErrorCode Error status (I/O) IILLEGAL_ARGUMENT_ERROR will be returned if the string is empty.
* @param name the pointer to a char[] object containing a codepage name. (I)
* @param err Error status (I/O) IILLEGAL_ARGUMENT_ERROR will be returned if the string is empty.
* If the internal program does not work correctly, for example, if there's no such codepage,
* U_INTERNAL_PROGRAM_ERROR will be returned.
* @return the created Unicode converter object
@ -72,7 +72,7 @@ class U_COMMON_API UnicodeConverter : public UObject {
*Creates a UnicodeConverter object with the names specified as unicode strings. The name should be limited to
*the ASCII-7 alphanumerics. Dash and underscore characters are allowed for readability, but are ignored in the
*search.
*@param code_set name of the uconv table in Unicode string (I)
*@param name name of the uconv table in Unicode string (I)
*@param err error status (I/O) IILLEGAL_ARGUMENT_ERROR will be returned if the string is empty. If the internal
*program does not work correctly, for example, if there's no such codepage, U_INTERNAL_PROGRAM_ERROR will be
*returned.
@ -84,8 +84,9 @@ class U_COMMON_API UnicodeConverter : public UObject {
/**
* Creates Unicode Conversion Object using the codepage ID number.
* @param code_set a codepage # (I)
* @UErrorCode Error status (I/O) IILLEGAL_ARGUMENT_ERROR will be returned if the string is empty.
* @param codepageNumber a codepage # (I)
* @param platform Enum for specifying which platform a converter ID refers to.
* @UErrorCode err Error status (I/O) IILLEGAL_ARGUMENT_ERROR will be returned if the string is empty.
* If the internal program does not work correctly, for example, if there's no such codepage,
* U_INTERNAL_PROGRAM_ERROR will be returned.
* @return the Unicode converter object
@ -104,9 +105,9 @@ class U_COMMON_API UnicodeConverter : public UObject {
* converter is specified, the source string in Unicode will be transcoded to JIS
* encoding. The result will be stored in JIS encoding.
*
* @param source the source Unicode string
* @param target the target string in codepage encoding
* @param target The target string in codepage encoding
* @param targetSize Input the number of bytes available in the "target" buffer, Output the number of bytes copied to it
* @param source the source Unicode string
* @param err the error status code. U_MEMORY_ALLOCATION_ERROR will be returned if the
* the internal process buffer cannot be allocated for transcoding. U_ILLEGAL_ARGUMENT_ERROR
* is returned if the converter is null or the source or target string is empty.
@ -122,9 +123,9 @@ void fromUnicodeString(char* target,
* Unicode encoding. For example, if a Unicode to/from JIS
* converter is specified, the source string in JIS encoding will be transcoded
* to Unicode encoding. The result will be stored in Unicode encoding.
* @param source the source string in codepage encoding
* @param target the target string in Unicode encoding
* @param targetSize : I/O parameter, Input size buffer, Output # of bytes copied to it
* @param source the source string in codepage encoding
* @param sourceSize : I/O parameter, Input size buffer, Output # of bytes copied to it
* @param err the error status code U_MEMORY_ALLOCATION_ERROR will be returned if the
* the internal process buffer cannot be allocated for transcoding. U_ILLEGAL_ARGUMENT_ERROR
* is returned if the converter is null or the source or target string is empty.
@ -264,7 +265,7 @@ void getSubstitutionChars(char* subChars,
* Sets the substitution chars when converting from unicode to a codepage. The
* substitution is specified as a string of 1-4 bytes, and may contain null byte.
* The fill-in parameter err will get the error status on return.
* @param cstr the substitution character array to be set with
* @param subchars the substitution character array to be set with
* @param len the number of bytes of the substitution character array and upon return will contain the
* number of bytes copied to that buffer
* @param err the error status code. U_ILLEGAL_ARGUMENT_ERROR if the converter is
@ -285,9 +286,9 @@ void resetState(void);
/**
* Gets the name of the converter (zero-terminated).
* the name will be the internal name of the converter
* @param converter the Unicode converter
* @param err the error status code. U_INDEX_OUTOFBOUNDS_ERROR in the converterNameLen is too
* small to contain the name.
* @return the name of the converter.
* @deprecated
*/
const char* getName( UErrorCode& err) const;
@ -300,7 +301,7 @@ const char* getName( UErrorCode& err) const;
* The error code fill-in parameter indicates if the codepage number is available.
* @param err the error status code. U_ILLEGAL_ARGUMENT_ERROR will returned if
* the converter is null or if converter's data table is null.
* @return If any error occurrs, null will be returned.
* @return the converter's codepage number. If any error occurrs, null will be returned.
* @deprecated
*/
int32_t getCodepage(UErrorCode& err) const;
@ -361,7 +362,7 @@ const char* getName( UErrorCode& err) const;
* Returns the localized name of the UnicodeConverter, if for any reason it is
* available, the internal name will be returned instead.
* @param displayLocale the valid Locale, from which we want to localize
* @param displayString a UnicodeString that is going to be filled in.
* @param displayName a UnicodeString that is going to be filled in.
* @deprecated
*/
void getDisplayName(const Locale& displayLocale,
@ -376,10 +377,39 @@ void getDisplayName(const Locale& displayLocale,
*/
UConverterPlatform getCodepagePlatform(UErrorCode& err) const;
/**
* Assignment operator.
* @param that object to be copied
* @return the newly created Unicode Converter.
*/
UnicodeConverter& operator=(const UnicodeConverter& that);
/**
* Returns true when both UnicodeConveters refer to the same
* character in the same character-storage object.
* @param that The UnicodeConverter to be compared for equality
* @return true when both UnicodeConverters refer to the same
* character in the same character-storage object
* @stable
*/
UBool operator==(const UnicodeConverter& that) const;
/**
* Returns true when the UnicodeConverters refer to different
* text-storage objects, or to different characters in the
* same text-storage object.
* @param that The UnicodeConverter to be compared for inequality
* @Returns true when the iterators refer to different
* text-storage objects, or to different characters in the
* same text-storage object
* @stable
*/
UBool operator!=(const UnicodeConverter& that) const;
/* copy constructor
* @param that The UnicodeConverter to be copied.
* @return the newly created Unicode Converter.
* */
UnicodeConverter(const UnicodeConverter& that);
/**

View file

@ -104,23 +104,28 @@ public:
/**
* Default constructor. Creates an "empty" break iterator.
* Such an iterator can subsequently be assigned to.
* @return the newly created DictionaryBaseBreakIterator.
*/
DictionaryBasedBreakIterator();
/**
* Copy constructor.
* @param other The DictionaryBasedBreakIterator to be copied.
* @return the newly created DictionaryBasedBreakIterator.
*/
DictionaryBasedBreakIterator(const DictionaryBasedBreakIterator &other);
/**
* Assignment operator. Sets this iterator to have the same behavior,
* and iterate over the same text, as the one passed in.
* Assignment operator.
* @param that The object to be copied.
* @return the newly set DictionaryBasedBreakIterator.
*/
DictionaryBasedBreakIterator& operator=(const DictionaryBasedBreakIterator& that);
/**
* Returns a newly-constructed RuleBasedBreakIterator with the same
* behavior, and iterating over the same text, as this one.
* @return Returns a newly-constructed RuleBasedBreakIterator.
*/
virtual BreakIterator* clone(void) const;
@ -197,6 +202,19 @@ protected:
//
void init();
/**
* @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
* If buffer is not large enough, new memory will be allocated.
* @param BufferSize reference to size of allocated space.
* If BufferSize == 0, a sufficient size for use in cloning will
* be returned ('pre-flighting')
* If BufferSize is not enough for a stack-based safe clone,
* new memory will be allocated.
* @param status to indicate whether the operation went on smoothly or there were errors
* An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were
* necessary.
* @return pointer to the new clone
*/
virtual BreakIterator * createBufferClone(void *stackBuffer,
int32_t &BufferSize,
UErrorCode &status);
@ -210,6 +228,9 @@ private:
* range. It stores all the boundary positions it discovers in
* cachedBreakPositions so that we only have to do this work once
* for each time we enter the range.
* @param startPos The start position of a range of text
* @param endPos The end position of a range of text
* @param status The error code status
*/
void divideUpDictionaryRange(int32_t startPos, int32_t endPos, UErrorCode &status);

View file

@ -433,6 +433,7 @@ public:
* different fields, e.g. in a spreadsheet.
*
* Note that the initial setting will match the host system.
* @retrun the default locale for this instance of the Java Virtual Machine
* @system
* @stable
*/
@ -443,6 +444,7 @@ public:
* application, then never reset. setDefault does NOT reset the host locale.
*
* @param newLocale Locale to set to.
* @param success The error code.
* @system
* @stable
*/

View file

@ -161,6 +161,7 @@ public:
/**
* Copy constructor.
* @param copy The object to be copied.
* @stable
*/
Normalizer(const Normalizer& copy);
@ -312,7 +313,7 @@ public:
*
* @param left Left source string.
* @param right Right source string.
* @param dest The output string.
* @param result The output string.
* @param mode The normalization mode.
* @param options A bit set of normalization options.
* @param pErrorCode ICU error code in/out parameter.
@ -553,7 +554,7 @@ public:
/**
* Returns a pointer to a new Normalizer that is a clone of this one.
* The caller is responsible for deleting the new clone.
*
* @return a pointer to a new Normalizer
* @stable
*/
Normalizer* clone(void) const;
@ -674,14 +675,14 @@ public:
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @return a UClassID for the actual class.
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @returns a UClassID for this class.
* @draft ICU 2.2
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
@ -931,7 +932,7 @@ public:
* <p>
* @param source the input string to be normalized.
*
* @param aMode the normalization mode
* @param Mode the normalization mode
*
* @param options the optional features to be enabled.
*

View file

@ -91,12 +91,16 @@ U_CAPI int16_t U_EXPORT2 uprv_log10(double d);
U_CAPI double U_EXPORT2 uprv_log(double d);
/** Does common notion of rounding e.g. uprv_floor(x + 0.5); */
/* @param x the double number
* @return the rounded double
*/
U_CAPI double U_EXPORT2 uprv_round(double x);
/**
* Returns the number of digits after the decimal point in a double number x.
*
* @param x the double number
* @return the number of digits after the decimal point in a double number x.
*/
U_CAPI int32_t U_EXPORT2 uprv_digitsAfterDecimal(double x);
@ -137,6 +141,7 @@ U_CAPI void U_EXPORT2 uprv_tzset(void);
/**
* Difference in seconds between coordinated universal
* time and local time. E.g., -28,800 for PST (GMT-8hrs)
* @return the difference in seconds between coordinated universal time and local time.
*/
U_CAPI int32_t U_EXPORT2 uprv_timezone(void);
@ -150,7 +155,8 @@ U_CAPI int32_t U_EXPORT2 uprv_timezone(void);
U_CAPI char* U_EXPORT2 uprv_tzname(int n);
/**
* Get UTC (GMT) time measured in seconds since 0:00 on 1/1/70.
* Get UTC (GMT) time measured in seconds since 0:00 on 1/1/70.
* @return the UTC time measured in seconds
* @stable
*/
U_CAPI int32_t U_EXPORT2 uprv_getUTCtime(void);
@ -188,13 +194,14 @@ U_CAPI const char* U_EXPORT2 u_getDataDirectory(void);
*
* This function should be called at most once in a process, before the
* first ICU operation that will require the loading of an ICU data file.
*
* @param disrectory The directory to be set.
* @stable
*/
U_CAPI void U_EXPORT2 u_setDataDirectory(const char *directory);
/**
* Return the default codepage for this platform and locale
* @return the default codepage for this platform
* @stable
*/
U_CAPI const char* U_EXPORT2 uprv_getDefaultCodepage(void);
@ -202,6 +209,7 @@ U_CAPI const char* U_EXPORT2 uprv_getDefaultCodepage(void);
/**
* Return the default locale ID string by querying ths system, or
* zero if one cannot be found.
* @return the default locale ID string
* @stable
*/
U_CAPI const char* U_EXPORT2 uprv_getDefaultLocaleID(void);
@ -213,6 +221,8 @@ U_CAPI const char* U_EXPORT2 uprv_getDefaultLocaleID(void);
* This is a special purpose function defined by the ChoiceFormat API
* documentation.
* It is not a general purpose function and not defined for NaN or Infinity
* @return the least double greater than d (if positive == true),
* or the greatest double less than d (if positive == false).
* @deprecated This will be removed after 2002-Jun-30. Use the ChoiceFormat closures API instead.
*/
U_CAPI double U_EXPORT2 uprv_nextDouble(double d, UBool positive);

View file

@ -187,6 +187,7 @@ protected:
/**
* Copy constructor. Will produce a break iterator with the same behavior,
* and which iterates over the same text, as the one passed in.
* @param that The RuleBasedBreakIterator passed to be copied
*/
RuleBasedBreakIterator(const RuleBasedBreakIterator& that);
@ -204,18 +205,25 @@ protected:
/**
* Assignment operator. Sets this iterator to have the same behavior,
* and iterate over the same text, as the one passed in.
* @param that The RuleBasedBreakItertor passed in
* @return the newly created RuleBasedBreakIterator
*/
RuleBasedBreakIterator& operator=(const RuleBasedBreakIterator& that);
/**
* Equality operator. Returns TRUE if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
* @param that The BreakIterator to be compared for equality
* @Return TRUE if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
*/
virtual UBool operator==(const BreakIterator& that) const;
/**
* Not-equal operator. If operator== returns TRUE, this returns FALSE,
* and vice versa.
* @param that The BreakIterator to be compared for inequality
* @return TRUE if both BreakIterators are not same.
*/
UBool operator!=(const BreakIterator& that) const;
@ -235,6 +243,7 @@ protected:
/**
* Returns the description used to create this iterator
* @return the description used to create this iterator
*/
virtual const UnicodeString& getRules(void) const;
@ -307,7 +316,7 @@ protected:
/**
* Sets the iterator to refer to the first boundary position following
* the specified position.
* @offset The position from which to begin searching for a break position.
* @param offset The position from which to begin searching for a break position.
* @return The position of the first break after the current position.
*/
virtual int32_t following(int32_t offset);
@ -315,7 +324,7 @@ protected:
/**
* Sets the iterator to refer to the last boundary position before the
* specified position.
* @offset The position to begin searching for a break from.
* @param offset The position to begin searching for a break from.
* @return The position of the last boundary before the starting position.
*/
virtual int32_t preceding(int32_t offset);
@ -341,6 +350,8 @@ protected:
* returned break position. The values appear in the rule source
* within brackets, {123}, for example. For rules that do not specify a
* status, a default value of 0 is returned.
* @return the status from the break rule that determined the most recently
* returned break position.
*/
virtual int32_t getRuleStatus() const;
@ -428,6 +439,8 @@ protected:
* Return true if the category lookup for this char
* indicates that it is in the set of dictionary lookup chars.
* This function is intended for use by dictionary based break iterators.
* @return true if the category lookup for this char
* indicates that it is in the set of dictionary lookup chars.
*/
virtual UBool isDictionaryChar(UChar32);

View file

@ -175,6 +175,7 @@ public:
* resources that pertain to the French locale. If the caller doesn't
* pass a locale parameter, the default locale for the system (as
* returned by Locale::getDefault()) will be used.
* @param err The Error Code.
* The UErrorCode& err parameter is used to return status information to the user. To
* check whether the construction succeeded or not, you should check the value of
* U_SUCCESS(err). If you wish more detailed information, you can check for
@ -363,6 +364,7 @@ public:
* Gets the locale ID of the resource bundle as a string.
* Same as getLocale().getName() .
*
* @return the locale ID of the resource bundle as a string
* @stable
*/
const char *getName(void);

View file

@ -41,6 +41,7 @@ public:
* Create an iterator over the UnicodeString referred to by "textStr".
* The UnicodeString object is copied.
* The iteration range is the whole string, and the starting position is 0.
* @param textStr The unicode string used to create an iterator
* @stable
*/
StringCharacterIterator(const UnicodeString& textStr);
@ -50,6 +51,8 @@ public:
* The iteration range is the whole string, and the starting
* position is specified by "textPos". If "textPos" is outside the valid
* iteration range, the behavior of this object is undefined.
* @textStr The unicode string used to create an iterator
* @textPos The starting position of the iteration
* @stable
*/
StringCharacterIterator(const UnicodeString& textStr,
@ -65,6 +68,10 @@ public:
* textBegin >= textEnd or either is negative or greater than text.size()),
* or "textPos" is outside the range defined by "textBegin" and "textEnd",
* the behavior of this iterator is undefined.
* @param textStr The unicode string used to create the StringCharacterIterator
* @param textBegin The begin position of the iteration range
* @param textEnd The end position of the iteration range
* @param textPos The starting position of the iteration
* @stable
*/
StringCharacterIterator(const UnicodeString& textStr,
@ -77,6 +84,7 @@ public:
* of the same string as "that", and its initial position is the
* same as "that"'s current position.
* The UnicodeString object in "that" is copied.
* @param that The StringCharacterIterator to be copied
* @stable
*/
StringCharacterIterator(const StringCharacterIterator& that);
@ -90,7 +98,9 @@ public:
/**
* Assignment operator. *this is altered to iterate over the same
* range of the same string as "that", and refers to the same
* character within that string as "that" does.
* character within that string as "that" does.
* @param that The object to be copied.
* @return the newly created object.
* @stable
*/
StringCharacterIterator&
@ -99,6 +109,9 @@ public:
/**
* Returns true if the iterators iterate over the same range of the
* same string and are pointing at the same character.
* @param that The ForwardCharacterIterator to be compared for equality
* @return true if the iterators iterate over the same range of the
* same string and are pointing at the same character.
* @stable
*/
virtual UBool operator==(const ForwardCharacterIterator& that) const;
@ -106,13 +119,15 @@ public:
/**
* Returns a new StringCharacterIterator referring to the same
* character in the same range of the same string as this one. The
* caller must delete the new iterator.
* caller must delete the new iterator.
* @return the newly cloned object.
* @stable
*/
virtual CharacterIterator* clone(void) const;
/**
* Sets the iterator to iterate over the provided string.
* @param newText The string to be iterated over
* @stable
*/
void setText(const UnicodeString& newText);
@ -128,6 +143,7 @@ public:
/**
* Return a class ID for this object (not really public)
* @return a class ID for this object.
* @stable
*/
virtual UClassID getDynamicClassID(void) const
@ -135,6 +151,7 @@ public:
/**
* Return a class ID for this class (not really public)
* @return a class ID for this class
* @stable
*/
static UClassID getStaticClassID(void)
@ -142,6 +159,12 @@ public:
protected:
StringCharacterIterator();
/**
* Sets the iterator to iterate over the provided string.
* @param newText The string to be iterated over
* @param newTextLength The length of the String
* @stable
*/
void setText(const UChar* newText, int32_t newTextLength);
UnicodeString text;

View file

@ -11,7 +11,7 @@
* Modification History:
*
* Date Name Description
* 05/17/99 stephen Creation (ported from java UnicodeCompressor.java)
* 05/17/99 stephen Creation (ported from java UnicodeCompressor.java)
* 09/21/99 stephen Updated to handle data splits on decompression.
******************************************************************************
*/
@ -73,6 +73,7 @@ typedef struct UnicodeCompressor UnicodeCompressor;
/**
* Initialize a UnicodeCompressor.
* Sets all windows to their default values.
* @param comp The UnicodeCompressor to init.
* @see #reset
* @stable
* @deprecated To be replaced by scsu encoding converter
@ -115,11 +116,11 @@ U_CAPI void U_EXPORT2 scsu_reset(UnicodeCompressor *comp);
* @deprecated To be replaced by scsu encoding converter
*/
U_CAPI void U_EXPORT2 scsu_compress(UnicodeCompressor *comp,
uint8_t **target,
const uint8_t *targetLimit,
const UChar **source,
const UChar *sourceLimit,
UErrorCode *status);
uint8_t **target,
const uint8_t *targetLimit,
const UChar **source,
const UChar *sourceLimit,
UErrorCode *status);
/**
* Decompress a byte array into a Unicode character array.
@ -151,11 +152,11 @@ U_CAPI void U_EXPORT2 scsu_compress(UnicodeCompressor *comp,
* @deprecated To be replaced by scsu encoding converter
*/
U_CAPI void U_EXPORT2 scsu_decompress(UnicodeCompressor *comp,
UChar **target,
const UChar *targetLimit,
const uint8_t **source,
const uint8_t *sourceLimit,
UErrorCode *status);
UChar **target,
const UChar *targetLimit,
const uint8_t **source,
const uint8_t *sourceLimit,
UErrorCode *status);
#endif

View file

@ -512,6 +512,7 @@ ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
* Is this BiDi object set to perform the inverse BiDi algorithm?
*
* @param pBiDi is a <code>UBiDi</code> object.
* @return TRUE if the BiDi object set to perform the inverse BiDi algorithm
*
* @see ubidi_setInverse
* @stable

View file

@ -275,6 +275,10 @@ ubrk_close(UBreakIterator *bi);
/**
* Sets an existing iterator to point to a new piece of text
* @param bi The iterator to use
* @param text The text to be set
* @param textLength The length of the text
* @param status The error code
* @stable
*/
U_CAPI void U_EXPORT2

View file

@ -1017,6 +1017,8 @@ u_hasBinaryProperty(UChar32 c, UProperty which);
* Check if a code point has the Alphabetic Unicode property.
* Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC).
* This is different from u_isalpha!
* @param c Code point to test
* @return true if the code point has the Alphabetic Unicode property, false otherwise
*
* @see UCHAR_ALPHABETIC
* @see u_isalpha
@ -1030,6 +1032,8 @@ u_isUAlphabetic(UChar32 c);
* Check if a code point has the Lowercase Unicode property.
* Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE).
* This is different from u_islower!
* @param c Code point to test
* @return true if the code point has the Lowercase Unicode property, false otherwise
*
* @see UCHAR_LOWERCASE
* @see u_islower
@ -1043,6 +1047,8 @@ u_isULowercase(UChar32 c);
* Check if a code point has the Uppercase Unicode property.
* Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE).
* This is different from u_isupper!
* @param c Code point to test
* @return true if the code point has the Uppercase Unicode property, false otherwise
*
* @see UCHAR_UPPERCASE
* @see u_isupper
@ -1056,6 +1062,8 @@ u_isUUppercase(UChar32 c);
* Check if a code point has the White_Space Unicode property.
* Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE).
* This is different from both u_isspace and u_isWhitespace!
* @param c Code point to test
* @return true if the code point has the White_Space Unicode property, false otherwise.
*
* @see UCHAR_WHITE_SPACE
* @see u_isWhitespace
@ -1075,7 +1083,7 @@ u_isUWhiteSpace(UChar32 c);
* Determines whether the specified UChar is a lowercase character
* according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is lowercase; false otherwise.
* @see UNICODE_VERSION
* @see u_isupper
@ -1090,7 +1098,7 @@ u_islower(UChar32 c);
* Determines whether the specified character is an uppercase character
* according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is uppercase; false otherwise.
* @see u_islower
* @see u_istitle
@ -1104,7 +1112,7 @@ u_isupper(UChar32 c);
* Determines whether the specified character is a titlecase character
* according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is titlecase; false otherwise.
* @see u_isupper
* @see u_islower
@ -1117,7 +1125,7 @@ u_istitle(UChar32 c);
/**
* Determines whether the specified character is a digit according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is a digit; false otherwise.
* @stable
*/
@ -1128,7 +1136,7 @@ u_isdigit(UChar32 c);
* Determines whether the specified character is an alphanumeric character
* (letter or digit)according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is a letter or a digit; false otherwise.
* @stable
*/
@ -1139,7 +1147,7 @@ u_isalnum(UChar32 c);
* Determines whether the specified numeric value is actually a defined character
* according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character has a defined Unicode meaning; false otherwise.
*
* @see u_isdigit
@ -1157,7 +1165,7 @@ u_isdefined(UChar32 c);
* Determines whether the specified character is a letter
* according to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is a letter; false otherwise.
*
* @see u_isdigit
@ -1170,7 +1178,7 @@ u_isalpha(UChar32 c);
/**
* Determines if the specified character is a space character or not.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the character is a space character; false otherwise.
* @stable
*/
@ -1217,7 +1225,7 @@ u_isWhitespace(UChar32 c);
* - U_LINE_SEPARATOR (Zl)
* - U_PARAGRAPH_SEPARATOR (Zp)
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the Unicode character is a control character; false otherwise.
*
* @see u_isprint
@ -1231,7 +1239,7 @@ u_iscntrl(UChar32 c);
* Determines whether the specified character is a printable character according
* to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the Unicode character is a printable character; false otherwise.
*
* @see u_iscntrl
@ -1244,7 +1252,7 @@ u_isprint(UChar32 c);
* Determines whether the specified character is of the base form according
* to UnicodeData.txt.
*
* @param ch the character to be tested
* @param c the character to be tested
* @return true if the Unicode character is of the base form; false otherwise.
*
* @see u_isalpha
@ -1260,6 +1268,9 @@ u_isbase(UChar32 c);
* Returns the linguistic direction property of a character.
* For example, 0x0041 (letter A) has the LEFT_TO_RIGHT directional
* property.
* @param c The character to be tested
* @return the linguistic direction property of a character.
* @see UCharDirection
* @see UCharDirection
* @stable
*/
@ -1347,6 +1358,8 @@ u_charMirror(UChar32 c);
* choseong filler character at the beginning of syllables that don't have an initial
* consonant. The results may be slightly off with Korean text following different
* conventions.
* @param c The character to be tested
* @return a value indicating the display-cell width of the character when used in Asian text
* @stable
*/
U_CAPI uint16_t U_EXPORT2
@ -1443,6 +1456,8 @@ u_charDigitValue(UChar32 c);
/**
* Returns the Unicode allocation block that contains the character.
*
* @param ch The character to be tested
* @retrun the Unicode allocation block that contains the character
* @see #UBlockCode
* @draft ICU 2.0
*/
@ -1703,7 +1718,7 @@ u_isJavaIDPart(UChar32 c);
* For example, the case conversion for dot-less i and dotted I in Turkish,
* or for final sigma in Greek.
*
* @param ch the character to be converted
* @param c the character to be converted
* @return the lowercase equivalent of the character, if any;
* otherwise the character itself.
* @stable
@ -1721,7 +1736,7 @@ u_tolower(UChar32 c);
* For example, the case conversion for dot-less i and dotted I in Turkish,
* or ess-zed (i.e., "sharp S") in German.
*
* @param ch the character to be converted
* @param c the character to be converted
* @return the uppercase equivalent of the character, if any;
* otherwise the character itself.
* @stable
@ -1738,7 +1753,7 @@ u_toupper(UChar32 c);
* A character has a titlecase equivalent if and only if a titlecase mapping
* is specified for the character in the UnicodeData.txt data.
*
* @param ch the character to be converted
* @param c the character to be converted
* @return the titlecase equivalent of the character, if any;
* otherwise the character itself.
* @stable

View file

@ -32,6 +32,8 @@ public:
* The iteration range is 0 to <code>length-1</code>.
* text is only aliased, not adopted (the
* destructor will not delete it).
* @param textPtr The UChar array to be iterated over
* @param length The length of the UChar array
* @stable
*/
UCharCharacterIterator(const UChar* textPtr, int32_t length);
@ -44,6 +46,9 @@ public:
* The starting
* position is specified by "position". If "position" is outside the valid
* iteration range, the behavior of this object is undefined.
* @param textPtr The UChar array to be iteratd over
* @param length The length of the UChar array
* @param position The starting position of the iteration
* @stable
*/
UCharCharacterIterator(const UChar* textPtr, int32_t length,
@ -58,6 +63,11 @@ public:
* position is specified by "position". If begin and end do not
* form a valid iteration range or "position" is outside the valid
* iteration range, the behavior of this object is undefined.
* @param textPtr The UChar array to be iterated over
* @param length The length of the UChar array
* @param textBegin The begin position of the iteration range
* @param textEnd The end position of the iteration range
* @param position The starting position of the iteration
* @stable
*/
UCharCharacterIterator(const UChar* textPtr, int32_t length,
@ -69,6 +79,7 @@ public:
* Copy constructor. The new iterator iterates over the same range
* of the same string as "that", and its initial position is the
* same as "that"'s current position.
* @param that The UCharCharacterIterator to be copied
* @stable
*/
UCharCharacterIterator(const UCharCharacterIterator& that);
@ -82,7 +93,9 @@ public:
/**
* Assignment operator. *this is altered to iterate over the sane
* range of the same string as "that", and refers to the same
* character within that string as "that" does.
* character within that string as "that" does.
* @param that The object to be copied
* @return the newly created object
* @stable
*/
UCharCharacterIterator&
@ -91,12 +104,16 @@ public:
/**
* Returns true if the iterators iterate over the same range of the
* same string and are pointing at the same character.
* @param that The ForwardCharacterIterator used to be compared for equality
* @return true if the iterators iterate over the same range of the
* same string and are pointing at the same character.
* @stable
*/
virtual UBool operator==(const ForwardCharacterIterator& that) const;
/**
* Generates a hash code for this iterator.
* @return the hash code.
* @stable
*/
virtual int32_t hashCode(void) const;
@ -105,6 +122,7 @@ public:
* Returns a new UCharCharacterIterator referring to the same
* character in the same range of the same string as this one. The
* caller must delete the new iterator.
* @return the CharacterIterator newly created
* @stable
*/
virtual CharacterIterator* clone(void) const;
@ -113,6 +131,7 @@ public:
* Sets the iterator to refer to the first code unit in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with next().
* @return the first code unit in its iteration range.
* @stable
*/
virtual UChar first(void);
@ -122,6 +141,7 @@ public:
* iteration range, returns that code unit, and moves the position
* to the second code unit. This is an alternative to setToStart()
* for forward iteration with nextPostInc().
* @return the first code unit in its iteration range
* @stable
*/
virtual UChar firstPostInc(void);
@ -132,6 +152,7 @@ public:
* This can be used to begin an iteration with next32().
* Note that an iteration with next32PostInc(), beginning with,
* e.g., setToStart() or firstPostInc(), is more efficient.
* @return the first code point in its iteration range
* @stable
*/
virtual UChar32 first32(void);
@ -141,6 +162,7 @@ public:
* iteration range, returns that code point, and moves the position
* to the second code point. This is an alternative to setToStart()
* for forward iteration with next32PostInc().
* @return the first code point in its iteration range.
* @stable
*/
virtual UChar32 first32PostInc(void);
@ -149,6 +171,7 @@ public:
* Sets the iterator to refer to the last code unit in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with previous().
* @return the last code unit in its iteration range.
* @stable
*/
virtual UChar last(void);
@ -157,6 +180,7 @@ public:
* Sets the iterator to refer to the last code point in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with previous32().
* @return the last code point in its iteration range.
* @stable
*/
virtual UChar32 last32(void);
@ -165,6 +189,8 @@ public:
* Sets the iterator to refer to the "position"-th code unit
* in the text-storage object the iterator refers to, and
* returns that code unit.
* @position the position within the text-storage object
* @return the code unit
* @stable
*/
virtual UChar setIndex(int32_t position);
@ -176,18 +202,22 @@ public:
* returns that code point.
* The current position is adjusted to the beginning of the code point
* (its first code unit).
* @position the position within the text-storage object
* @return the code unit
* @stable
*/
virtual UChar32 setIndex32(int32_t position);
/**
* Returns the code unit the iterator currently refers to.
* @return the code unit the iterator currently refers to.
* @stable
*/
virtual UChar current(void) const;
/**
* Returns the code point the iterator currently refers to.
* @return the code point the iterator currently refers to.
* @stable
*/
virtual UChar32 current32(void) const;
@ -195,7 +225,8 @@ public:
/**
* Advances to the next code unit in the iteration range (toward
* endIndex()), and returns that code unit. If there are no more
* code units to return, returns DONE.
* code units to return, returns DONE.
* @return the next code unit in the iteration range.
* @stable
*/
virtual UChar next(void);
@ -205,6 +236,7 @@ public:
* in the iteration range
* (toward endIndex()). If there are
* no more code units to return, returns DONE.
* @return the current code unit.
* @stable
*/
virtual UChar nextPostInc(void);
@ -216,6 +248,7 @@ public:
* Note that iteration with "pre-increment" semantics is less
* efficient than iteration with "post-increment" semantics
* that is provided by next32PostInc().
* @return the next code point in the iteration range.
* @stable
*/
virtual UChar32 next32(void);
@ -225,6 +258,7 @@ public:
* in the iteration range
* (toward endIndex()). If there are
* no more code points to return, returns DONE.
* @return the current point.
* @stable
*/
virtual UChar32 next32PostInc(void);
@ -234,22 +268,26 @@ public:
* at or after the current position in the iteration range.
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
* @return FALSE if there are no more code units or code points
* at or after the current position in the iteration range.
* @stable
*/
virtual UBool hasNext();
/**
* Advances to the previous code unit in the iteration rance (toward
* Advances to the previous code unit in the iteration range (toward
* startIndex()), and returns that code unit. If there are no more
* code units to return, returns DONE.
* @return the previous code unit in the iteration range.
* @stable
*/
virtual UChar previous(void);
/**
* Advances to the previous code point in the iteration rance (toward
* Advances to the previous code point in the iteration range (toward
* startIndex()), and returns that code point. If there are no more
* code points to return, returns DONE.
* code points to return, returns DONE.
* @return the previous code point in the iteration range.
* @stable
*/
virtual UChar32 previous32(void);
@ -259,6 +297,8 @@ public:
* before the current position in the iteration range.
* This is used with previous() or previous32() in backward
* iteration.
* @return FALSE if there are no more code units or code points
* before the current position in the iteration range.
* @stable
*/
virtual UBool hasPrevious();
@ -268,6 +308,9 @@ public:
* iteration range, or relative to the current position itself.
* The movement is expressed in numbers of code units forward
* or backward by specifying a positive or negative delta.
* @delta the position relative to origin. A positive delta means forward;
* a negative delta means backward.
* @origin Origin enumeration {kStart, kCurrent, kEnd}
* @return the new position
* @stable
*/
@ -278,6 +321,9 @@ public:
* iteration range, or relative to the current position itself.
* The movement is expressed in numbers of code points forward
* or backward by specifying a positive or negative delta.
* @delta the position relative to origin. A positive delta means forward;
* a negative delta means backward.
* @origin Origin enumeration {kStart, kCurrent, kEnd}
* @return the new position
* @stable
*/
@ -299,14 +345,16 @@ public:
virtual void getText(UnicodeString& result);
/**
* Return a class ID for this object (not really public)
* Return a class ID for this object (not really public)
* @return a class ID for this object.
* @stable
*/
virtual UClassID getDynamicClassID(void) const
{ return getStaticClassID(); }
/**
* Return a class ID for this class (not really public)
* Return a class ID for this class (not really public)
* @return a class ID for this class
* @stable
*/
static UClassID getStaticClassID(void)

View file

@ -242,7 +242,7 @@ ucnv_open (const char *converterName, UErrorCode * err);
* E.g., the names "UTF8", "utf-8", and "Utf 8" are all equivalent.
* If <TT>NULL</TT> is passed for the converter name, it will create
* one with the ucnv_getDefaultName() return value.
* @param converterName : name of the uconv table in a zero terminated
* @param name : name of the uconv table in a zero terminated
* Unicode string
* @param err outgoing error status <TT>U_MEMORY_ALLOCATION_ERROR,
* U_FILE_ACCESS_ERROR</TT>
@ -1086,7 +1086,7 @@ ucnv_setDefaultName (const char *name);
*
* @param cnv The converter representing the target codepage.
* @param source the input buffer to be fixed
* @param sourceLength the length of the input buffer
* @param sourceLen the length of the input buffer
* @see ucnv_isAmbiguous
* @stable
*/
@ -1096,6 +1096,7 @@ ucnv_fixFileSeparator(const UConverter *cnv, UChar* source, int32_t sourceLen);
/**
* Determines if the converter contains ambiguous mappings of the same
* character or not.
* @param cnv the converter to be tested
* @return TRUE if the converter contains ambiguous mapping of the same
* character, FALSE otherwise.
* @stable
@ -1115,6 +1116,7 @@ ucnv_setFallback(UConverter *cnv, UBool usesFallback);
/**
* Determines if the converter uses fallback mappings or not.
* @param cnv The converter to be tested
* @return TRUE if the converter uses fallback, FALSE otherwise.
* @stable
*/

View file

@ -115,6 +115,18 @@ UDataMemoryIsAcceptable(void *context,
* This function works the same as <code>udata_openChoice</code>
* except that any data that matches the type and name
* is assumed to be acceptable.
* @param path Specifies an absolute path and/or a basename for the
* finding of the data in the file system.
* <code>NULL</code> for ICU data.
* @param type A string that specifies the type of data to be loaded.
* For example, resource bundles are loaded with type "res",
* conversion tables with type "cnv".
* This may be <code>NULL</code> or empty.
* @param name A string that specifies the name of the data.
* @param pErrorCode An ICU UErrorCode parameter. It must not be <code>NULL</code>.
* @return A pointer (handle) to a data memory object, or <code>NULL</code>
* if an error occurs. Call <code>udata_getMemory()</code>
* to get a pointer to the actual data.
* @stable
*/
U_CAPI UDataMemory * U_EXPORT2
@ -188,6 +200,7 @@ udata_openChoice(const char *path, const char *type, const char *name,
* Close the data memory.
* This function must be called to allow the system to
* release resources associated with this data memory.
* @param pData The pointer to data memory object
* @stable
*/
U_CAPI void U_EXPORT2
@ -196,6 +209,7 @@ udata_close(UDataMemory *pData);
/**
* Get the pointer to the actual data inside the data memory.
* The data is read-only.
* @param pData The pointer to data memory object
* @stable
*/
U_CAPI const void * U_EXPORT2

View file

@ -394,11 +394,15 @@ uloc_getLCID(const char* localeID);
/**
* Gets the language name suitable for display for the specified locale.
*
* @param localeID the locale to get the ISO langauge code with
* @param locale the locale to get the ISO langauge code with
* @param inLocale Specifies the locale to be used to display the name. In other words,
* if the locale's language code is "en", passing Locale::getFrench() for
* inLocale would result in "Anglais", while passing Locale::getGerman()
* for inLocale would result in "Englisch".
* @param language the displayable langauge code for localeID
* @param languageCapacity the size of the language buffer to store the
* displayable language code with
* @param err error information if retrieving the displayable language code failed
* @param status error information if retrieving the displayable language code failed
* @return the actual buffer size needed for the displayable langauge code. If it's greater
* than languageCapacity, the returned language code will be truncated.
* @stable
@ -413,11 +417,15 @@ uloc_getDisplayLanguage(const char* locale,
/**
* Gets the country name suitable for display for the specified locale.
*
* @param localeID the locale to get the displayable country code with
* @param locale the locale to get the displayable country code with
* @param inLocale Specifies the locale to be used to display the name. In other words,
* if the locale's language code is "en", passing Locale::getFrench() for
* inLocale would result in "Anglais", while passing Locale::getGerman()
* for inLocale would result in "Englisch".
* @param country the displayable country code for localeID
* @param languageCapacity the size of the coutry buffer to store the
* displayable country code with
* @param err error information if retrieving the displayable country code failed
* @param status error information if retrieving the displayable country code failed
* @return the actual buffer size needed for the displayable country code. If it's greater
* than countryCapacity, the returned displayable country code will be truncated.
* @stable
@ -433,11 +441,15 @@ uloc_getDisplayCountry(const char* locale,
/**
* Gets the variant code suitable for display for the specified locale.
*
* @param localeID the locale to get the displayable variant code with
* @param locale the locale to get the displayable variant code with
* @param inLocale Specifies the locale to be used to display the name. In other words,
* if the locale's language code is "en", passing Locale::getFrench() for
* inLocale would result in "Anglais", while passing Locale::getGerman()
* for inLocale would result in "Englisch".
* @param variant the displayable variant code for localeID
* @param variantCapacity the size of the variant buffer to store the
* displayable variant code with
* @param err error information if retrieving the displayable variant code failed
* @param status error information if retrieving the displayable variant code failed
* @return the actual buffer size needed for the displayable variant code. If it's greater
* than variantCapacity, the returned displayable variant code will be truncated.
* @stable
@ -453,8 +465,12 @@ uloc_getDisplayVariant(const char* locale,
* Gets the full name suitable for display for the specified locale.
*
* @param localeID the locale to get the displayable name with
* @param variant the displayable name for localeID
* @param variantCapacity the size of the name buffer to store the
* @param inLocaleID Specifies the locale to be used to display the name. In other words,
* if the locale's language code is "en", passing Locale::getFrench() for
* inLocale would result in "Anglais", while passing Locale::getGerman()
* for inLocale would result in "Englisch".
* @param result the displayable name for localeID
* @param maxResultSize the size of the name buffer to store the
* displayable full name with
* @param err error information if retrieving the displayable name failed
* @return the actual buffer size needed for the displayable name. If it's greater

View file

@ -864,6 +864,8 @@ public:
* @see #EDirectionProperty
*
* @deprecated See the Unicode class description.
* @param ch The character to be tested
* @return the linguistic direction property of a character
*/
static inline EDirectionProperty characterDirection(UChar32 ch);
@ -903,6 +905,8 @@ public:
* Returns the script associated with a character.
* @see #EUnicodeScript
* @draft
* @param ch The character to be tested
* @return the script associated with a character
*/
static inline EUnicodeScript getScript(UChar32 ch);
@ -957,6 +961,7 @@ public:
* conventions.
*
* @deprecated See the Unicode class description.
* @return a value indicating the display-cell width of the character
*/
static inline uint16_t getCellWidth(UChar32 ch);
@ -1091,8 +1096,15 @@ protected:
// They should be private to prevent anyone from instantiating or
// subclassing Unicode.
Unicode();
/* copy constructor
* @param other The object to be copied
*/
Unicode(const Unicode &other);
~Unicode();
/* assignment operator
* @param other The object to be copied
* @return the newly created object
*/
const Unicode &operator=(const Unicode &other);
};

View file

@ -592,7 +592,7 @@ public:
* present. If this set already contains the multicharacter,
* the call leaves this set unchanged.
* Thus "ch" => {"ch"}
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the source string
* @return this object, for chaining
*/
@ -643,7 +643,7 @@ public:
/**
* Makes a set from a multicharacter string. Thus "ch" => {"ch"}
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the source string
* @return a newly created set containing the given string.
* The caller owns the return object and is responsible for deleting it.

View file

@ -1061,7 +1061,7 @@ public:
* in <TT>srcText</TT> in the range
* [<TT>srcStart</TT>, <TT>srcStart + srcLength</TT>),
* using bitwise comparison.
* @param text The text to search for.
* @param srcText The text to search for.
* @param srcStart the offset into <TT>srcText</TT> at which
* to start matching
* @param srcLength the number of characters in <TT>srcText</TT> to match
@ -1751,6 +1751,7 @@ public:
* @param textLength The number of Unicode characters in <code>text</code> to alias.
* If -1, then this constructor will determine the length
* by calling <code>u_strlen()</code>.
* @return a reference to this
* @stable
*/
UnicodeString &setTo(UBool isTerminated,
@ -1773,6 +1774,7 @@ public:
* @param buffer The characters to alias for the UnicodeString.
* @param buffLength The number of Unicode characters in <code>buffer</code> to alias.
* @param buffCapacity The size of <code>buffer</code> in UChars.
* @return a reference to this
* @stable
*/
UnicodeString &setTo(UChar *buffer,
@ -2160,9 +2162,10 @@ public:
/**
* Replaceable API
* @return TRUE if it has MetaData
*/
virtual UBool hasMetaData() const;
/**
* Copy a substring of this object, retaining attribute (out-of-band)
* information. This method is used to duplicate or reorder substrings.

View file

@ -277,6 +277,13 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_openW(const wchar_t* path,
* This path will be converted to char * using the default converter,
* then ures_open() is called.
*
* @param path : string containing the full path pointing to the directory
* where the resources reside followed by the package name
* @param locale: specifies the locale for which we want to open the resource
* if NULL, the default locale will be used. If strlen(locale) == 0
* root locale will be used.
* @param status : fills in the outgoing error code.
* @return a newly allocated resource bundle.
* @stable
*/
U_CAPI UResourceBundle* U_EXPORT2 ures_openU(const UChar* path,
@ -330,7 +337,7 @@ U_CAPI const char* U_EXPORT2 ures_getVersionNumber(const UResourceBundle* reso
/**
* Return the version number associated with this ResourceBundle as a UVersionInfo array.
*
* @param resourceBundle The resource bundle for which the version is checked.
* @param resB The resource bundle for which the version is checked.
* @param versionInfo A UVersionInfo array that is filled with the version number
* as specified in the resource bundle or its parent.
* @stable
@ -353,6 +360,12 @@ ures_getLocale(const UResourceBundle* resourceBundle, UErrorCode* status);
* TODO need to revisit usefulness of this function
* and usage model for fillIn parameters without knowing sizeof(UResourceBundle)
* @internal
* @param r The resourcebundle to open
* @param path String containing the full path pointing to the directory
* where the resources reside followed by the package name
* @param localeID specifies the locale for which we want to open the resource
* @param status The error code
* @return a newly allocated resource bundle or NULL if it doesn't exist.
*/
U_CAPI void U_EXPORT2
ures_openFillIn(UResourceBundle *r, const char* path,
@ -514,7 +527,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resourceBundle
/**
* Returns the resource in a given resource at the specified index. Features a fill-in parameter.
*
* @param resourceBundle a resource
* @param resB a resource
* @param indexR an index to the wanted resource.
* @param fillIn if NULL a new UResourceBundle struct is allocated and must be deleted by the caller.
* Alternatively, you can supply a struct to be filled by this function.

View file

@ -4,7 +4,7 @@
* Corporation and others. All Rights Reserved.
**********************************************************************
* $Source: /xsrl/Nsvn/icu/icu/source/common/unicode/usetiter.h,v $
* $Revision: 1.3 $
* $Revision: 1.4 $
**********************************************************************
*/
#ifndef USETITER_H
@ -54,19 +54,19 @@ class UnicodeString;
class U_COMMON_API UnicodeSetIterator : public UObject {
protected:
/**
* Value of <tt>codepoint</tt> if the iterator points to a string.
* If <tt>codepoint == IS_STRING</tt>, then examine
* <tt>string</tt> for the current iteration result.
*/
enum { IS_STRING = -1 };
enum { IS_STRING = -1 };
/**
/**
* Current code point, or the special value <tt>IS_STRING</tt>, if
* the iterator points to a string.
*/
UChar32 codepoint;
UChar32 codepoint;
/**
* When iterating over ranges using <tt>nextRange()</tt>,
@ -76,14 +76,14 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* <tt>codepoint == IS_STRING</tt>, then the value of
* <tt>codepointEnd</tt> is undefined.
*/
UChar32 codepointEnd;
UChar32 codepointEnd;
/**
* If <tt>codepoint == IS_STRING</tt>, then <tt>string</tt> points
* to the current string. If <tt>codepoint != IS_STRING</tt>, the
* value of <tt>string</tt> is undefined.
*/
const UnicodeString* string;
const UnicodeString* string;
public:

View file

@ -133,6 +133,7 @@ u_strchr(const UChar *s,
* Find the first occurrence of a substring in a string.
*
* @param s The string to search.
* @param substring The substring to find
* @return A pointer to the first occurrence of <TT>substring</TT> in
* <TT>s</TT>, or a null pointer if <TT>substring</TT>
* is not in <TT>s</TT>.
@ -349,8 +350,8 @@ u_strCaseCompare(const UChar *s1, int32_t length1,
* Compare two ustrings for bitwise equality.
* Compares at most <TT>n</TT> characters.
*
* @param s1 A string to compare.
* @param s2 A string to compare.
* @param ucs1 A string to compare.
* @param ucs2 A string to compare.
* @param n The maximum number of characters to compare.
* @return 0 if <TT>s1</TT> and <TT>s2</TT> are bitwise equal; a negative
* value if <TT>s1</TT> is bitwise less than <TT>s2,/TT>; a positive
@ -431,7 +432,7 @@ u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options);
*
* @param s1 A string to compare.
* @param s2 A string to compare.
* @param n The number of characters in each string to case-fold and then compare.
* @param length The number of characters in each string to case-fold and then compare.
* @param options A bit set of options:
* - U_FOLD_CASE_DEFAULT or 0 is used for default options:
* Comparison in code unit order with default case folding.
@ -536,6 +537,10 @@ U_CAPI char* U_EXPORT2 u_austrncpy(char *dst,
/**
* Synonym for memcpy(), but with UChars only.
* @param dest The destination string
* @param src The source string
* @param count The number of characters to copy
* @return A pointer to <TT>dest</TT>
* @stable
*/
U_CAPI UChar* U_EXPORT2
@ -543,6 +548,10 @@ u_memcpy(UChar *dest, const UChar *src, int32_t count);
/**
* Synonym for memmove(), but with UChars only.
* @param dest The destination string
* @param src The source string
* @param count The number of characters to move
* @return A pointer to <TT>dest</TT>
* @stable
*/
U_CAPI UChar* U_EXPORT2
@ -581,7 +590,7 @@ u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count);
*
* @param s1 A string to compare.
* @param s2 A string to compare.
* @param n The maximum number of characters to compare.
* @param count The maximum number of characters to compare.
* @return a negative/zero/positive integer corresponding to whether
* the first string is less than/equal to/greater than the second one
* in code point order
@ -734,6 +743,10 @@ u_unescape(const char *src,
* the source text given an offset and a context pointer. The context
* pointer will be whatever is passed into u_unescapeAt().
*
* @param offset pointer to the offset that will be passed to u_unescapeAt().
* @context an opaque pointer passed directly into u_unescapeAt()
* @return the character represented by the escape sequence at
* offset
* @see u_unescapeAt
* @stable
*/

View file

@ -66,17 +66,31 @@ public:
DigitList();
~DigitList();
/* copy constructor
* @param DigitList The object to be copied.
* @return the newly created object.
*/
DigitList(const DigitList&); // copy constructor
/* assignment operator
* @param DigitList The object to be copied.
* @return the newly created object.
*/
DigitList& operator=(const DigitList&); // assignment operator
/**
* Return true if another object is semantically equal to this one.
* @param other The DigitList to be compared for equality
* @return true if another object is semantically equal to this one.
* return false otherwise.
*/
UBool operator==(const DigitList& other) const;
/**
* Return true if another object is semantically unequal to this one.
* @param other The DigitList to be compared for inequality
* @return true if another object is semantically unequal to this one.
* return false otherwise.
*/
UBool operator!=(const DigitList& other) const { return !operator==(other); }
@ -92,12 +106,14 @@ public:
/**
* Appends digits to the list. Ignores all digits beyond the first DBL_DIG,
* since they are not significant for either longs or doubles.
* @param digit The digit to be appended.
*/
inline void append(char digit);
/**
* Utility routine to get the value of the digit list
* Returns 0.0 if zero length.
* @return the value of the digit list.
*/
double getDouble(void);
@ -105,12 +121,16 @@ public:
* Utility routine to get the value of the digit list
* Make sure that fitsIntoLong() is called before calling this function.
* Returns 0 if zero length.
* @return the value of the digit list, return 0 if it is zero length
*/
int32_t getLong(void);
/**
* Return true if the number represented by this object can fit into
* a long.
* @param ignoreNegativeZero True if negative zero is ignored.
* @return true if the number represented by this object can fit into
* a long, return false otherwise.
*/
UBool fitsIntoLong(UBool ignoreNegativeZero);
@ -118,6 +138,9 @@ public:
* Utility routine to set the value of the digit list from a double
* Input must be non-negative, and must not be Inf, -Inf, or NaN.
* The maximum fraction digits helps us round properly.
* @param source The value to be set
* @param maximunDigits The maximum number of digits to be shown
* @param fixedPoint True if the point is fixed
*/
void set(double source, int32_t maximumDigits, UBool fixedPoint = TRUE);
@ -125,11 +148,14 @@ public:
* Utility routine to set the value of the digit list from a long.
* If a non-zero maximumDigits is specified, no more than that number of
* significant digits will be produced.
* @param source The value to be set
* @param maximunDigits The maximum number of digits to be shown
*/
void set(int32_t source, int32_t maximumDigits = 0);
/**
* Return true if this is a representation of zero.
* @return true if this is a representation of zero.
*/
UBool isZero(void) const;
@ -143,14 +169,14 @@ public:
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @return a UClassID for the actual class.
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @returns a UClassID for this class.
* @draft ICU 2.2
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
@ -196,6 +222,7 @@ private:
/**
* Initializes the buffer that records the mimimum long value.
* @param maximumDigits The maximum number of digits to be shown.
*/
/*static void initializeLONG_MIN_REP(void);*/