Added @ documentation to the public API

X-SVN-Rev: 6902
This commit is contained in:
Syn Wee Quek 2001-11-14 22:24:17 +00:00
parent 61990f99b2
commit 3159af47d9
4 changed files with 40 additions and 16 deletions

View file

@ -15,8 +15,8 @@
#include "unicode/ucoleitr.h"
#include "unicode/ustring.h"
#include "unicode/sortkey.h"
#include "ucol_imp.h"
#include "unicode/sortkey.h"
#include "cmemory.h"
U_NAMESPACE_USE

View file

@ -123,11 +123,13 @@ public:
/**
* Copy constructor.
* @stable
*/
CollationElementIterator(const CollationElementIterator& other);
/**
* Destructor
* @stable
*/
~CollationElementIterator();
@ -135,16 +137,19 @@ public:
/**
* Returns true if "other" is the same as "this"
* @stable
*/
UBool operator==(const CollationElementIterator& other) const;
/**
* Returns true if "other" is not the same as "this".
* @stable
*/
UBool operator!=(const CollationElementIterator& other) const;
/**
* Resets the cursor to the beginning of the string.
* @stable
*/
void reset(void);
@ -153,6 +158,7 @@ public:
* @param status the error code status.
* @return the next character's ordering. otherwise returns NULLORDER if an
* error has occured or if the end of string has been reached
* @stable
*/
int32_t next(UErrorCode& status);
@ -161,6 +167,7 @@ public:
* @param status the error code status.
* @return the previous element's ordering. otherwise returns NULLORDER if an
* error has occured or if the start of string has been reached
* @stable
*/
int32_t previous(UErrorCode& status);
@ -168,6 +175,7 @@ public:
* Gets the primary order of a collation order.
* @param order the collation order
* @return the primary order of a collation order.
* @stable
*/
static int32_t primaryOrder(int32_t order);
@ -175,6 +183,7 @@ public:
* Gets the secondary order of a collation order.
* @param order the collation order
* @return the secondary order of a collation order.
* @stable
*/
static int32_t secondaryOrder(int32_t order);
@ -182,6 +191,7 @@ public:
* Gets the tertiary order of a collation order.
* @param order the collation order
* @return the tertiary order of a collation order.
* @stable
*/
static int32_t tertiaryOrder(int32_t order);
@ -192,6 +202,7 @@ public:
* @return maximum size of the expansion sequences ending with the collation
* element or 1 if collation element does not occur at the end of any
* expansion sequence
* @stable
*/
int32_t getMaxExpansion(int32_t order) const;
@ -199,6 +210,7 @@ public:
* Gets the comparison order in the desired strength. Ignore the other
* differences.
* @param order The order value
* @stable
*/
int32_t strengthOrder(int32_t order) const;
@ -206,6 +218,7 @@ public:
* Sets the source string.
* @param str the source string.
* @param status the error code status.
* @stable
*/
void setText(const UnicodeString& str, UErrorCode& status);
@ -213,6 +226,7 @@ public:
* Sets the source string.
* @param str the source character iterator.
* @param status the error code status.
* @stable
*/
void setText(CharacterIterator& str, UErrorCode& status);
@ -220,12 +234,14 @@ public:
* Checks if a comparison order is ignorable.
* @param order the collation order.
* @return TRUE if a character is ignorable, FALSE otherwise.
* @stable
*/
static UBool isIgnorable(int32_t order);
/**
* Gets the offset of the currently processed character in the source string.
* @return the offset of the character.
* @stable
*/
UTextOffset getOffset(void) const;
@ -234,6 +250,7 @@ public:
* @param newOffset the new offset.
* @param status the error code status.
* @return the offset of the character.
* @stable
*/
void setOffset(UTextOffset newOffset, UErrorCode& status);

View file

