Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

uchriter.h

00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1998-2001, International Business Machines
00004 *   Corporation and others.  All Rights Reserved.
00005 **********************************************************************
00006 */
00007 
00008 #ifndef UCHRITER_H
00009 #define UCHRITER_H
00010 
00011 #include "unicode/utypes.h"
00012 #include "unicode/chariter.h"
00013 
00014 U_NAMESPACE_BEGIN
00015 
00028 class U_COMMON_API UCharCharacterIterator : public CharacterIterator {
00029 public:
00037   UCharCharacterIterator(const UChar* textPtr, int32_t length);
00038 
00049   UCharCharacterIterator(const UChar* textPtr, int32_t length,
00050                          UTextOffset position);
00051 
00063   UCharCharacterIterator(const UChar* textPtr, int32_t length,
00064                          UTextOffset textBegin,
00065                          UTextOffset textEnd,
00066                          UTextOffset position);
00067 
00074   UCharCharacterIterator(const UCharCharacterIterator&  that);
00075 
00080   ~UCharCharacterIterator();
00081 
00088   UCharCharacterIterator&
00089   operator=(const UCharCharacterIterator&    that);
00090 
00096   virtual UBool          operator==(const ForwardCharacterIterator& that) const;
00097 
00102   virtual int32_t         hashCode(void) const;
00103 
00110   virtual CharacterIterator* clone(void) const;
00111                                 
00118   virtual UChar         first(void);
00119 
00127   virtual UChar         firstPostInc(void);
00128 
00137   virtual UChar32       first32(void);
00138 
00146   virtual UChar32       first32PostInc(void);
00147 
00154   virtual UChar         last(void);
00155 
00162   virtual UChar32       last32(void);
00163 
00170   virtual UChar         setIndex(UTextOffset position);
00171 
00181   virtual UChar32       setIndex32(UTextOffset position);
00182 
00187   virtual UChar         current(void) const;
00188 
00193   virtual UChar32       current32(void) const;
00194 
00201   virtual UChar         next(void);
00202 
00210   virtual UChar         nextPostInc(void);
00211         
00221   virtual UChar32       next32(void);
00222 
00230   virtual UChar32       next32PostInc(void);
00231         
00239   virtual UBool        hasNext();
00240 
00247   virtual UChar         previous(void);
00248 
00255   virtual UChar32       previous32(void);
00256 
00264   virtual UBool        hasPrevious();
00265 
00274   virtual UTextOffset      move(int32_t delta, EOrigin origin);
00275 
00284   virtual UTextOffset      move32(int32_t delta, EOrigin origin);
00285 
00290   void setText(const UChar* newText, int32_t newTextLength);
00291   
00299   virtual void            getText(UnicodeString& result);
00300 
00305   virtual UClassID         getDynamicClassID(void) const 
00306     { return getStaticClassID(); }
00307 
00312   static UClassID          getStaticClassID(void) 
00313     { return (UClassID)(&fgClassID); }
00314 
00315 protected:
00316   UCharCharacterIterator();
00317         
00318   const UChar*            text;
00319 
00320 private:
00321   static const char       fgClassID;
00322 };
00323 
00324 U_NAMESPACE_END
00325 #endif

Generated on Mon Mar 4 23:12:37 2002 for ICU 2.0 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002