OPAL (Object Oriented Parallel Accelerator Library) 2024.2
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
24#include "Utilities/Options.h"
25
26#include <string>
27
28class Option: public Action {
29
30public:
31 Option();
32 virtual ~Option();
33
35 virtual Option* clone(const std::string& name);
36
38 virtual void execute();
39
40private:
41 void handlePsDumpFrame(std::string_view dumpFrameName) noexcept;
42 static std::string getDumpFrameString(const DumpFrame& df) noexcept;
43
44 using Object::update;
45 void update(const std::vector<Attribute>&);
46
47 // Not implemented.
48 Option(const Option&);
49 void operator=(const Option&);
50
51 // Clone constructor.
52 Option(const std::string& name, Option* parent);
53};
54
55#endif // OPAL_Option_HH
DumpFrame
Definition Options.h:26
const std::string name
The base class for all OPAL actions.
Definition Action.h:30
virtual void update()
Update this object.
Definition Object.cpp:263
virtual ~Option()
Definition Option.cpp:352
virtual void execute()
Execute the command.
Definition Option.cpp:361
virtual void update()
Update this object.
Definition Object.cpp:263
Option(const Option &)
static std::string getDumpFrameString(const DumpFrame &df) noexcept
Definition Option.cpp:531
void handlePsDumpFrame(std::string_view dumpFrameName) noexcept
Definition Option.cpp:527
virtual Option * clone(const std::string &name)
Make clone.
Definition Option.cpp:356
Option()
Definition Option.cpp:100
void operator=(const Option &)