Ignore:
Timestamp:
Sep 19, 2013, 8:23:52 PM (12 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

ActionState extracted into own header file, rename Action::state_ptr -> ActionState::ptr.

Location:
src/Actions/SelectionAction/Atoms
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/SelectionAction/Atoms/AllAtomsAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr SelectionAllAtomsAction::performCall() {
     55ActionState::ptr SelectionAllAtomsAction::performCall() {
    5656  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
    5757  LOG(1, "Selecting all atoms.");
    5858  World::getInstance().selectAllAtoms(AllAtoms());
    5959  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    60   return Action::state_ptr(new SelectionAllAtomsState(selectedAtoms,params));
     60  return ActionState::ptr(new SelectionAllAtomsState(selectedAtoms,params));
    6161}
    6262
    63 Action::state_ptr SelectionAllAtomsAction::performUndo(Action::state_ptr _state) {
     63ActionState::ptr SelectionAllAtomsAction::performUndo(ActionState::ptr _state) {
    6464  SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
    6565
     
    6969    World::getInstance().selectAtom(_atom);
    7070
    71   return Action::state_ptr(_state);
     71  return ActionState::ptr(_state);
    7272}
    7373
    74 Action::state_ptr SelectionAllAtomsAction::performRedo(Action::state_ptr _state){
     74ActionState::ptr SelectionAllAtomsAction::performRedo(ActionState::ptr _state){
    7575  //SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
    7676
    7777  World::getInstance().selectAllAtoms(AllAtoms());
    7878
    79   return Action::state_ptr(_state);
     79  return ActionState::ptr(_state);
    8080}
    8181
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp

    rf92ef3 rb5b01e  
    5757#include "Action_impl_pre.hpp"
    5858/** =========== define the function ====================== */
    59 Action::state_ptr SelectionAllAtomsInsideVolumeAction::performCall() {
     59ActionState::ptr SelectionAllAtomsInsideVolumeAction::performCall() {
    6060  LOG(1, "Selecting all atoms inside a volume.");
    6161  std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes();
     
    6767  World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0]));
    6868  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    69   return Action::state_ptr(new SelectionAllAtomsInsideVolumeState(selectedAtoms, params));
     69  return ActionState::ptr(new SelectionAllAtomsInsideVolumeState(selectedAtoms, params));
    7070}
    7171
    72 Action::state_ptr SelectionAllAtomsInsideVolumeAction::performUndo(Action::state_ptr _state) {
     72ActionState::ptr SelectionAllAtomsInsideVolumeAction::performUndo(ActionState::ptr _state) {
    7373  SelectionAllAtomsInsideVolumeState *state = assert_cast<SelectionAllAtomsInsideVolumeState*>(_state.get());
    7474
     
    8080    World::getInstance().selectAtom(_atom);
    8181
    82   return Action::state_ptr(_state);
     82  return ActionState::ptr(_state);
    8383}
    8484
    85 Action::state_ptr SelectionAllAtomsInsideVolumeAction::performRedo(Action::state_ptr _state){
     85ActionState::ptr SelectionAllAtomsInsideVolumeAction::performRedo(ActionState::ptr _state){
    8686  //SelectionAllAtomsInsideVolumeState *state = assert_cast<SelectionAllAtomsInsideVolumeState*>(_state.get());
    8787
     
    9191  World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0]));
    9292
    93   return Action::state_ptr(_state);
     93  return ActionState::ptr(_state);
    9494}
    9595
  • src/Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr SelectionAllAtomsOfMoleculeAction::performCall() {
     57ActionState::ptr SelectionAllAtomsOfMoleculeAction::performCall() {
    5858  LOG(1, "Selecting all atoms of currently selected molecule.");
    5959  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection());
    6060  World::getInstance().selectAllAtoms(AtomsByMoleculeSelection());
    6161  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    62   return Action::state_ptr(new SelectionAllAtomsOfMoleculeState(selectedAtoms, params));
     62  return ActionState::ptr(new SelectionAllAtomsOfMoleculeState(selectedAtoms, params));
    6363}
    6464
    65 Action::state_ptr SelectionAllAtomsOfMoleculeAction::performUndo(Action::state_ptr _state) {
     65ActionState::ptr SelectionAllAtomsOfMoleculeAction::performUndo(ActionState::ptr _state) {
    6666  SelectionAllAtomsOfMoleculeState *state = assert_cast<SelectionAllAtomsOfMoleculeState*>(_state.get());
    6767
     
    7070    World::getInstance().selectAtom(_atom);
    7171
    72   return Action::state_ptr(_state);
     72  return ActionState::ptr(_state);
    7373}
    7474
    75 Action::state_ptr SelectionAllAtomsOfMoleculeAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr SelectionAllAtomsOfMoleculeAction::performRedo(ActionState::ptr _state){
    7676  //SelectionAllAtomsOfMoleculeState *state = assert_cast<SelectionAllAtomsOfMoleculeState*>(_state.get());
    7777
    7878  World::getInstance().selectAllAtoms(AtomsByMoleculeSelection());
    7979
    80   return Action::state_ptr(_state);
     80  return ActionState::ptr(_state);
    8181}
    8282
  • src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr SelectionAtomByElementAction::performCall() {
     57ActionState::ptr SelectionAtomByElementAction::performCall() {
    5858  LOG(1, "Selecting atoms of type " << *params.elemental.get());
    5959  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection());
    6060  World::getInstance().selectAllAtoms(AtomByType(params.elemental.get()));
    6161  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    62   return Action::state_ptr(new SelectionAtomByElementState(selectedAtoms,params));
     62  return ActionState::ptr(new SelectionAtomByElementState(selectedAtoms,params));
    6363}
    6464
    65 Action::state_ptr SelectionAtomByElementAction::performUndo(Action::state_ptr _state) {
     65ActionState::ptr SelectionAtomByElementAction::performUndo(ActionState::ptr _state) {
    6666  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    6767
     
    7070    World::getInstance().selectAtom(_atom);
    7171
    72   return Action::state_ptr(_state);
     72  return ActionState::ptr(_state);
    7373}
    7474
    75 Action::state_ptr SelectionAtomByElementAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr SelectionAtomByElementAction::performRedo(ActionState::ptr _state){
    7676  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    7777
    7878  World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get()));
    7979
    80   return Action::state_ptr(_state);
     80  return ActionState::ptr(_state);
    8181}
    8282
  • src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr SelectionAtomByIdAction::performCall()
     54ActionState::ptr SelectionAtomByIdAction::performCall()
    5555{
    5656  enum Sucess {
     
    8888    case AllAtomsUnselected:
    8989    case AtomsSelected:
    90       return Action::state_ptr(new SelectionAtomByIdState(undoatomids, params));
     90      return ActionState::ptr(new SelectionAtomByIdState(undoatomids, params));
    9191      break;
    9292    default:
     
    9797}
    9898
    99 Action::state_ptr SelectionAtomByIdAction::performUndo(Action::state_ptr _state) {
     99ActionState::ptr SelectionAtomByIdAction::performUndo(ActionState::ptr _state) {
    100100  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    101101
     
    106106  }
    107107
    108   return Action::state_ptr(_state);
     108  return ActionState::ptr(_state);
    109109}
    110110
    111 Action::state_ptr SelectionAtomByIdAction::performRedo(Action::state_ptr _state){
     111ActionState::ptr SelectionAtomByIdAction::performRedo(ActionState::ptr _state){
    112112  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    113113
     
    118118  }
    119119
    120   return Action::state_ptr(_state);
     120  return ActionState::ptr(_state);
    121121}
    122122
  • src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr SelectionAtomByOrderAction::performCall() {
     55ActionState::ptr SelectionAtomByOrderAction::performCall() {
    5656  const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order.get()));
    5757  if (Walker != NULL) {
     
    6060      World::getInstance().selectAtom(Walker);
    6161      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));
    6363    } else {
    6464      return Action::success;
     
    6969}
    7070
    71 Action::state_ptr SelectionAtomByOrderAction::performUndo(Action::state_ptr _state) {
     71ActionState::ptr SelectionAtomByOrderAction::performUndo(ActionState::ptr _state) {
    7272  SelectionAtomByOrderState *state = assert_cast<SelectionAtomByOrderState*>(_state.get());
    7373
     
    7575  World::getInstance().unselectAtom(Walker);
    7676
    77   return Action::state_ptr(_state);
     77  return ActionState::ptr(_state);
    7878}
    7979
    80 Action::state_ptr SelectionAtomByOrderAction::performRedo(Action::state_ptr _state){
     80ActionState::ptr SelectionAtomByOrderAction::performRedo(ActionState::ptr _state){
    8181  SelectionAtomByOrderState *state = assert_cast<SelectionAtomByOrderState*>(_state.get());
    8282
     
    8484  World::getInstance().selectAtom(Walker);
    8585
    86   return Action::state_ptr(_state);
     86  return ActionState::ptr(_state);
    8787}
    8888
  • src/Actions/SelectionAction/Atoms/ClearAllAtomsAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr SelectionClearAllAtomsAction::performCall() {
     55ActionState::ptr SelectionClearAllAtomsAction::performCall() {
    5656  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
    5757  LOG(1, "Clearing atoms selection.");
    5858  World::getInstance().clearAtomSelection();
    59   return Action::state_ptr(new SelectionClearAllAtomsState(selectedAtoms, params));
     59  return ActionState::ptr(new SelectionClearAllAtomsState(selectedAtoms, params));
    6060}
    6161
    62 Action::state_ptr SelectionClearAllAtomsAction::performUndo(Action::state_ptr _state) {
     62ActionState::ptr SelectionClearAllAtomsAction::performUndo(ActionState::ptr _state) {
    6363  SelectionClearAllAtomsState *state = assert_cast<SelectionClearAllAtomsState*>(_state.get());
    6464
     
    6767    World::getInstance().selectAtom(_atom);
    6868
    69   return Action::state_ptr(_state);
     69  return ActionState::ptr(_state);
    7070}
    7171
    72 Action::state_ptr SelectionClearAllAtomsAction::performRedo(Action::state_ptr _state){
     72ActionState::ptr SelectionClearAllAtomsAction::performRedo(ActionState::ptr _state){
    7373  //SelectionClearAllAtomsState *state = assert_cast<SelectionClearAllAtomsState*>(_state.get());
    7474
    7575  World::getInstance().clearAtomSelection();
    7676
    77   return Action::state_ptr(_state);
     77  return ActionState::ptr(_state);
    7878}
    7979
  • src/Actions/SelectionAction/Atoms/InvertAtomsAction.cpp

    rf92ef3 rb5b01e  
    5454#include "Action_impl_pre.hpp"
    5555/** =========== define the function ====================== */
    56 Action::state_ptr SelectionInvertAtomsAction::performCall() {
     56ActionState::ptr SelectionInvertAtomsAction::performCall() {
    5757  LOG(1, "Inverting atom selection.");
    5858
     
    6161  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    6262
    63   return Action::state_ptr(new SelectionInvertAtomsState(params));
     63  return ActionState::ptr(new SelectionInvertAtomsState(params));
    6464}
    6565
    66 Action::state_ptr SelectionInvertAtomsAction::performUndo(Action::state_ptr _state) {
     66ActionState::ptr SelectionInvertAtomsAction::performUndo(ActionState::ptr _state) {
    6767  //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get());
    6868
     
    7070  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    7171
    72   return Action::state_ptr(_state);
     72  return ActionState::ptr(_state);
    7373}
    7474
    75 Action::state_ptr SelectionInvertAtomsAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr SelectionInvertAtomsAction::performRedo(ActionState::ptr _state){
    7676  //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get());
    7777
     
    7979  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    8080
    81   return Action::state_ptr(_state);
     81  return ActionState::ptr(_state);
    8282}
    8383
  • src/Actions/SelectionAction/Atoms/NotAllAtomsAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr SelectionNotAllAtomsAction::performCall() {
     55ActionState::ptr SelectionNotAllAtomsAction::performCall() {
    5656  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
    5757  LOG(1, "Unselecting all atoms.");
    5858  World::getInstance().clearAtomSelection();
    5959  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));
    6161}
    6262
    63 Action::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) {
     63ActionState::ptr SelectionNotAllAtomsAction::performUndo(ActionState::ptr _state) {
    6464  SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get());
    6565
     
    6868    World::getInstance().selectAtom(_atom);
    6969
    70   return Action::state_ptr(_state);
     70  return ActionState::ptr(_state);
    7171}
    7272
    73 Action::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){
     73ActionState::ptr SelectionNotAllAtomsAction::performRedo(ActionState::ptr _state){
    7474  //SelectionNotAllAtomsState *state = assert_cast<SelectionNotAllAtomsState*>(_state.get());
    7575
    7676  World::getInstance().clearAtomSelection();
    7777
    78   return Action::state_ptr(_state);
     78  return ActionState::ptr(_state);
    7979}
    8080
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp

    rf92ef3 rb5b01e  
    5656#include "Action_impl_pre.hpp"
    5757/** =========== define the function ====================== */
    58 Action::state_ptr SelectionNotAllAtomsInsideVolumeAction::performCall() {
     58ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performCall() {
    5959  LOG(1, "Unselecting all atoms inside a volume.");
    6060  std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes();
     
    6666  World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0]));
    6767  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));
    6969}
    7070
    71 Action::state_ptr SelectionNotAllAtomsInsideVolumeAction::performUndo(Action::state_ptr _state) {
     71ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performUndo(ActionState::ptr _state) {
    7272  SelectionNotAllAtomsInsideVolumeState *state = assert_cast<SelectionNotAllAtomsInsideVolumeState*>(_state.get());
    7373
     
    7979    World::getInstance().unselectAtom(_atom);
    8080
    81   return Action::state_ptr(_state);
     81  return ActionState::ptr(_state);
    8282}
    8383
    84 Action::state_ptr SelectionNotAllAtomsInsideVolumeAction::performRedo(Action::state_ptr _state){
     84ActionState::ptr SelectionNotAllAtomsInsideVolumeAction::performRedo(ActionState::ptr _state){
    8585  //SelectionNotAllAtomsInsideVolumeState *state = assert_cast<SelectionNotAllAtomsInsideVolumeState*>(_state.get());
    8686
     
    9090  World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0]));
    9191
    92   return Action::state_ptr(_state);
     92  return ActionState::ptr(_state);
    9393}
    9494
  • src/Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performCall() {
     57ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performCall() {
    5858  LOG(1, "Unselecting all atoms of currently selected molecules.");
    5959  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection());
    6060  World::getInstance().unselectAllAtoms(AtomsByMoleculeSelection());
    6161  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));
    6363}
    6464
    65 Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performUndo(Action::state_ptr _state) {
     65ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performUndo(ActionState::ptr _state) {
    6666  SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_state.get());
    6767
     
    7070    World::getInstance().unselectAtom(_atom);
    7171
    72   return Action::state_ptr(_state);
     72  return ActionState::ptr(_state);
    7373}
    7474
    75 Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr SelectionNotAllAtomsOfMoleculeAction::performRedo(ActionState::ptr _state){
    7676  //SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_state.get());
    7777
    7878  World::getInstance().unselectAllAtoms(AtomsByMoleculeSelection());
    7979
    80   return Action::state_ptr(_state);
     80  return ActionState::ptr(_state);
    8181}
    8282
  • src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr SelectionNotAtomByElementAction::performCall() {
     57ActionState::ptr SelectionNotAtomByElementAction::performCall() {
    5858  LOG(1, "Unselecting atoms of type " << *params.elemental.get());
    5959  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection());
    6060  World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get()));
    6161  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));
    6363}
    6464
    65 Action::state_ptr SelectionNotAtomByElementAction::performUndo(Action::state_ptr _state) {
     65ActionState::ptr SelectionNotAtomByElementAction::performUndo(ActionState::ptr _state) {
    6666  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    6767
     
    7070    World::getInstance().unselectAtom(_atom);
    7171
    72   return Action::state_ptr(_state);
     72  return ActionState::ptr(_state);
    7373}
    7474
    75 Action::state_ptr SelectionNotAtomByElementAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr SelectionNotAtomByElementAction::performRedo(ActionState::ptr _state){
    7676  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    7777
    7878  World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get()));
    7979
    80   return Action::state_ptr(_state);
     80  return ActionState::ptr(_state);
    8181}
    8282
  • src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr SelectionNotAtomByIdAction::performCall()
     54ActionState::ptr SelectionNotAtomByIdAction::performCall()
    5555{
    5656  enum Sucess {
     
    8888    case AllAtomsSelected:
    8989    case AtomsUnselected:
    90       return Action::state_ptr(new SelectionNotAtomByIdState(undoatomids, params));
     90      return ActionState::ptr(new SelectionNotAtomByIdState(undoatomids, params));
    9191      break;
    9292    default:
     
    9797}
    9898
    99 Action::state_ptr SelectionNotAtomByIdAction::performUndo(Action::state_ptr _state) {
     99ActionState::ptr SelectionNotAtomByIdAction::performUndo(ActionState::ptr _state) {
    100100  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    101101
     
    106106  }
    107107
    108   return Action::state_ptr(_state);
     108  return ActionState::ptr(_state);
    109109}
    110110
    111 Action::state_ptr SelectionNotAtomByIdAction::performRedo(Action::state_ptr _state){
     111ActionState::ptr SelectionNotAtomByIdAction::performRedo(ActionState::ptr _state){
    112112  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    113113
     
    118118  }
    119119
    120   return Action::state_ptr(_state);
     120  return ActionState::ptr(_state);
    121121}
    122122
  • src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr SelectionNotAtomByOrderAction::performCall() {
     55ActionState::ptr SelectionNotAtomByOrderAction::performCall() {
    5656  const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order.get()));
    5757  if (Walker != NULL) {
     
    6060      World::getInstance().unselectAtom(Walker);
    6161      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));
    6363    } else {
    6464      return Action::success;
     
    6969}
    7070
    71 Action::state_ptr SelectionNotAtomByOrderAction::performUndo(Action::state_ptr _state) {
     71ActionState::ptr SelectionNotAtomByOrderAction::performUndo(ActionState::ptr _state) {
    7272  SelectionNotAtomByOrderState *state = assert_cast<SelectionNotAtomByOrderState*>(_state.get());
    7373
     
    7575  World::getInstance().selectAtom(Walker);
    7676
    77   return Action::state_ptr(_state);
     77  return ActionState::ptr(_state);
    7878}
    7979
    80 Action::state_ptr SelectionNotAtomByOrderAction::performRedo(Action::state_ptr _state){
     80ActionState::ptr SelectionNotAtomByOrderAction::performRedo(ActionState::ptr _state){
    8181  SelectionNotAtomByOrderState *state = assert_cast<SelectionNotAtomByOrderState*>(_state.get());
    8282
     
    8484  World::getInstance().unselectAtom(Walker);
    8585
    86   return Action::state_ptr(_state);
     86  return ActionState::ptr(_state);
    8787}
    8888
Note: See TracChangeset for help on using the changeset viewer.