OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Replacer.h
Go to the documentation of this file.
1#ifndef OPAL_Replacer_HH
2#define OPAL_Replacer_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: Replacer.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: Replacer
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:42 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include <string>
23
24class Beamline;
25class ElementBase;
26
27// Class Replacer
28// ------------------------------------------------------------------------
30
31class Replacer : public DefaultVisitor {
32public:
34 // Attach visitor to a beamline, remember the range.
35 Replacer(const Beamline&, const std::string& name, ElementBase* elm);
36
37 virtual ~Replacer();
38
40 virtual void visitFlaggedElmPtr(const FlaggedElmPtr&);
41
42private:
43 // Not implemented.
46 void operator=(const Replacer&);
47
48 // The name to be replaced.
49 const std::string itsName;
50
51 // The new element replacing the old one.
53};
54
55#endif // OPAL_Replacer_HH
An abstract sequence of beam line components.
Definition Beamline.h:34
A section of a beam line.
Replace all references to named element by a new version.
Definition Replacer.h:31
const std::string itsName
Definition Replacer.h:49
virtual ~Replacer()
Definition Replacer.cpp:34
ElementBase * newBase
Definition Replacer.h:52
virtual void visitFlaggedElmPtr(const FlaggedElmPtr &)
Apply the visitor to an FlaggedElmPtr.
Definition Replacer.cpp:36
void operator=(const Replacer &)
Replacer(const Replacer &)