ULAPI  8.0
ulstringiterator.h
1 
7 #ifndef ULSTRINGITERATOR_H
8 #define ULSTRINGITERATOR_H
9 
10 #include "ulstring.h"
11 
17 {
18  friend class ULString;
20  UL_TEST_FRIEND;
21 
22 public:
24  ULStringIterator(const ULStringIterator& iterator);
26 
28  operator ULStringReverseIterator() const;
29 
30  bool operator==(const ULStringIterator& iterator) const;
31  bool operator!=(const ULStringIterator& iterator) const;
32 
33  int getCharIndex() const;
34  const ULString *getString() const;
35 
36  bool isAtEnd() const;
37  bool isAtBeginning() const;
38  operator bool() const;
39 
40  void operator++();
41  void operator++(int);
42  void operator--();
43  void operator--(int);
44  void operator+=(int nChars);
45  void operator-=(int nChars);
46  ulchar operator*() const;
47 
48 private:
49  int charIndex;
50  const ULString *string;
51 };
52 
53 
59 {
60  friend class ULString;
61  friend class ULStringIterator;
62 
63 public:
67 
69  operator ULStringIterator() const;
70 
71  bool operator==(const ULStringReverseIterator& s) const;
72  bool operator!=(const ULStringReverseIterator& s) const;
73 
74  int getCharIndex() const;
75  const ULString *getString() const;
76 
77  bool isAtEnd() const;
78  bool isAtBeginning() const;
79  operator bool() const;
80 
81  void operator++();
82  void operator++(int);
83  void operator--();
84  void operator--(int);
85  void operator+=(int nChars);
86  void operator-=(int nChars);
87  ulchar operator*() const;
88 
89 private:
90  int charIndex;
91  const ULString *string;
92 };
93 
94 #endif