OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
EditReflect.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: EditReflect.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: EditReflect
10 // The class for the OPAL sequence editor REFLECT command.
11 //
12 // ------------------------------------------------------------------------
13 //
14 // $Date: 2000/03/27 09:33:38 $
15 // $Author: Andreas Adelmann $
16 //
17 // ------------------------------------------------------------------------
18 
19 #include "Editor/EditReflect.h"
20 #include "Editor/Edit.h"
21 #include "Utilities/Options.h"
22 #include <iostream>
23 
24 
25 // Class EditReflect
26 // ------------------------------------------------------------------------
27 
29  Editor(0, "REFLECT",
30  "The \"REFLECT\" inverts the order of all sequence positions.")
31 {}
32 
33 
34 EditReflect::EditReflect(const std::string &name, EditReflect *parent):
35  Editor(name, parent)
36 {}
37 
38 
40 {}
41 
42 
43 EditReflect *EditReflect::clone(const std::string &name) {
44  return new EditReflect(name, this);
45 }
46 
47 
50 
51  if(Options::info) {
52  std::cerr << "\nSequence has been reflected.\n" << std::endl;
53  }
54 }
virtual ~EditReflect()
Definition: EditReflect.cpp:39
virtual EditReflect * clone(const std::string &name)
Make clone.
Definition: EditReflect.cpp:43
bool info
Info flag.
Definition: Options.cpp:8
The base class for all OPAL sequence editor commands.
Definition: Editor.h:31
EditReflect()
Exemplar constructor.
Definition: EditReflect.cpp:28
void reflect()
Reflect the edit sequence.
Definition: Edit.cpp:288
The sequence editor REFLECT command.
Definition: EditReflect.h:28
static Edit * block
Pointer to the edit data.
Definition: Edit.h:134
virtual void execute()
Execute the command.
Definition: EditReflect.cpp:48
const std::string name
Inform & endl(Inform &inf)
Definition: Inform.cpp:42