OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
Option.h
Go to the documentation of this file.
1 //
2 // Class Option
3 // The OPTION command.
4 // The user interface allowing setting of OPAL options.
5 // The actual option flags are contained in namespace Options.
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_Option_HH
21 #define OPAL_Option_HH
22 
23 #include "AbstractObjects/Action.h"
24 #include "Utilities/Options.h"
25 
26 #include <boost/bimap.hpp>
27 
28 #include <string>
29 
30 class Option: public Action {
31 
32 public:
33 
34  Option();
35  virtual ~Option();
36 
38  virtual Option* clone(const std::string& name);
39 
41  virtual void execute();
42 
43 private:
44 
45  void handlePsDumpFrame(const std::string& dumpFrame);
46 
47  static std::string getDumpFrameString(const DumpFrame& df);
48 
49  using Object::update;
50  void update(const std::vector<Attribute>&);
51 
52  // Not implemented.
53  Option(const Option&);
54  void operator=(const Option&);
55 
56  // Clone constructor.
57  Option(const std::string& name, Option* parent);
58 
59  static const boost::bimap<DumpFrame, std::string> bmDumpFrameString_s;
60 };
61 
62 #endif // OPAL_Option_HH
void handlePsDumpFrame(const std::string &dumpFrame)
Definition: Option.cpp:526
static std::string getDumpFrameString(const DumpFrame &df)
Definition: Option.cpp:530
virtual Option * clone(const std::string &name)
Make clone.
Definition: Option.cpp:361
virtual void update()
Update this object.
Definition: Object.cpp:263
void operator=(const Option &)
virtual void execute()
Execute the command.
Definition: Option.cpp:366
static const boost::bimap< DumpFrame, std::string > bmDumpFrameString_s
Definition: Option.h:59
virtual ~Option()
Definition: Option.cpp:357
Definition: Option.h:30
const std::string name
DumpFrame
Definition: Options.h:26
The base class for all OPAL actions.
Definition: Action.h:30
Option()
Definition: Option.cpp:105