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 
11 namespace concepts {
12 
13  // *********************************************************** ElementPair **
14 
24  template<typename F>
25  class ElementPair {
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 
63  void add(ElementPair<F>* elmPair) {
65  }
66 
69  (*elmPairs_); }
70  private:
73 
74  const bool remove_;
75  };
76 
77 } // namespace concepts
78 
79 #endif // elementPairs_hh
An abstract class for an element of a space.
Definition: exceptions.hh:15
Gives access to a pair of elements.
Definition: elementPairs.hh:25
virtual const concepts::Element< F > & elm2() const =0
Returns reference to the second element.
Joiner class with multiple successors, i.e.
ElementPairList(concepts::Joiner< ElementPair< F > *, 1 > *elmPairs=0, bool remove=true)
Constructor.
Definition: elementPairs.hh:52
concepts::Joiner< ElementPair< F > *, 1 > * elmPairs_
List of ElementPairs.
Definition: elementPairs.hh:72
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
Holds a list of ElementPair and allows to scan over this list.
Definition: elementPairs.hh:41
void add(ElementPair< F > *elmPair)
Adds the new ElementPair to the beginning of the list.
Definition: elementPairs.hh:63
virtual const concepts::Element< F > & elm1() const =0
Returns reference to the first element.
Scanner * scan() const
Returns a scanner over the list of ElementPairs.
Definition: elementPairs.hh:68
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Scanner for a list of pointers.
concepts::Scan< ElementPair< F > > Scanner
Definition: elementPairs.hh:43
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich