Changeset b5b01e for src/Actions/MoleculeAction
- Timestamp:
- Sep 19, 2013, 8:23:52 PM (12 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 6367dd
- Parents:
- f92ef3
- git-author:
- Frederik Heber <heber@…> (08/19/13 19:04:10)
- git-committer:
- Frederik Heber <heber@…> (09/19/13 20:23:52)
- Location:
- src/Actions/MoleculeAction
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/BondFileAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr MoleculeBondFileAction::performCall() {55 ActionState::ptr MoleculeBondFileAction::performCall() { 56 56 molecule *mol = NULL; 57 57 … … 71 71 } 72 72 73 Action ::state_ptr MoleculeBondFileAction::performUndo(Action::state_ptr _state) {73 ActionState::ptr MoleculeBondFileAction::performUndo(ActionState::ptr _state) { 74 74 // MoleculeBondFileState *state = assert_cast<MoleculeBondFileState*>(_state.get()); 75 75 … … 80 80 } 81 81 82 Action ::state_ptr MoleculeBondFileAction::performRedo(Action::state_ptr _state){82 ActionState::ptr MoleculeBondFileAction::performRedo(ActionState::ptr _state){ 83 83 return Action::failure; 84 84 } -
src/Actions/MoleculeAction/ChangeBondAngleAction.cpp
rf92ef3 rb5b01e 115 115 } 116 116 117 Action ::state_ptr MoleculeChangeBondAngleAction::performCall()117 ActionState::ptr MoleculeChangeBondAngleAction::performCall() 118 118 { 119 119 // check precondition: three atoms … … 148 148 atoms[ indices[1] ]->getPosition(), atoms[ indices[2] ]->getPosition(), 149 149 params); 150 return Action ::state_ptr(UndoState);150 return ActionState::ptr(UndoState); 151 151 } 152 152 153 Action ::state_ptr MoleculeChangeBondAngleAction::performUndo(Action::state_ptr _state) {153 ActionState::ptr MoleculeChangeBondAngleAction::performUndo(ActionState::ptr _state) { 154 154 MoleculeChangeBondAngleState *state = assert_cast<MoleculeChangeBondAngleState*>(_state.get()); 155 155 … … 160 160 second->setPosition(state->secondOldPosition); 161 161 162 return Action ::state_ptr(_state);162 return ActionState::ptr(_state); 163 163 } 164 164 165 Action ::state_ptr MoleculeChangeBondAngleAction::performRedo(Action::state_ptr _state){165 ActionState::ptr MoleculeChangeBondAngleAction::performRedo(ActionState::ptr _state){ 166 166 MoleculeChangeBondAngleState *state = assert_cast<MoleculeChangeBondAngleState*>(_state.get()); 167 167 … … 172 172 second->setPosition(state->secondNewPosition); 173 173 174 return Action ::state_ptr(_state);174 return ActionState::ptr(_state); 175 175 } 176 176 -
src/Actions/MoleculeAction/ChangeNameAction.cpp
rf92ef3 rb5b01e 49 49 #include "Action_impl_pre.hpp" 50 50 /** =========== define the function ====================== */ 51 Action ::state_ptr MoleculeChangeNameAction::performCall() {51 ActionState::ptr MoleculeChangeNameAction::performCall() { 52 52 molecule *mol = NULL; 53 53 … … 56 56 string oldName = mol->getName(); 57 57 mol->setName(params.name.get()); 58 return Action ::state_ptr(new MoleculeChangeNameState(mol,params));58 return ActionState::ptr(new MoleculeChangeNameState(mol,params)); 59 59 } else 60 60 return Action::failure; 61 61 } 62 62 63 Action ::state_ptr MoleculeChangeNameAction::performUndo(Action::state_ptr _state) {63 ActionState::ptr MoleculeChangeNameAction::performUndo(ActionState::ptr _state) { 64 64 MoleculeChangeNameState *state = assert_cast<MoleculeChangeNameState*>(_state.get()); 65 65 … … 68 68 state->params.name.set(newName); 69 69 70 return Action ::state_ptr(_state);70 return ActionState::ptr(_state); 71 71 } 72 72 73 Action ::state_ptr MoleculeChangeNameAction::performRedo(Action::state_ptr _state){73 ActionState::ptr MoleculeChangeNameAction::performRedo(ActionState::ptr _state){ 74 74 // Undo and redo have to do the same for this action 75 75 return performUndo(_state); -
src/Actions/MoleculeAction/CopyAction.cpp
rf92ef3 rb5b01e 57 57 #include "Action_impl_pre.hpp" 58 58 /** =========== define the function ====================== */ 59 Action ::state_ptr MoleculeCopyAction::performCall()59 ActionState::ptr MoleculeCopyAction::performCall() 60 60 { 61 61 std::vector<moleculeId_t> molecules; … … 71 71 } 72 72 73 return Action ::state_ptr(new MoleculeCopyState(molecules,params));73 return ActionState::ptr(new MoleculeCopyState(molecules,params)); 74 74 } 75 75 76 Action ::state_ptr MoleculeCopyAction::performUndo(Action::state_ptr _state) {76 ActionState::ptr MoleculeCopyAction::performUndo(ActionState::ptr _state) { 77 77 MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get()); 78 78 79 79 RemoveMoleculesWithAtomsByIds(state->copies); 80 80 81 return Action ::state_ptr(_state);81 return ActionState::ptr(_state); 82 82 } 83 83 84 Action ::state_ptr MoleculeCopyAction::performRedo(Action::state_ptr _state){84 ActionState::ptr MoleculeCopyAction::performRedo(ActionState::ptr _state){ 85 85 return performCall(); 86 86 } -
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
rf92ef3 rb5b01e 60 60 #include "Action_impl_pre.hpp" 61 61 /** =========== define the function ====================== */ 62 Action ::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() {62 ActionState::ptr MoleculeFillVoidWithMoleculeAction::performCall() { 63 63 if (!boost::filesystem::exists(params.fillername.get())) { 64 64 ELOG(1, "File with filler molecule " << params.fillername.get() << " does not exist!"); … … 123 123 // LOG(0, fillermolecules.size() << " molecules have been inserted."); 124 124 125 return Action ::state_ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,params));125 return ActionState::ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,params)); 126 126 } 127 127 128 Action ::state_ptr MoleculeFillVoidWithMoleculeAction::performUndo(Action::state_ptr _state) {128 ActionState::ptr MoleculeFillVoidWithMoleculeAction::performUndo(ActionState::ptr _state) { 129 129 MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get()); 130 130 … … 146 146 // as molecules and atoms from state are removed, we have to create a new one 147 147 std::vector<molecule *> fillermolecules; 148 return Action ::state_ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,state->params));148 return ActionState::ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,state->params)); 149 149 } 150 150 151 Action ::state_ptr MoleculeFillVoidWithMoleculeAction::performRedo(Action::state_ptr _state){151 ActionState::ptr MoleculeFillVoidWithMoleculeAction::performRedo(ActionState::ptr _state){ 152 152 //MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get()); 153 153 154 154 return Action::failure; 155 //return Action ::state_ptr(_state);155 //return ActionState::ptr(_state); 156 156 } 157 157 -
src/Actions/MoleculeAction/FillWithMoleculeAction.cpp
rf92ef3 rb5b01e 58 58 #include "Action_impl_pre.hpp" 59 59 /** =========== define the function ====================== */ 60 Action ::state_ptr MoleculeFillWithMoleculeAction::performCall() {60 ActionState::ptr MoleculeFillWithMoleculeAction::performCall() { 61 61 62 62 LOG(1, "INFO: Filling Box with water molecules, " … … 127 127 // LOG(0, fillermolecules.size() << " molecules have been inserted."); 128 128 129 return Action ::state_ptr(new MoleculeFillWithMoleculeState(fillermolecules,params));129 return ActionState::ptr(new MoleculeFillWithMoleculeState(fillermolecules,params)); 130 130 } 131 131 132 Action ::state_ptr MoleculeFillWithMoleculeAction::performUndo(Action::state_ptr _state) {132 ActionState::ptr MoleculeFillWithMoleculeAction::performUndo(ActionState::ptr _state) { 133 133 MoleculeFillWithMoleculeState *state = assert_cast<MoleculeFillWithMoleculeState*>(_state.get()); 134 134 … … 150 150 // as molecules and atoms from state are removed, we have to create a new one 151 151 std::vector<molecule *> fillermolecules; 152 return Action ::state_ptr(new MoleculeFillWithMoleculeState(fillermolecules,state->params));152 return ActionState::ptr(new MoleculeFillWithMoleculeState(fillermolecules,state->params)); 153 153 } 154 154 155 Action ::state_ptr MoleculeFillWithMoleculeAction::performRedo(Action::state_ptr _state){155 ActionState::ptr MoleculeFillWithMoleculeAction::performRedo(ActionState::ptr _state){ 156 156 //MoleculeFillWithMoleculeState *state = assert_cast<MoleculeFillWithMoleculeState*>(_state.get()); 157 157 158 158 return Action::failure; 159 //return Action ::state_ptr(_state);159 //return ActionState::ptr(_state); 160 160 } 161 161 -
src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp
rf92ef3 rb5b01e 57 57 #include "Action_impl_pre.hpp" 58 58 /** =========== define the function ====================== */ 59 Action ::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {59 ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() { 60 60 LOG(0, "STATUS: Linear interpolation between configuration " << params.start.get() << " and " << params.end.get() << "." << endl); 61 61 ASSERT(params.end.get() > params.start.get(), "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step."); … … 68 68 } 69 69 70 Action ::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performUndo(Action::state_ptr _state) {70 ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performUndo(ActionState::ptr _state) { 71 71 // MoleculeLinearInterpolationofTrajectoriesState *state = assert_cast<MoleculeLinearInterpolationofTrajectoriesState*>(_state.get()); 72 72 … … 77 77 } 78 78 79 Action ::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performRedo(Action::state_ptr _state){79 ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performRedo(ActionState::ptr _state){ 80 80 // Undo and redo have to do the same for this action 81 81 return performUndo(_state); -
src/Actions/MoleculeAction/LoadAction.cpp
rf92ef3 rb5b01e 57 57 #include "Action_impl_pre.hpp" 58 58 /** =========== define the function ====================== */ 59 Action ::state_ptr MoleculeLoadAction::performCall() {59 ActionState::ptr MoleculeLoadAction::performCall() { 60 60 // parsing file if present 61 61 if (!boost::filesystem::exists(params.filename.get())) { … … 98 98 LOG(0, "Chemical formula is " << (*iter)->getFormula()); 99 99 100 return Action ::state_ptr(100 return ActionState::ptr( 101 101 new MoleculeLoadState((*iter)->getId(),FilenamePrefix,FilenameSuffix,boost::shared_ptr<FormatParser_Parameters>(ParserParams),params) 102 102 ); … … 104 104 } 105 105 106 Action ::state_ptr MoleculeLoadAction::performUndo(Action::state_ptr _state) {106 ActionState::ptr MoleculeLoadAction::performUndo(ActionState::ptr _state) { 107 107 MoleculeLoadState *state = assert_cast<MoleculeLoadState*>(_state.get()); 108 108 … … 119 119 ParserParams->makeClone(*state->ParserParameters); 120 120 121 return Action ::state_ptr(_state);121 return ActionState::ptr(_state); 122 122 } 123 123 124 Action ::state_ptr MoleculeLoadAction::performRedo(Action::state_ptr _state){124 ActionState::ptr MoleculeLoadAction::performRedo(ActionState::ptr _state){ 125 125 MoleculeLoadState *state = assert_cast<MoleculeLoadState*>(_state.get()); 126 126 … … 145 145 LOG(0, "Chemical formula is " << (*iter)->getFormula()); 146 146 147 return Action ::state_ptr(147 return ActionState::ptr( 148 148 new MoleculeLoadState((*iter)->getId(),state->FilenamePrefix,state->FilenameSuffix,boost::shared_ptr<FormatParser_Parameters>(ParserParams),params) 149 149 ); -
src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp
rf92ef3 rb5b01e 54 54 #include "Action_impl_pre.hpp" 55 55 /** =========== define the function ====================== */ 56 Action ::state_ptr MoleculeRotateAroundSelfByAngleAction::performCall() {56 ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performCall() { 57 57 // check whether a molecule is selected 58 58 std::vector<molecule *> selectedMolecules = World::getInstance().getSelectedMolecules(); … … 82 82 } 83 83 84 return Action ::state_ptr(new MoleculeRotateAroundSelfByAngleState(selectedMolecules, params));84 return ActionState::ptr(new MoleculeRotateAroundSelfByAngleState(selectedMolecules, params)); 85 85 } 86 86 87 Action ::state_ptr MoleculeRotateAroundSelfByAngleAction::performUndo(Action::state_ptr _state) {87 ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performUndo(ActionState::ptr _state) { 88 88 MoleculeRotateAroundSelfByAngleState *state = assert_cast<MoleculeRotateAroundSelfByAngleState*>(_state.get()); 89 89 … … 100 100 } 101 101 102 return Action ::state_ptr(_state);102 return ActionState::ptr(_state); 103 103 } 104 104 105 Action ::state_ptr MoleculeRotateAroundSelfByAngleAction::performRedo(Action::state_ptr _state){105 ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performRedo(ActionState::ptr _state){ 106 106 MoleculeRotateAroundSelfByAngleState *state = assert_cast<MoleculeRotateAroundSelfByAngleState*>(_state.get()); 107 107 … … 118 118 } 119 119 120 return Action ::state_ptr(_state);120 return ActionState::ptr(_state); 121 121 } 122 122 -
src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performCall() {57 ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performCall() { 58 58 molecule *mol = NULL; 59 59 … … 72 72 } 73 73 74 Action ::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performUndo(Action::state_ptr _state) {74 ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performUndo(ActionState::ptr _state) { 75 75 // MoleculeRotateToPrincipalAxisSystemState *state = assert_cast<MoleculeRotateToPrincipalAxisSystemState*>(_state.get()); 76 76 … … 81 81 } 82 82 83 Action ::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performRedo(Action::state_ptr _state){83 ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performRedo(ActionState::ptr _state){ 84 84 return Action::failure; 85 85 } -
src/Actions/MoleculeAction/SaveAdjacencyAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr MoleculeSaveAdjacencyAction::performCall() {54 ActionState::ptr MoleculeSaveAdjacencyAction::performCall() { 55 55 molecule *mol = NULL; 56 56 … … 76 76 } 77 77 78 Action ::state_ptr MoleculeSaveAdjacencyAction::performUndo(Action::state_ptr _state) {78 ActionState::ptr MoleculeSaveAdjacencyAction::performUndo(ActionState::ptr _state) { 79 79 // MoleculeSaveAdjacencyState *state = assert_cast<MoleculeSaveAdjacencyState*>(_state.get()); 80 80 … … 85 85 } 86 86 87 Action ::state_ptr MoleculeSaveAdjacencyAction::performRedo(Action::state_ptr _state){87 ActionState::ptr MoleculeSaveAdjacencyAction::performRedo(ActionState::ptr _state){ 88 88 // Undo and redo have to do the same for this action 89 89 return performUndo(_state); -
src/Actions/MoleculeAction/SaveBondsAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr MoleculeSaveBondsAction::performCall() {54 ActionState::ptr MoleculeSaveBondsAction::performCall() { 55 55 molecule *mol = NULL; 56 56 … … 64 64 } 65 65 66 Action ::state_ptr MoleculeSaveBondsAction::performUndo(Action::state_ptr _state) {66 ActionState::ptr MoleculeSaveBondsAction::performUndo(ActionState::ptr _state) { 67 67 // MoleculeSaveBondsState *state = assert_cast<MoleculeSaveBondsState*>(_state.get()); 68 68 … … 73 73 } 74 74 75 Action ::state_ptr MoleculeSaveBondsAction::performRedo(Action::state_ptr _state){75 ActionState::ptr MoleculeSaveBondsAction::performRedo(ActionState::ptr _state){ 76 76 // Undo and redo have to do the same for this action 77 77 return performUndo(_state); -
src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr MoleculeSaveSelectedMoleculesAction::performCall() {54 ActionState::ptr MoleculeSaveSelectedMoleculesAction::performCall() { 55 55 LOG(1, "Storing selected molecules to file " << params.filename.get() << "."); 56 56 … … 81 81 } 82 82 83 Action ::state_ptr MoleculeSaveSelectedMoleculesAction::performUndo(Action::state_ptr _state) {83 ActionState::ptr MoleculeSaveSelectedMoleculesAction::performUndo(ActionState::ptr _state) { 84 84 // ParserSaveXyzState *state = assert_cast<ParserSaveXyzState*>(_state.get()); 85 85 … … 88 88 // state->mol->setName(state->lastName); 89 89 // 90 // return Action ::state_ptr(new ParserSaveXyzState(state->mol,newName));90 // return ActionState::ptr(new ParserSaveXyzState(state->mol,newName)); 91 91 } 92 92 93 Action ::state_ptr MoleculeSaveSelectedMoleculesAction::performRedo(Action::state_ptr _state){93 ActionState::ptr MoleculeSaveSelectedMoleculesAction::performRedo(ActionState::ptr _state){ 94 94 return Action::failure; 95 95 // // Undo and redo have to do the same for this action -
src/Actions/MoleculeAction/SaveTemperatureAction.cpp
rf92ef3 rb5b01e 56 56 #include "Action_impl_pre.hpp" 57 57 /** =========== define the function ====================== */ 58 Action ::state_ptr MoleculeSaveTemperatureAction::performCall() {58 ActionState::ptr MoleculeSaveTemperatureAction::performCall() { 59 59 LOG(1, "Storing temperatures in " << params.temperaturefile.get() << "."); 60 60 ofstream output; … … 71 71 } 72 72 73 Action ::state_ptr MoleculeSaveTemperatureAction::performUndo(Action::state_ptr _state) {73 ActionState::ptr MoleculeSaveTemperatureAction::performUndo(ActionState::ptr _state) { 74 74 // MoleculeSaveTemperatureState *state = assert_cast<MoleculeSaveTemperatureState*>(_state.get()); 75 75 … … 80 80 } 81 81 82 Action ::state_ptr MoleculeSaveTemperatureAction::performRedo(Action::state_ptr _state){82 ActionState::ptr MoleculeSaveTemperatureAction::performRedo(ActionState::ptr _state){ 83 83 // Undo and redo have to do the same for this action 84 84 return performUndo(_state); -
src/Actions/MoleculeAction/StretchBondAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr MoleculeStretchBondAction::performCall()55 ActionState::ptr MoleculeStretchBondAction::performCall() 56 56 { 57 57 // check preconditions … … 91 91 92 92 MoleculeStretchBondState *UndoState = new MoleculeStretchBondState(shift, bondplane, mol, params); 93 return Action ::state_ptr(UndoState);93 return ActionState::ptr(UndoState); 94 94 } 95 95 96 Action ::state_ptr MoleculeStretchBondAction::performUndo(Action::state_ptr _state) {96 ActionState::ptr MoleculeStretchBondAction::performUndo(ActionState::ptr _state) { 97 97 MoleculeStretchBondState *state = assert_cast<MoleculeStretchBondState*>(_state.get()); 98 98 … … 112 112 } 113 113 114 return Action ::state_ptr(_state);114 return ActionState::ptr(_state); 115 115 } 116 116 117 Action ::state_ptr MoleculeStretchBondAction::performRedo(Action::state_ptr _state){117 ActionState::ptr MoleculeStretchBondAction::performRedo(ActionState::ptr _state){ 118 118 MoleculeStretchBondState *state = assert_cast<MoleculeStretchBondState*>(_state.get()); 119 119 … … 132 132 } 133 133 } 134 return Action ::state_ptr(_state);134 return ActionState::ptr(_state); 135 135 } 136 136 -
src/Actions/MoleculeAction/SuspendInWaterAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr MoleculeSuspendInWaterAction::performCall() {54 ActionState::ptr MoleculeSuspendInWaterAction::performCall() { 55 55 molecule *mol = NULL; 56 56 double volume = 0.; … … 68 68 } 69 69 70 Action ::state_ptr MoleculeSuspendInWaterAction::performUndo(Action::state_ptr _state) {70 ActionState::ptr MoleculeSuspendInWaterAction::performUndo(ActionState::ptr _state) { 71 71 // MoleculeSuspendInWaterState *state = assert_cast<MoleculeSuspendInWaterState*>(_state.get()); 72 72 … … 77 77 } 78 78 79 Action ::state_ptr MoleculeSuspendInWaterAction::performRedo(Action::state_ptr _state){79 ActionState::ptr MoleculeSuspendInWaterAction::performRedo(ActionState::ptr _state){ 80 80 // Undo and redo have to do the same for this action 81 81 return performUndo(_state); -
src/Actions/MoleculeAction/VerletIntegrationAction.cpp
rf92ef3 rb5b01e 57 57 #include "Action_impl_pre.hpp" 58 58 /** =========== define the function ====================== */ 59 Action ::state_ptr MoleculeVerletIntegrationAction::performCall() {59 ActionState::ptr MoleculeVerletIntegrationAction::performCall() { 60 60 // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test 61 61 AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms()); … … 83 83 } 84 84 85 Action ::state_ptr MoleculeVerletIntegrationAction::performUndo(Action::state_ptr _state) {85 ActionState::ptr MoleculeVerletIntegrationAction::performUndo(ActionState::ptr _state) { 86 86 // MoleculeVerletIntegrationState *state = assert_cast<MoleculeVerletIntegrationState*>(_state.get()); 87 87 … … 92 92 } 93 93 94 Action ::state_ptr MoleculeVerletIntegrationAction::performRedo(Action::state_ptr _state){94 ActionState::ptr MoleculeVerletIntegrationAction::performRedo(ActionState::ptr _state){ 95 95 return Action::failure; 96 96 }
Note:
See TracChangeset
for help on using the changeset viewer.