OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
MultipoleRep.h
Go to the documentation of this file.
1 #ifndef CLASSIC_MultipoleRep_HH
2 #define CLASSIC_MultipoleRep_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: MultipoleRep.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: MultipoleRep
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/Multipole.h"
25 
26 
27 // Class MultipoleRep
28 // ------------------------------------------------------------------------
30 
31 class MultipoleRep: public Multipole {
32 
33 public:
34 
36  explicit MultipoleRep(const std::string &name);
37 
38  MultipoleRep();
39  MultipoleRep(const MultipoleRep &);
40  virtual ~MultipoleRep();
41 
43  // Return an identical deep copy of the element.
44  virtual ElementBase *clone() const;
45 
47  // This method constructs a Channel permitting read/write access to
48  // the attribute [b]aKey[/b]r and returns it.
49  // If the attribute does not exist, it returns NULL.
50  virtual Channel *getChannel(const std::string &aKey, bool = false);
51 
53  // Version for non-constant object.
54  virtual BMultipoleField &getField();
55 
57  // Version for constant object.
58  virtual const BMultipoleField &getField() const;
59 
61  // Return the element geometry.
62  // Version for non-constant object.
63  virtual StraightGeometry &getGeometry();
64 
66  // Return the element geometry
67  // Version for constant object.
68  virtual const StraightGeometry &getGeometry() const;
69 
71  // Return the image of the element, containing the name and type string
72  // of the element, and a copy of the user-defined attributes.
73  virtual ElementImage *getImage() const;
74 
76  virtual void setField(const BMultipoleField &field);
77 
79  // Build a FieldWrapper pointing to the multipole and return a pointer to
80  // that wrapper.
81  virtual ElementBase *makeFieldWrapper();
82 
83 private:
84 
87 
90 
91  // Not implemented.
92  void operator=(const MultipoleRep &);
93 };
94 
95 #endif // CLASSIC_MultipoleRep_HH
virtual ElementBase * clone() const
Return clone.
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual void setField(const BMultipoleField &field)
Set mulitpole field.
Representation for a general multipole.
Definition: MultipoleRep.h:31
virtual ~MultipoleRep()
virtual ElementImage * getImage() const
Construct an image.
void operator=(const MultipoleRep &)
virtual StraightGeometry & getGeometry()
Get geometry.
virtual BMultipoleField & getField()
Get field.
Interface for general multipole.
Definition: Multipole.h:46
BMultipoleField field
Multipole field.
Definition: MultipoleRep.h:89
An image of an element.
Definition: ElementImage.h:35
StraightGeometry geometry
Multipole geometry.
Definition: MultipoleRep.h:86
A geometry representing a straight line.
Abstract interface for read/write access to variable.
Definition: Channel.h:32
The magnetic field of a multipole.
const std::string name
virtual Channel * getChannel(const std::string &aKey, bool=false)
Construct a read/write channel.
virtual ElementBase * makeFieldWrapper()
Allow field errors.