source: src/Actions/GlobalListOfActions.hpp@ 0ec9f5

Candidate_v1.7.0 stable
Last change on this file since 0ec9f5 was 0ec9f5, checked in by Frederik Heber <frederik.heber@…>, 5 years ago

Added UndoMarkAction.

NOTE: This action is necessary as not all actions are actually recorded
in the history. For example, the UndoAction is an action that is not
pushed into the history deque and also must not as further undos would
then become impossible. There are other actions that just do output
or similar things that do not change the state.
This makes it impossible to undo back to a certain state by blindly
counting actions as one cannot know from the outside whether an action
is stateless or not.

undoing till the set mark.

  • TESTS: added regression test case on undo-mark.
  • Property mode set to 100644
File size: 5.9 KB
Line 
1/*
2 * GlobalListOfActions.hpp
3 *
4 * Created on: Sep 21, 2011
5 * Author: heber
6 */
7
8#ifndef GLOBALLISTOFACTIONS_HPP_
9#define GLOBALLISTOFACTIONS_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <boost/preprocessor/seq/push_back.hpp>
17#include <boost/preprocessor/seq/remove.hpp>
18
19// this is global list of actions valid for all cases
20// PLEASE adhere to the alphabetical ordering of the list of Actions
21// NOTE that Redo must remain at the front due to technical reasons
22#define GLOBALLISTOFACTIONS_initial \
23 (Redo) \
24 (AnalysisAverageMoleculeForce) \
25 (AnalysisDipoleAngularCorrelation) \
26 (AnalysisDipoleCorrelation) \
27 (AnalysisMolecularVolume) \
28 (AnalysisPairCorrelation) \
29 (AnalysisPointCorrelation) \
30 (AnalysisPrincipalAxisSystem) \
31 (AnalysisSurfaceCorrelation) \
32 (AtomAdd) \
33 (AtomBondify) \
34 (AtomChangeElement) \
35 (AtomMirror) \
36 (AtomRandomPerturbation) \
37 (AtomRemove) \
38 (AtomRotateAroundOriginByAngle) \
39 (AtomSaturate) \
40 (AtomSaveSelectedAtoms) \
41 (AtomTranslate) \
42 (AtomTranslateToOrigin) \
43 (BondAdd) \
44 (BondRemove) \
45 (BondSetDegree) \
46 (CommandDryRun) \
47 (CommandElementDb) \
48 (CommandBondLengthTable) \
49 (CommandFastParsing) \
50 (CommandHelp) \
51 (CommandHelpRedistribute) \
52 (CommandNoDryRun) \
53 (CommandSetRandomNumbersEngine) \
54 (CommandSetRandomNumbersDistribution) \
55 (CommandStoreSession) \
56 (CommandUndoMark) \
57 (CommandVerbose) \
58 (CommandVersion) \
59 (CommandWarranty) \
60 (FillRegularGrid) \
61 (FillSurface) \
62 (FillSuspendInMolecule) \
63 (FillVolume) \
64 (FragmentationAnalyseFragmentationResults) \
65 (FragmentationClearFragmentationResults) \
66 (FragmentationClearFragmentationState) \
67 (FragmentationFragmentation) \
68 (FragmentationFragmentationAutomation) \
69 (FragmentationMolecularDynamics) \
70 (FragmentationParseFragmentJobs) \
71 (FragmentationParseFragmentResults) \
72 (FragmentationSaveFragmentResults) \
73 (FragmentationStoreSaturatedFragment) \
74 (FragmentationStructuralOptimization) \
75 (GeometryDistanceToVector) \
76 (GeometryInputToVector) \
77 (GeometryPlaneToVector) \
78 (GeometryPositionToVector) \
79 (GeometryRemove) \
80 (GraphChemicalSpaceEvaluator) \
81 (GraphUpdateMolecules) \
82 (GraphCorrectBondDegree) \
83 (GraphCreateAdjacency) \
84 (GraphDepthFirstSearch) \
85 (GraphDestroyAdjacency) \
86 (GraphPrintSelectedAtomsAsGraphString) \
87 (GraphSubgraphDissection) \
88 (MoleculeBondFile) \
89 (MoleculeChangeName) \
90 (MoleculeChangeBondAngle) \
91 (MoleculeCopy) \
92 (MoleculeForceAnnealing) \
93 (MoleculeLinearInterpolationofTrajectories) \
94 (MoleculeLoad) \
95 (MoleculeRemove) \
96 (MoleculeRotateAroundBond) \
97 (MoleculeRotateAroundSelfByAngle) \
98 (MoleculeRotateToPrincipalAxisSystem) \
99 (MoleculeSaveAdjacency) \
100 (MoleculeSaveBonds) \
101 (MoleculeSaveSelectedMolecules) \
102 (MoleculeSaveEnergies) \
103 (MoleculeStretchBond) \
104 (MoleculeTranslate) \
105 (MoleculeVerletIntegration) \
106 (PotentialFitPartialCharges) \
107 (PotentialParseAtomFragments) \
108 (PotentialParseHomologies) \
109 (PotentialParseParticleParameters) \
110 (PotentialParsePotentials) \
111 (PotentialSaveAtomFragments) \
112 (PotentialSaveHomologies) \
113 (PotentialSaveParticleParameters) \
114 (PotentialSavePotentials) \
115 (ParserSaveSelectedAtomsAsExtTypes) \
116 (ParserSetParserParameters) \
117 (ParserSetOutputFormats) \
118 (ParserSetTremoloAtomdata) \
119 (Undo) \
120 (SelectionAllAtoms) \
121 (SelectionAllAtomsInsideVolume) \
122 (SelectionAllAtomsOfMolecule) \
123 (SelectionAllMolecules) \
124 (SelectionAllShapes) \
125 (SelectionAtomBondNeighbors) \
126 (SelectionAtomByElement) \
127 (SelectionAtomById) \
128 (SelectionAtomByName) \
129 (SelectionAtomByOrder) \
130 (SelectionAtomByRandom) \
131 (SelectionClearAllAtoms) \
132 (SelectionClearAllMolecules) \
133 (SelectionInvertAtoms) \
134 (SelectionInvertMolecules) \
135 (SelectionMoleculeOfAtom) \
136 (SelectionMoleculeByFormula) \
137 (SelectionMoleculeById) \
138 (SelectionMoleculeByName) \
139 (SelectionMoleculeByOrder) \
140 (SelectionNotAllAtoms) \
141 (SelectionNotAllAtomsInsideVolume) \
142 (SelectionNotAllAtomsOfMolecule) \
143 (SelectionNotAllMolecules) \
144 (SelectionNotAllShapes) \
145 (SelectionNotAtomByElement) \
146 (SelectionNotAtomById) \
147 (SelectionNotAtomByName) \
148 (SelectionNotAtomByOrder) \
149 (SelectionNotMoleculeOfAtom) \
150 (SelectionNotMoleculeByFormula) \
151 (SelectionNotMoleculeById) \
152 (SelectionNotMoleculeByName) \
153 (SelectionNotMoleculeByOrder) \
154 (SelectionNotShapeByName) \
155 (SelectionPopAtoms) \
156 (SelectionPushAtoms) \
157 (SelectionPopMolecules) \
158 (SelectionPushMolecules) \
159 (SelectionShapeByName) \
160 (ShapeCombineShapes) \
161 (ShapeCreateShape) \
162 (ShapeRemoveShape) \
163 (ShapeRotateShape) \
164 (ShapeStretchShape) \
165 (ShapeTranslateShape) \
166 (TesselationConvexEnvelope) \
167 (TesselationNonConvexEnvelope) \
168 (WorldAddEmptyBoundary) \
169 (WorldBoundInBox) \
170 (WorldCenterInBox) \
171 (WorldCenterOnEdge) \
172 (WorldChangeBox) \
173 (WorldInput) \
174 (WorldOutput) \
175 (WorldOutputAs) \
176 (WorldRepeatBox) \
177 (WorldScaleBox) \
178 (WorldSetBoundaryConditions) \
179 (WorldSetDefaultName) \
180 (WorldSetWorldTime) \
181 (WorldStepWorldTime)
182
183// extend list of actions in case levmar is available
184#ifdef HAVE_LEVMAR
185#define GLOBALLISTOFACTIONS_LEVMAR \
186 BOOST_PP_SEQ_PUSH_BACK( \
187 BOOST_PP_SEQ_PUSH_BACK( \
188 GLOBALLISTOFACTIONS_initial, \
189 PotentialFitPotential \
190 ), \
191 PotentialFitCompoundPotential \
192 )
193#else
194#define GLOBALLISTOFACTIONS_LEVMAR \
195 GLOBALLISTOFACTIONS_initial
196#endif /* HAVE_LEVMAR */
197
198// define final list
199#ifdef HAVE_PYTHON
200#define GLOBALLISTOFACTIONS_PYTHON \
201 BOOST_PP_SEQ_PUSH_BACK( \
202 GLOBALLISTOFACTIONS_LEVMAR, \
203 CommandLoadSession \
204 )
205#else
206#define GLOBALLISTOFACTIONS_PYTHON \
207 GLOBALLISTOFACTIONS_LEVMAR
208#endif
209
210#define GLOBALLISTOFACTIONS GLOBALLISTOFACTIONS_PYTHON
211
212// define python list
213// skips CommandLoadSession as this causes dangerous infinite loops
214#define GLOBALLISTOFPYTHONACTIONS \
215 GLOBALLISTOFACTIONS_LEVMAR
216
217#endif /* GLOBALLISTOFACTIONS_HPP_ */
218
Note: See TracBrowser for help on using the repository browser.