@ -83,7 +83,6 @@ class RuleBasedCollator;
* @see RuleBasedCollator
* @version 1.3 12/18/96
* @author Helena Shih
* @deprecated
*/
class U_I18N_API CollationKey {
public:
@ -92,7 +91,7 @@ public:
* collation key contains no sorting information. When comparing two empty
* collation keys, the result is Collator::EQUAL. Comparing empty collation key
* with non-empty collation key is always Collator::LESS.
* @deprecated
* @stable
*/
CollationKey();
@ -102,25 +101,24 @@ public:
* @param values the collation key values
* @param count number of collation key values, including trailing nulls.
* @see #createBits
* @deprecated
* @stable
*/
CollationKey(const uint8_t* values,
int32_t count);
/**
* Copy constructor.
* @deprecated
* @stable
*/
CollationKey(const CollationKey& other);
/**
* Sort key destructor.
* @deprecated
* @stable
*/
~CollationKey();
/**
* Assignment operator
* @deprecated
* @stable
*/
const CollationKey& operator=(const CollationKey& other);
@ -128,7 +126,7 @@ public:
* Compare if two collation keys are the same.
* @param source the collation key to compare to.
* @return Returns true if two collation keys are equal, false otherwise.
* @deprecated
* @stable
*/
UBool operator==(const CollationKey& source) const;
@ -136,7 +134,7 @@ public:
* Compare if two collation keys are not the same.
* @param source the collation key to compare to.
* @return Returns TRUE if two collation keys are different, FALSE otherwise.
* @deprecated
* @stable
*/
UBool operator!=(const CollationKey& source) const;
@ -145,7 +143,7 @@ public:
* Test to see if the key is in an invalid state. The key will be in an
* invalid state if it couldn't allocate memory for some operation.
* @return Returns TRUE if the key is in an invalid, FALSE otherwise.
* @deprecated
* @stable
*/
UBool isBogus(void) const;
@ -155,7 +153,7 @@ public:
* is deleted.
* @param count the output parameter of number of collation key values,
* including any trailing nulls.
* @deprecated
* @stable
*/
const uint8_t* getByteArray(int32_t& count) const;
@ -164,7 +162,7 @@ public:
* this storage and should free it.
* @param count the output parameter of number of collation key values,
* including any trailing nulls.
* @deprecated
* @stable
*/
uint8_t* toByteArray(int32_t& count) const;
@ -176,7 +174,7 @@ public:
* @return Returns Collator::LESS if sourceKey < targetKey,
* Collator::GREATER if sourceKey > targetKey and Collator::EQUAL
* otherwise.
* @deprecated
* @stable
*/
Collator::EComparisonResult compareTo(const CollationKey& target) const;
@ -198,7 +196,7 @@ public:
* </pre>
* @return the hash value based on the string's collation order.
* @see UnicodeString#hashCode
* @deprecated
* @stable
*/
int32_t hashCode(void) const;

View file

@ -96,6 +96,7 @@ typedef struct UCollationElements UCollationElements;
* @param textLength The number of characters in text, or -1 if null-terminated
* @param status A pointer to an UErrorCode to receive any errors.
* @return a struct containing collation element information
* @stable
*/
U_CAPI UCollationElements*
ucol_openElements(const UCollator *coll,
@ -105,7 +106,7 @@ ucol_openElements(const UCollator *coll,
/**
* get a hash code for a key... Not very useful!
* @deprecated
* @stable
*/
U_CAPI int32_t
ucol_keyHashCode(const uint8_t* key, int32_t length);
@ -114,6 +115,7 @@ ucol_keyHashCode(const uint8_t* key, int32_t length);
* Close a UCollationElements.
* Once closed, a UCollationElements may no longer be used.
* @param elems The UCollationElements to close.
* @stable
*/
U_CAPI void
ucol_closeElements(UCollationElements *elems);
@ -125,6 +127,7 @@ ucol_closeElements(UCollationElements *elems);
* @param elems The UCollationElements to reset.
* @see ucol_next
* @see ucol_previous
* @stable
*/
U_CAPI void
ucol_reset(UCollationElements *elems);
@ -136,6 +139,7 @@ ucol_reset(UCollationElements *elems);
* @param status A pointer to an UErrorCode to receive any errors.
* @return The next collation elements ordering, otherwise returns NULLORDER
* if an error has occured or if the end of string has been reached
* @stable
*/
U_CAPI int32_t
ucol_next(UCollationElements *elems, UErrorCode *status);
@ -154,6 +158,7 @@ ucol_next(UCollationElements *elems, UErrorCode *status);
* @return The previous collation elements ordering, otherwise returns
* NULLORDER if an error has occured or if the start of string has
* been reached.
* @stable
*/
U_CAPI int32_t
ucol_previous(UCollationElements *elems, UErrorCode *status);
@ -167,6 +172,7 @@ ucol_previous(UCollationElements *elems, UErrorCode *status);
* @return maximum size of the expansion sequences ending with the collation
* element or 1 if collation element does not occur at the end of any
* expansion sequence
* @stable
*/
U_CAPI int32_t
ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
@ -181,6 +187,7 @@ ucol_getMaxExpansion(const UCollationElements *elems, int32_t order);
* @param textLength The length of text, or -1 if null-terminated.
* @param status A pointer to an UErrorCode to receive any errors.
* @see ucol_getText
* @stable
*/
U_CAPI void
ucol_setText( UCollationElements *elems,
@ -195,6 +202,7 @@ ucol_setText( UCollationElements *elems,
* @param elems The UCollationElements to query.
* @return The offset of the current source character.
* @see ucol_setOffset
* @stable
*/
U_CAPI UTextOffset
ucol_getOffset(const UCollationElements *elems);
@ -209,6 +217,7 @@ ucol_getOffset(const UCollationElements *elems);
* @param offset The desired character offset.
* @param status A pointer to an UErrorCode to receive any errors.
* @see ucol_getOffset
* @stable
*/
U_CAPI void
ucol_setOffset(UCollationElements *elems,