Om
code_point_string_back_source.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Source_CodePointStringBackSource_
16 
17  #define Om_Source_CodePointStringBackSource_ \
18  Om::Source::CodePointStringBackSource
19 
21 
22  #ifndef Om_Macro_Precompilation_
23 
24  #include <string>
25 
26  #endif
27 
28 namespace Om {
29 
30  namespace Source {
31 
32  // MARK: - Om::Source::CodePointStringBackSource
33 
42  template <typename ThisStringIterator>
44  public DefaultSource<
45  std::string,
46  CodePointStringBackSource<ThisStringIterator>
47  > {
48 
49  public: // MARK: public (non-static)
50 
58  ThisStringIterator theStringStart,
59  ThisStringIterator const theStringEnd
60  );
61 
63 
64  virtual bool operator !() const;
65 
66  virtual std::string & operator *() const;
67 
68  using DefaultSource<
69  std::string,
71  >::Equals;
72 
73  bool Equals(CodePointStringBackSource const &) const;
74 
75  virtual void Pop();
76 
78 
79  private: // MARK: private (non-static)
80 
85  void Update();
86 
87  ThisStringIterator thisStringIterator;
88 
93  ThisStringIterator thisCodePointIterator;
94 
99  ThisStringIterator thisCodePointEnd;
100 
105  mutable std::string thisCodePoint;
106 
107  };
108 
109  // MARK: - Om::Source::
110 
111  template <typename TheStringIterator>
115  );
116 
117  template <typename TheStringIterator>
121  );
122 
123  }
124 
125 }
126 
127 namespace boost {
128 
129  // MARK: - boost::
130 
131  template <typename TheStringIterator>
132  void swap(
135  );
136 
137 }
138 
140 
141 #endif
A Source of CodePoint strings from the back of a string.
bool Equals(CodePointStringBackSource const &) const
void Swap(CodePointStringBackSource &)
virtual std::string & operator*() const
ThisStringIterator thisCodePointEnd
The current CodePoint string end.
ThisStringIterator thisCodePointIterator
The current CodePoint string iterator.
CodePointStringBackSource(ThisStringIterator theStringStart, ThisStringIterator const theStringEnd)
std::string thisCodePoint
The current CodePoint string.
virtual void Pop()
Pops the current item.
CodePointStringBackSource & operator=(CodePointStringBackSource)
void Update()
Populates the CodePoint string with each code unit of the next CodePoint.
A partial implementation of Source.
Om header file.
bool operator==(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
bool operator!=(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
The Om library.
Definition: code_point.hpp:26
void swap(Om::Language::Expression &, Om::Language::Expression &)