Om
code_point_string_front_source.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Source_CodePointStringFrontSource_
16 
17  #define Om_Source_CodePointStringFrontSource_ \
18  Om::Source::CodePointStringFrontSource
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::CodePointStringFrontSource
33 
42  template <typename ThisStringIterator>
44  public DefaultSource<
45  std::string,
46  CodePointStringFrontSource<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(CodePointStringFrontSource const &) const;
74 
75  virtual void Pop();
76 
78 
79  private: // MARK: private (non-static)
80 
85  void Update();
86 
87  ThisStringIterator thisStringIterator;
88 
89  ThisStringIterator thisStringEnd;
90 
94  mutable std::string thisCodePoint;
95 
96  };
97 
98  // MARK: - Om::Source::
99 
100  template <typename TheStringIterator>
104  );
105 
106  template <typename TheStringIterator>
110  );
111 
112  }
113 
114 }
115 
116 namespace boost {
117 
118  // MARK: - boost::
119 
120  template <typename TheStringIterator>
121  void swap(
124  );
125 
126 }
127 
129 
130 #endif
A Source of CodePoint strings from the front of a string.
bool Equals(CodePointStringFrontSource const &) const
virtual void Pop()
Pops the current item.
void Update()
Populates the CodePoint string with each code unit of the next CodePoint.
CodePointStringFrontSource(ThisStringIterator theStringStart, ThisStringIterator const theStringEnd)
virtual std::string & operator*() const
CodePointStringFrontSource & operator=(CodePointStringFrontSource)
void Swap(CodePointStringFrontSource &)
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 &)