OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Patch.h
Go to the documentation of this file.
1 #ifndef CLASSIC_Patch_HH
2 #define CLASSIC_Patch_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Patch.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Patch
13 // Defines the abstract interface for a geometry patch.
14 //
15 // ------------------------------------------------------------------------
16 // Class category: AbsBeamline
17 // ------------------------------------------------------------------------
18 //
19 // $Date: 2000/03/27 09:32:31 $
20 // $Author: fci $
21 //
22 // ------------------------------------------------------------------------
23 
24 #include "AbsBeamline/Component.h"
25 
26 
27 // Class Patch
28 // ------------------------------------------------------------------------
30 // Class Patch defines the abstract interface for geometric patches,
31 // i.e. a geometric transform representing a misalignment of local
32 // coordinate systems of two subsequent element with each other.
33 
34 class Patch: public Component {
35 
36 public:
37 
39  explicit Patch(const std::string &name);
40 
41  Patch();
42  Patch(const Patch &);
43  virtual ~Patch();
44 
46  virtual void accept(BeamlineVisitor &) const override;
47 
49  virtual const Euclid3D &getPatch() const = 0;
50 
51  virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) override;
52 
53  virtual void finalise() override;
54 
55  virtual bool bends() const override;
56 
57  virtual ElementBase::ElementType getType() const override;
58 
59  virtual void getDimensions(double &zBegin, double &zEnd) const override;
60 
61 private:
62 
63  // Not implemented.
64  void operator=(const Patch &);
65 };
66 
67 #endif // CLASSIC_Patch_HH
virtual void getDimensions(double &zBegin, double &zEnd) const override
Definition: Patch.cpp:62
virtual ~Patch()
Definition: Patch.cpp:43
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
Definition: Patch.cpp:51
Displacement and rotation in space.
Definition: Euclid3D.h:68
virtual ElementBase::ElementType getType() const override
Get element type std::string.
Definition: Patch.cpp:67
virtual void accept(BeamlineVisitor &) const override
Apply visitor to patch.
Definition: Patch.cpp:47
virtual bool bends() const override
Definition: Patch.cpp:58
virtual void finalise() override
Definition: Patch.cpp:55
const std::string name
Interface for a geometric patch.
Definition: Patch.h:34
Interface for a single beam element.
Definition: Component.h:51
virtual const Euclid3D & getPatch() const =0
Get patch transform.
Patch()
Definition: Patch.cpp:28
Abstract algorithm.
void operator=(const Patch &)