OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
RangeSelector.h
Go to the documentation of this file.
1//
2// Class RangeSelector
3// This abstract class runs through a beam line and calls the pure
4// virtual methods RangeSelector::handleXXX() for each element or
5// beamline in a range.
6//
7// Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
8// All rights reserved
9//
10// This file is part of OPAL.
11//
12// OPAL is free software: you can redistribute it and/or modify
13// it under the terms of the GNU General Public License as published by
14// the Free Software Foundation, either version 3 of the License, or
15// (at your option) any later version.
16//
17// You should have received a copy of the GNU General Public License
18// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
19//
20#ifndef OPAL_RangeSelector_HH
21#define OPAL_RangeSelector_HH
22
25
26class Beamline;
27
29public:
31 // Attach visitor to a beamline, remember the range.
32 RangeSelector(const Beamline&, const RangeRep& range);
33
34 virtual ~RangeSelector();
35
37 virtual void execute();
38
40 virtual void visitFlaggedElmPtr(const FlaggedElmPtr&);
41
42protected:
44 // When overriding, make sure the beamline members are handled.
45 virtual void handleBeamline(const FlaggedElmPtr&);
46
48 virtual void handleElement(const FlaggedElmPtr&);
49
52
53private:
54 // Not implemented.
58};
59
60#endif // OPAL_RangeSelector_HH
An abstract sequence of beam line components.
Definition Beamline.h:34
A section of a beam line.
Representation of a range within a beam line or sequence.
Definition RangeRep.h:33
virtual void handleElement(const FlaggedElmPtr &)
The operation to be done for elements.
virtual ~RangeSelector()
virtual void visitFlaggedElmPtr(const FlaggedElmPtr &)
Apply the visitor to an FlaggedElmPtr.
RangeSelector(const RangeSelector &)
virtual void handleBeamline(const FlaggedElmPtr &)
The operation to be done for beamlines.
virtual void execute()
Execute the algorithm.
void operator=(const RangeSelector &)
RangeRep itsRange
Working data for range.