OPAL (Object Oriented Parallel Accelerator Library)
2024.2
OPAL
SampleCmd.h
Go to the documentation of this file.
1
//
2
// Class SampleCmd
3
// This class defines the SAMPLE command.
4
//
5
// Copyright (c) 2018, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6
// All rights reserved
7
//
8
// Implemented as part of the PhD thesis
9
// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10
//
11
// This file is part of OPAL.
12
//
13
// OPAL is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20
//
21
#ifndef OPAL_SampleCmd_HH
22
#define OPAL_SampleCmd_HH
23
24
#include "
AbstractObjects/Action.h
"
25
26
#include <string>
27
28
class
SampleCmd
:
public
Action
{
29
30
public
:
31
33
SampleCmd
();
34
35
virtual
~SampleCmd
();
36
38
virtual
SampleCmd
*
clone
(
const
std::string &
name
);
39
41
virtual
void
execute
();
42
43
private
:
44
45
// Not implemented.
46
SampleCmd
(
const
SampleCmd
&) =
delete
;
47
void
operator=
(
const
SampleCmd
&) =
delete
;
48
49
// Clone constructor.
50
SampleCmd
(
const
std::string &
name
,
SampleCmd
*parent);
51
52
void
stashEnvironment
();
53
void
popEnvironment
();
54
};
55
56
#endif
Action.h
name
const std::string name
Definition
MaxNormRadialPeak.cpp:32
Action::Action
Action(int size, const char *name, const char *help)
Constructor for exemplars.
Definition
Action.cpp:54
SampleCmd::execute
virtual void execute()
Execute the command.
Definition
SampleCmd.cpp:146
SampleCmd::stashEnvironment
void stashEnvironment()
Definition
SampleCmd.cpp:494
SampleCmd::SampleCmd
SampleCmd()
Exemplar constructor.
Definition
SampleCmd.cpp:90
SampleCmd::SampleCmd
SampleCmd(const SampleCmd &)=delete
SampleCmd::clone
virtual SampleCmd * clone(const std::string &name)
Make clone.
Definition
SampleCmd.cpp:142
SampleCmd::~SampleCmd
virtual ~SampleCmd()
Definition
SampleCmd.cpp:139
SampleCmd::popEnvironment
void popEnvironment()
Definition
SampleCmd.cpp:501
SampleCmd::operator=
void operator=(const SampleCmd &)=delete