Om
singleton_source.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Source_SingletonSource_
16 
17  #define Om_Source_SingletonSource_ \
18  Om::Source::SingletonSource
19 
21 
22 namespace Om {
23 
24  namespace Source {
25 
26  // MARK: - Om::Source::SingletonSource
27 
32  template <typename ThisItem>
34  public DefaultSource<
35  ThisItem,
36  SingletonSource<ThisItem>
37  > {
38 
39  public: // MARK: public (non-static)
40 
42 
47  explicit SingletonSource(ThisItem & theItem);
48 
50 
51  virtual bool operator !() const;
52 
53  virtual ThisItem & operator *() const;
54 
55  using DefaultSource<
56  ThisItem,
58  >::Equals;
59 
60  bool Equals(SingletonSource const &) const;
61 
62  virtual void Pop();
63 
65 
66  private: // MARK: private (non-static)
67 
68  ThisItem * thisItem;
69 
70  };
71 
72  // MARK: - Om::Source::
73 
74  template <typename TheItem>
78  );
79 
80  template <typename TheItem>
84  );
85 
86  }
87 
88 }
89 
90 namespace boost {
91 
92  // MARK: - boost::
93 
94  template <typename TheItem>
95  void swap(
98  );
99 
100 }
101 
103 
104 #endif
A partial implementation of Source.
void Swap(SingletonSource &)
virtual ThisItem & operator*() const
virtual void Pop()
Pops the current item.
SingletonSource & operator=(SingletonSource)
SingletonSource(ThisItem &theItem)
virtual bool operator!() const
bool Equals(SingletonSource const &) const
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 &)
Om source file.