OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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 "Utilities/BiMap.h"
27
28#include <string>
29
30class Option : public Action {
31public:
32 Option();
33 virtual ~Option();
34
36 virtual Option* clone(const std::string& name);
37
39 virtual void execute();
40
41private:
42 void handlePsDumpFrame(const std::string& dumpFrame);
43
44 static std::string getDumpFrameString(const DumpFrame& df);
45
46 using Object::update;
47 void update(const std::vector<Attribute>&);
48
49 // Not implemented.
50 Option(const Option&);
51 void operator=(const Option&);
52
53 // Clone constructor.
54 Option(const std::string& name, Option* parent);
55
57};
58
59#endif // OPAL_Option_HH
DumpFrame
Definition Options.h:26
The base class for all OPAL actions.
Definition Action.h:29
Simple bidirectional map with lookup in both directions.
Definition BiMap.h:28
virtual void update()
Update this object.
Definition Object.cpp:239
virtual ~Option()
Definition Option.cpp:400
virtual void execute()
Execute the command.
Definition Option.cpp:404
virtual void update()
Update this object.
Definition Object.cpp:239
Option(const Option &)
void handlePsDumpFrame(const std::string &dumpFrame)
Definition Option.cpp:570
static const BiMap< DumpFrame, std::string > bmDumpFrameString_s
Definition Option.h:44
virtual Option * clone(const std::string &name)
Make clone.
Definition Option.cpp:402
static std::string getDumpFrameString(const DumpFrame &df)
Definition Option.cpp:574
Option()
Definition Option.cpp:102
void operator=(const Option &)