Changeset b5b01e for src/Actions/SelectionAction/Atoms
- 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/SelectionAction/Atoms
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/SelectionAction/Atoms/AllAtomsAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr SelectionAllAtomsAction::performCall() {55 ActionState::ptr SelectionAllAtomsAction::performCall() { 56 56 std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms(); 57 57 LOG(1, "Selecting all atoms."); 58 58 World::getInstance().selectAllAtoms(AllAtoms()); 59 59 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 60 return Action ::state_ptr(new SelectionAllAtomsState(selectedAtoms,params));60 return ActionState::ptr(new SelectionAllAtomsState(selectedAtoms,params)); 61 61 } 62 62 63 Action ::state_ptr SelectionAllAtomsAction::performUndo(Action::state_ptr _state) {63 ActionState::ptr SelectionAllAtomsAction::performUndo(ActionState::ptr _state) { 64 64 SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get()); 65 65 … … 69 69 World::getInstance().selectAtom(_atom); 70 70 71 return Action ::state_ptr(_state);71 return ActionState::ptr(_state); 72 72 } 73 73 74 Action ::state_ptr SelectionAllAtomsAction::performRedo(Action::state_ptr _state){74 ActionState::ptr SelectionAllAtomsAction::performRedo(ActionState::ptr _state){ 75 75 //SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get()); 76 76 77 77 World::getInstance().selectAllAtoms(AllAtoms()); 78 78 79 return Action ::state_ptr(_state);79 return ActionState::ptr(_state); 80 80 } 81 81 -
src/Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp
rf92ef3 rb5b01e 57 57 #include "Action_impl_pre.hpp" 58 58 /** =========== define the function ====================== */ 59 Action ::state_ptr SelectionAllAtomsInsideVolumeAction::performCall() {59 ActionState::ptr SelectionAllAtomsInsideVolumeAction::performCall() { 60 60 LOG(1, "Selecting all atoms inside a volume."); 61 61 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); … … 67 67 World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0])); 68 68 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 69 return Action ::state_ptr(new SelectionAllAtomsInsideVolumeState(selectedAtoms, params));69 return ActionState::ptr(new SelectionAllAtomsInsideVolumeState(selectedAtoms, params)); 70 70 } 71 71 72 Action ::state_ptr SelectionAllAtomsInsideVolumeAction::performUndo(Action::state_ptr _state) {72 ActionState::ptr SelectionAllAtomsInsideVolumeAction::performUndo(ActionState::ptr _state) { 73 73 SelectionAllAtomsInsideVolumeState *state = assert_cast<SelectionAllAtomsInsideVolumeState*>(_state.get()); 74 74 … … 80 80 World::getInstance().selectAtom(_atom); 81 81 82 return Action ::state_ptr(_state);82 return ActionState::ptr(_state); 83 83 } 84 84 85 Action ::state_ptr SelectionAllAtomsInsideVolumeAction::performRedo(Action::state_ptr _state){85 ActionState::ptr SelectionAllAtomsInsideVolumeAction::performRedo(ActionState::ptr _state){ 86 86 //SelectionAllAtomsInsideVolumeState *state = assert_cast<SelectionAllAtomsInsideVolumeState*>(_state.get()); 87 87 … … 91 91 World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0])); 92 92 93 return Action ::state_ptr(_state);93 return ActionState::ptr(_state); 94 94 } 95 95 -
src/Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr SelectionAllAtomsOfMoleculeAction::performCall() {57 ActionState::ptr SelectionAllAtomsOfMoleculeAction::performCall() { 58 58 LOG(1, "Selecting all atoms of currently selected molecule."); 59 59 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection()); 60 60 World::getInstance().selectAllAtoms(AtomsByMoleculeSelection()); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 62 return Action ::state_ptr(new SelectionAllAtomsOfMoleculeState(selectedAtoms, params));62 return ActionState::ptr(new SelectionAllAtomsOfMoleculeState(selectedAtoms, params)); 63 63 } 64 64 65 Action ::state_ptr SelectionAllAtomsOfMoleculeAction::performUndo(Action::state_ptr _state) {65 ActionState::ptr SelectionAllAtomsOfMoleculeAction::performUndo(ActionState::ptr _state) { 66 66 SelectionAllAtomsOfMoleculeState *state = assert_cast<SelectionAllAtomsOfMoleculeState*>(_state.get()); 67 67 … … 70 70 World::getInstance().selectAtom(_atom); 71 71 72 return Action ::state_ptr(_state);72 return ActionState::ptr(_state); 73 73 } 74 74 75 Action ::state_ptr SelectionAllAtomsOfMoleculeAction::performRedo(Action::state_ptr _state){75 ActionState::ptr SelectionAllAtomsOfMoleculeAction::performRedo(ActionState::ptr _state){ 76 76 //SelectionAllAtomsOfMoleculeState *state = assert_cast<SelectionAllAtomsOfMoleculeState*>(_state.get()); 77 77 78 78 World::getInstance().selectAllAtoms(AtomsByMoleculeSelection()); 79 79 80 return Action ::state_ptr(_state);80 return ActionState::ptr(_state); 81 81 } 82 82 -
src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr SelectionAtomByElementAction::performCall() {57 ActionState::ptr SelectionAtomByElementAction::performCall() { 58 58 LOG(1, "Selecting atoms of type " << *params.elemental.get()); 59 59 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection()); 60 60 World::getInstance().selectAllAtoms(AtomByType(params.elemental.get())); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 62 return Action ::state_ptr(new SelectionAtomByElementState(selectedAtoms,params));62 return ActionState::ptr(new SelectionAtomByElementState(selectedAtoms,params)); 63 63 } 64 64 65 Action ::state_ptr SelectionAtomByElementAction::performUndo(Action::state_ptr _state) {65 ActionState::ptr SelectionAtomByElementAction::performUndo(ActionState::ptr _state) { 66 66 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 67 67 … … 70 70 World::getInstance().selectAtom(_atom); 71 71 72 return Action ::state_ptr(_state);72 return ActionState::ptr(_state); 73 73 } 74 74 75 Action ::state_ptr SelectionAtomByElementAction::performRedo(Action::state_ptr _state){75 ActionState::ptr SelectionAtomByElementAction::performRedo(ActionState::ptr _state){ 76 76 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 77 77 78 78 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get())); 79 79 80 return Action ::state_ptr(_state);80 return ActionState::ptr(_state); 81 81 } 82 82 -
src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr SelectionAtomByIdAction::performCall()54 ActionState::ptr SelectionAtomByIdAction::performCall() 55 55 { 56 56 enum Sucess { … … 88 88 case AllAtomsUnselected: 89 89 case AtomsSelected: 90 return Action ::state_ptr(new SelectionAtomByIdState(undoatomids, params));90 return ActionState::ptr(new SelectionAtomByIdState(undoatomids, params)); 91 91 break; 92 92 default: … … 97 97 } 98 98 99 Action ::state_ptr SelectionAtomByIdAction::performUndo(Action::state_ptr _state) {99 ActionState::ptr SelectionAtomByIdAction::performUndo(ActionState::ptr _state) { 100 100 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 101 101 … … 106 106 } 107 107 108 return Action ::state_ptr(_state);108 return ActionState::ptr(_state); 109 109 } 110 110 111 Action ::state_ptr SelectionAtomByIdAction::performRedo(Action::state_ptr _state){111 ActionState::ptr SelectionAtomByIdAction::performRedo(ActionState::ptr _state){ 112 112 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 113 113 … … 118 118 } 119 119 120 return Action ::state_ptr(_state);120 return ActionState::ptr(_state); 121 121 } 122 122 -
src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr SelectionAtomByOrderAction::performCall() {55 ActionState::ptr SelectionAtomByOrderAction::performCall() { 56 56 const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order.get())); 57 57 if (Walker != NULL) { … … 60 60 World::getInstance().selectAtom(Walker); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 62 return Action ::state_ptr(new SelectionAtomByOrderState(Walker->getId(), params));62 return ActionState::ptr(new SelectionAtomByOrderState(Walker->getId(), params)); 63 63 } else { 64 64 return Action::success; … … 69 69 } 70 70 71 Action ::state_ptr SelectionAtomByOrderAction::performUndo(Action::state_ptr _state) {71 ActionState::ptr SelectionAtomByOrderAction::performUndo(ActionState::ptr _state) { 72 72 SelectionAtomByOrderState *state = assert_cast<SelectionAtomByOrderState*>(_state.get()); 73 73 … … 75 75 World::getInstance().unselectAtom(Walker); 76 76 77 return Action ::state_ptr(_state);77 return ActionState::ptr(_state); 78 78 } 79 79 80 Action ::state_ptr SelectionAtomByOrderAction::performRedo(Action::state_ptr _state){80 ActionState::ptr SelectionAtomByOrderAction::performRedo(ActionState::ptr _state){ 81 81 SelectionAtomByOrderState *state = assert_cast<SelectionAtomByOrderState*>(_state.get()); 82 82 … … 84 84 World::getInstance().selectAtom(Walker); 85 85 86 return Action ::state_ptr(_state);86 return ActionState::ptr(_state); 87 87 } 88 88 -
src/Actions/SelectionAction/Atoms/ClearAllAtomsAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr SelectionClearAllAtomsAction::performCall() {55 ActionState::ptr SelectionClearAllAtomsAction::performCall() { 56 56 std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms(); 57 57 LOG(1, "Clearing atoms selection."); 58 58 World::getInstance().clearAtomSelection(); 59 return Action ::state_ptr(new SelectionClearAllAtomsState(selectedAtoms, params));59 return ActionState::ptr(new SelectionClearAllAtomsState(selectedAtoms, params)); 60 60 } 61 61 62 Action ::state_ptr SelectionClearAllAtomsAction::performUndo(Action::state_ptr _state) {62 ActionState::ptr SelectionClearAllAtomsAction::performUndo(ActionState::ptr _state) { 63 63 SelectionClearAllAtomsState *state = assert_cast<SelectionClearAllAtomsState*>(_state.get()); 64 64 … … 67 67 World::getInstance().selectAtom(_atom); 68 68 69 return Action ::state_ptr(_state);69 return ActionState::ptr(_state); 70 70 } 71 71 72 Action ::state_ptr SelectionClearAllAtomsAction::performRedo(Action::state_ptr _state){72 ActionState::ptr SelectionClearAllAtomsAction::performRedo(ActionState::ptr _state){ 73 73 //SelectionClearAllAtomsState *state = assert_cast<SelectionClearAllAtomsState*>(_state.get()); 74 74 75 75 World::getInstance().clearAtomSelection(); 76 76 77 return Action ::state_ptr(_state);77 return ActionState::ptr(_state); 78 78 } 79 79 -
src/Actions/SelectionAction/Atoms/InvertAtomsAction.cpp
rf92ef3 rb5b01e 54 54 #include "Action_impl_pre.hpp" 55 55 /** =========== define the function ====================== */ 56 Action ::state_ptr SelectionInvertAtomsAction::performCall() {56 ActionState::ptr SelectionInvertAtomsAction::performCall() { 57 57 LOG(1, "Inverting atom selection."); 58 58 … … 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 62 62 63 return Action ::state_ptr(new SelectionInvertAtomsState(params));63 return ActionState::ptr(new SelectionInvertAtomsState(params)); 64 64 } 65 65 66 Action ::state_ptr SelectionInvertAtomsAction::performUndo(Action::state_ptr _state) {66 ActionState::ptr SelectionInvertAtomsAction::performUndo(ActionState::ptr _state) { 67 67 //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get()); 68 68 … … 70 70 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 71 71 72 return Action ::state_ptr(_state);72 return ActionState::ptr(_state); 73 73 } 74 74 75 Action ::state_ptr SelectionInvertAtomsAction::performRedo(Action::state_ptr _state){75 ActionState::ptr SelectionInvertAtomsAction::performRedo(ActionState::ptr _state){ 76 76 //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get()); 77 77 … … 79 79 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 80 80 81 return Action ::state_ptr(_state);81 return ActionState::ptr(_state); 82 82 } 83 83 -
src/Actions/SelectionAction/Atoms/NotAllAtomsAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr SelectionNotAllAtomsAction::performCall() {55 ActionState::ptr SelectionNotAllAtomsAction::performCall() { 56 56 std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms(); 57 57 LOG(1, "Unselecting all atoms."); 58 58 World::getInstance().clearAtomSelection(); 59 59 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 60 return Action ::state_ptr(new SelectionNotAllAtomsState(selectedAtoms, params));60 return ActionState::ptr(new SelectionNotAllAtomsState(selectedAtoms, params)); 61 61 } 62 62 63 Action ::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) {63 ActionState::ptr SelectionNotAllAtomsAction::performUndo(ActionState::ptr _state) { 64 64 SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 65 65 … … 68 68 World::getInstance().selectAtom(_atom); 69 69 70 return Action ::state_ptr(_state);70 return ActionState::ptr(_state); 71 71 } 72 72 73 Action ::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){73 ActionState::ptr SelectionNotAllAtomsAction::performRedo(ActionState::ptr _state){ 74 74 //SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get()); 75 75 76 76 World::getInstance().clearAtomSelection(); 77 77 78 return Action ::state_ptr(_state);78 return ActionState::ptr(_state); 79 79 } 80 80 -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp
rf92ef3 rb5b01e 56 56 #include "Action_impl_pre.hpp" 57 57 /** =========== define the function ====================== */ 58 Action ::state_ptr SelectionNotAllAtomsInsideVolumeAction::performCall() {58 ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performCall() { 59 59 LOG(1, "Unselecting all atoms inside a volume."); 60 60 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); … … 66 66 World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0])); 67 67 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 68 return Action ::state_ptr(new SelectionNotAllAtomsInsideVolumeState(unselectedAtoms, params));68 return ActionState::ptr(new SelectionNotAllAtomsInsideVolumeState(unselectedAtoms, params)); 69 69 } 70 70 71 Action ::state_ptr SelectionNotAllAtomsInsideVolumeAction::performUndo(Action::state_ptr _state) {71 ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performUndo(ActionState::ptr _state) { 72 72 SelectionNotAllAtomsInsideVolumeState *state = assert_cast<SelectionNotAllAtomsInsideVolumeState*>(_state.get()); 73 73 … … 79 79 World::getInstance().unselectAtom(_atom); 80 80 81 return Action ::state_ptr(_state);81 return ActionState::ptr(_state); 82 82 } 83 83 84 Action ::state_ptr SelectionNotAllAtomsInsideVolumeAction::performRedo(Action::state_ptr _state){84 ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performRedo(ActionState::ptr _state){ 85 85 //SelectionNotAllAtomsInsideVolumeState *state = assert_cast<SelectionNotAllAtomsInsideVolumeState*>(_state.get()); 86 86 … … 90 90 World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0])); 91 91 92 return Action ::state_ptr(_state);92 return ActionState::ptr(_state); 93 93 } 94 94 -
src/Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr SelectionNotAllAtomsOfMoleculeAction::performCall() {57 ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performCall() { 58 58 LOG(1, "Unselecting all atoms of currently selected molecules."); 59 59 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection()); 60 60 World::getInstance().unselectAllAtoms(AtomsByMoleculeSelection()); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 62 return Action ::state_ptr(new SelectionNotAllAtomsOfMoleculeState(unselectedAtoms, params));62 return ActionState::ptr(new SelectionNotAllAtomsOfMoleculeState(unselectedAtoms, params)); 63 63 } 64 64 65 Action ::state_ptr SelectionNotAllAtomsOfMoleculeAction::performUndo(Action::state_ptr _state) {65 ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performUndo(ActionState::ptr _state) { 66 66 SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_state.get()); 67 67 … … 70 70 World::getInstance().unselectAtom(_atom); 71 71 72 return Action ::state_ptr(_state);72 return ActionState::ptr(_state); 73 73 } 74 74 75 Action ::state_ptr SelectionNotAllAtomsOfMoleculeAction::performRedo(Action::state_ptr _state){75 ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performRedo(ActionState::ptr _state){ 76 76 //SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_state.get()); 77 77 78 78 World::getInstance().unselectAllAtoms(AtomsByMoleculeSelection()); 79 79 80 return Action ::state_ptr(_state);80 return ActionState::ptr(_state); 81 81 } 82 82 -
src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr SelectionNotAtomByElementAction::performCall() {57 ActionState::ptr SelectionNotAtomByElementAction::performCall() { 58 58 LOG(1, "Unselecting atoms of type " << *params.elemental.get()); 59 59 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection()); 60 60 World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get())); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 62 return Action ::state_ptr(new SelectionNotAtomByElementState(unselectedAtoms,params));62 return ActionState::ptr(new SelectionNotAtomByElementState(unselectedAtoms,params)); 63 63 } 64 64 65 Action ::state_ptr SelectionNotAtomByElementAction::performUndo(Action::state_ptr _state) {65 ActionState::ptr SelectionNotAtomByElementAction::performUndo(ActionState::ptr _state) { 66 66 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 67 67 … … 70 70 World::getInstance().unselectAtom(_atom); 71 71 72 return Action ::state_ptr(_state);72 return ActionState::ptr(_state); 73 73 } 74 74 75 Action ::state_ptr SelectionNotAtomByElementAction::performRedo(Action::state_ptr _state){75 ActionState::ptr SelectionNotAtomByElementAction::performRedo(ActionState::ptr _state){ 76 76 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 77 77 78 78 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get())); 79 79 80 return Action ::state_ptr(_state);80 return ActionState::ptr(_state); 81 81 } 82 82 -
src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp
rf92ef3 rb5b01e 52 52 #include "Action_impl_pre.hpp" 53 53 /** =========== define the function ====================== */ 54 Action ::state_ptr SelectionNotAtomByIdAction::performCall()54 ActionState::ptr SelectionNotAtomByIdAction::performCall() 55 55 { 56 56 enum Sucess { … … 88 88 case AllAtomsSelected: 89 89 case AtomsUnselected: 90 return Action ::state_ptr(new SelectionNotAtomByIdState(undoatomids, params));90 return ActionState::ptr(new SelectionNotAtomByIdState(undoatomids, params)); 91 91 break; 92 92 default: … … 97 97 } 98 98 99 Action ::state_ptr SelectionNotAtomByIdAction::performUndo(Action::state_ptr _state) {99 ActionState::ptr SelectionNotAtomByIdAction::performUndo(ActionState::ptr _state) { 100 100 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 101 101 … … 106 106 } 107 107 108 return Action ::state_ptr(_state);108 return ActionState::ptr(_state); 109 109 } 110 110 111 Action ::state_ptr SelectionNotAtomByIdAction::performRedo(Action::state_ptr _state){111 ActionState::ptr SelectionNotAtomByIdAction::performRedo(ActionState::ptr _state){ 112 112 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 113 113 … … 118 118 } 119 119 120 return Action ::state_ptr(_state);120 return ActionState::ptr(_state); 121 121 } 122 122 -
src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr SelectionNotAtomByOrderAction::performCall() {55 ActionState::ptr SelectionNotAtomByOrderAction::performCall() { 56 56 const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order.get())); 57 57 if (Walker != NULL) { … … 60 60 World::getInstance().unselectAtom(Walker); 61 61 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 62 return Action ::state_ptr(new SelectionNotAtomByOrderState(Walker->getId(), params));62 return ActionState::ptr(new SelectionNotAtomByOrderState(Walker->getId(), params)); 63 63 } else { 64 64 return Action::success; … … 69 69 } 70 70 71 Action ::state_ptr SelectionNotAtomByOrderAction::performUndo(Action::state_ptr _state) {71 ActionState::ptr SelectionNotAtomByOrderAction::performUndo(ActionState::ptr _state) { 72 72 SelectionNotAtomByOrderState *state = assert_cast<SelectionNotAtomByOrderState*>(_state.get()); 73 73 … … 75 75 World::getInstance().selectAtom(Walker); 76 76 77 return Action ::state_ptr(_state);77 return ActionState::ptr(_state); 78 78 } 79 79 80 Action ::state_ptr SelectionNotAtomByOrderAction::performRedo(Action::state_ptr _state){80 ActionState::ptr SelectionNotAtomByOrderAction::performRedo(ActionState::ptr _state){ 81 81 SelectionNotAtomByOrderState *state = assert_cast<SelectionNotAtomByOrderState*>(_state.get()); 82 82 … … 84 84 World::getInstance().unselectAtom(Walker); 85 85 86 return Action ::state_ptr(_state);86 return ActionState::ptr(_state); 87 87 } 88 88
Note:
See TracChangeset
for help on using the changeset viewer.