Greens-code
A modular quantum transport code
rectangle_visitor.hpp
1 #ifndef RECTANGLE_VISITOR_HPP
2 #define RECTANGLE_VISITOR_HPP
3 
4 #include "shared_ptr.hpp"
5 
6 class Rectangle;
7 typedef STD_TR1::shared_ptr<const Rectangle> Rectangle_const_ref;
8 
9 
10 /*****************************
11  *
12  * class Rectangle_Visitor
13  *
14  * Abstract base class that builds up geometries
15  * A rectangle keeps track of the Hamiltonians needed to calculate it
16  * and offers a method to create the Hamilton matrix as well
17  * as the Green's function
18  */
19 
20 
22 public:
23  virtual ~Rectangle_Visitor() throw() {};
24 
25  void visit_Arbitrary_Rectangle(const Rectangle_const_ref& r) { Arbitrary_Rectangle(r);};
26  void visit_Periodic_Rectangle(const Rectangle_const_ref& r) { Periodic_Rectangle(r);};
27  void visit_Composed_Rectangle(const Rectangle_const_ref& r) { Composed_Rectangle(r);};
28  void visit_Dependent_Rectangle(const Rectangle_const_ref& r) { Dependent_Rectangle(r);};
29  void visit_Phonon_Rectangle(const Rectangle_const_ref& r) { Phonon_Rectangle(r);};
30 private:
31  virtual void Arbitrary_Rectangle(const Rectangle_const_ref&) = 0;
32  virtual void Periodic_Rectangle(const Rectangle_const_ref&) = 0;
33  virtual void Composed_Rectangle(const Rectangle_const_ref&) = 0;
34  virtual void Dependent_Rectangle(const Rectangle_const_ref&) = 0;
35  virtual void Phonon_Rectangle(const Rectangle_const_ref&) = 0;
36 };
37 
38 #endif
Abstract class that defines a geomeetry.
Definition: rectangle.hpp:31
Definition: rectangle_visitor.hpp:21