]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/uchriter.h
ICU-57165.0.1.tar.gz
[apple/icu.git] / icuSources / common / unicode / uchriter.h
index ae16a57a3c045344396e02c4c08e1f840a701b4b..6d5a990f7b7ed3d5bacf2da8471ef8ff9422f99c 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 1998-2003, International Business Machines
+*   Copyright (C) 1998-2005, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 */
 #include "unicode/utypes.h"
 #include "unicode/chariter.h"
 
+/**
+ * \file 
+ * \brief C++ API: UChar Character Iterator
+ */
 U_NAMESPACE_BEGIN
 
 /**
@@ -78,24 +83,24 @@ 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.  
+   * same as "that"'s current position.
    * @param that The UCharCharacterIterator to be copied
    * @stable ICU 2.0
    */
   UCharCharacterIterator(const UCharCharacterIterator&  that);
 
   /**
-   * Destructor. 
+   * Destructor.
    * @stable ICU 2.0
    */
-  ~UCharCharacterIterator();
+  virtual ~UCharCharacterIterator();
 
   /**
    * 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 
+   * @return the newly created object
    * @stable ICU 2.0
    */
   UCharCharacterIterator&
@@ -103,7 +108,7 @@ public:
 
   /**
    * Returns true if the iterators iterate over the same range of the
-   * same string and are pointing at the same character.  
+   * 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.
@@ -112,7 +117,7 @@ public:
   virtual UBool          operator==(const ForwardCharacterIterator& that) const;
 
   /**
-   * Generates a hash code for this iterator.  
+   * Generates a hash code for this iterator.
    * @return the hash code.
    * @stable ICU 2.0
    */
@@ -121,12 +126,12 @@ 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.  
+   * caller must delete the new iterator.
    * @return the CharacterIterator newly created
    * @stable ICU 2.0
    */
   virtual CharacterIterator* clone(void) const;
-                                
+
   /**
    * Sets the iterator to refer to the first code unit in its
    * iteration range, and returns that code unit.
@@ -188,8 +193,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
+   * returns that code unit.
+   * @param position the position within the text-storage object
    * @return the code unit
    * @stable ICU 2.0
    */
@@ -202,21 +207,21 @@ 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
+   * @param position the position within the text-storage object
    * @return the code unit
    * @stable ICU 2.0
    */
   virtual UChar32       setIndex32(int32_t position);
 
   /**
-   * Returns the code unit the iterator currently refers to.  
+   * Returns the code unit the iterator currently refers to.
    * @return the code unit the iterator currently refers to.
    * @stable ICU 2.0
    */
   virtual UChar         current(void) const;
 
   /**
-   * Returns the code point the iterator currently refers to.  
+   * Returns the code point the iterator currently refers to.
    * @return the code point the iterator currently refers to.
    * @stable ICU 2.0
    */
@@ -225,8 +230,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. 
-   * @return the next code unit in the iteration range. 
+   * code units to return, returns DONE.
+   * @return the next code unit in the iteration range.
    * @stable ICU 2.0
    */
   virtual UChar         next(void);
@@ -240,11 +245,11 @@ public:
    * @stable ICU 2.0
    */
   virtual UChar         nextPostInc(void);
-        
+
   /**
    * Advances to the next code point in the iteration range (toward
    * endIndex()), and returns that code point.  If there are no more
-   * code points to return, returns DONE.  
+   * code points to return, returns DONE.
    * Note that iteration with "pre-increment" semantics is less
    * efficient than iteration with "post-increment" semantics
    * that is provided by next32PostInc().
@@ -262,7 +267,7 @@ public:
    * @stable ICU 2.0
    */
   virtual UChar32       next32PostInc(void);
-        
+
   /**
    * Returns FALSE if there are no more code units or code points
    * at or after the current position in the iteration range.
@@ -277,7 +282,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.  
+   * code units to return, returns DONE.
    * @return the previous code unit in the iteration range.
    * @stable ICU 2.0
    */
@@ -287,7 +292,7 @@ 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.
-   * @return the previous code point in the iteration range.  
+   * @return the previous code point in the iteration range.
    * @stable ICU 2.0
    */
   virtual UChar32       previous32(void);
@@ -308,9 +313,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;
+   * @param delta the position relative to origin. A positive delta means forward;
    * a negative delta means backward.
-   * @origin Origin enumeration {kStart, kCurrent, kEnd}
+   * @param origin Origin enumeration {kStart, kCurrent, kEnd}
    * @return the new position
    * @stable ICU 2.0
    */
@@ -321,9 +326,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;
+   * @param delta the position relative to origin. A positive delta means forward;
    * a negative delta means backward.
-   * @origin Origin enumeration {kStart, kCurrent, kEnd}
+   * @param origin Origin enumeration {kStart, kCurrent, kEnd}
    * @return the new position
    * @stable ICU 2.0
    */
@@ -334,29 +339,29 @@ public:
    * @stable ICU 2.0
    */
   void setText(const UChar* newText, int32_t newTextLength);
-  
+
   /**
    * Copies the UChar array under iteration into the UnicodeString
    * referred to by "result".  Even if this iterator iterates across
    * only a part of this string, the whole string is copied.
-   * @param result Receives a copy of the text under iteration.  
+   * @param result Receives a copy of the text under iteration.
    * @stable ICU 2.0
    */
   virtual void            getText(UnicodeString& result);
 
   /**
-   * Return a class ID for this object (not really public) 
-   * @return a class ID for this object.  
+   * Return a class ID for this class (not really public)
+   * @return a class ID for this class
    * @stable ICU 2.0
    */
-  virtual UClassID         getDynamicClassID(void) const;
+  static UClassID         U_EXPORT2 getStaticClassID(void);
 
   /**
-   * Return a class ID for this class (not really public) 
-   * @return a class ID for this class  
+   * Return a class ID for this object (not really public)
+   * @return a class ID for this object.
    * @stable ICU 2.0
    */
-  static inline UClassID   getStaticClassID(void);
+  virtual UClassID        getDynamicClassID(void) const;
 
 protected:
   /**
@@ -367,20 +372,10 @@ protected:
   /**
    * Protected member text
    * @stable ICU 2.0
-   */      
+   */
   const UChar*            text;
 
-private:
-  static const char       fgClassID;
 };
 
-inline UClassID
-UCharCharacterIterator::getStaticClassID(void) 
-{ return (UClassID)(&fgClassID); }
-
-inline UClassID
-UCharCharacterIterator::getDynamicClassID(void) const 
-{ return UCharCharacterIterator::getStaticClassID(); }
-
 U_NAMESPACE_END
 #endif