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