OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
DriftRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_DriftRep_HH
2 #define CLASSIC_DriftRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: DriftRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: DriftRep
13 //
14 // ------------------------------------------------------------------------
15 // Class category: BeamlineCore
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:33 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
23 #include "AbsBeamline/Drift.h"
25 #include "Fields/NullField.h"
26 
27 
28 // Class DriftRep
29 // ------------------------------------------------------------------------
31 
32 class DriftRep: public Drift {
33 
34 public:
35 
37  explicit DriftRep(const std::string &name);
38 
39  DriftRep();
40  DriftRep(const DriftRep &);
41  virtual ~DriftRep();
42 
44  // Return an identical deep copy of the element.
45  virtual ElementBase *clone() const;
46 
48  // This method constructs a Channel permitting read/write access to
49  // the attribute [b]aKey[/b] and returns it.
50  // If the attribute does not exist, it returns NULL.
51  virtual Channel *getChannel(const std::string &aKey, bool = false);
52 
54  // Version for non-constant object.
55  virtual NullField &getField();
56 
58  // Version for constant object.
59  virtual const NullField &getField() const;
60 
62  // Version for non-constant object.
63  virtual StraightGeometry &getGeometry();
64 
66  // Version for constant object.
67  virtual const StraightGeometry &getGeometry() const;
68 
70  // Return the image of the element, containing the name and type string
71  // of the element, and a copy of the user-defined attributes.
72  virtual ElementImage *getImage() const;
73 
74 private:
75 
76  // Not implemented.
77  void operator=(const DriftRep &);
78 
81 
84 };
85 
86 #endif // CLASSIC_DriftRep_HH
virtual NullField & getField()
Get field.
Definition: DriftRep.cpp:88
Interface for basic beam line object.
Definition: ElementBase.h:128
void operator=(const DriftRep &)
virtual ElementImage * getImage() const
Construct an image.
Definition: DriftRep.cpp:106
DriftRep()
Definition: DriftRep.cpp:50
Interface for drift space.
Definition: Drift.h:33
A zero electromagnetic field.
Definition: NullField.h:30
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
Definition: DriftRep.cpp:77
NullField field
The zero magnetic field.
Definition: DriftRep.h:80
An image of an element.
Definition: ElementImage.h:35
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
StraightGeometry geometry
The geometry.
Definition: DriftRep.h:83
virtual StraightGeometry & getGeometry()
Get geometry.
Definition: DriftRep.cpp:97
const std::string name
virtual ~DriftRep()
Definition: DriftRep.cpp:68
virtual ElementBase * clone() const
Return clone.
Definition: DriftRep.cpp:72
Representation for a drift space.
Definition: DriftRep.h:32