Class documentation of Concepts

Loading...
Searching...
No Matches
elementPairs.hh
Go to the documentation of this file.
1
5#ifndef elementPairs_hh
6#define elementPairs_hh
7
8#include "space/element.hh"
10
11namespace concepts {
12
13 // *********************************************************** ElementPair **
14
24 template<typename F>
26 public:
27 virtual ~ElementPair() { }
29 virtual const concepts::Element<F>& elm1() const = 0;
31 virtual const concepts::Element<F>& elm2() const = 0;
32 };
33
34 // ******************************************************* ElementPairList **
35
40 template<typename F>
42 public:
44
53 bool remove = true) :
54 elmPairs_(elmPairs), remove_(remove) {}
55
57 { if (remove_)
58 concepts::Joiner<ElementPair<F>*, 1>::destructor(elmPairs_); }
59
64 elmPairs_ = new concepts::Joiner<ElementPair<F>*, 1>(elmPair, elmPairs_);
65 }
66
69 (*elmPairs_); }
70 private:
72 concepts::Joiner<ElementPair<F>*, 1>* elmPairs_;
73
74 const bool remove_;
75 };
76
77} // namespace concepts
78
79#endif // elementPairs_hh
void add(ElementPair< F > *elmPair)
ElementPairList(concepts::Joiner< ElementPair< F > *, 1 > *elmPairs=0, bool remove=true)
Scanner * scan() const
Returns a scanner over the list of ElementPairs.
virtual const concepts::Element< F > & elm2() const =0
Returns reference to the second element.
virtual const concepts::Element< F > & elm1() const =0
Returns reference to the first element.
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320