Ignore:
Timestamp:
Sep 19, 2013, 8:23:52 PM (11 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/ShapeAction
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ShapeAction/CombineShapesAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeCombineShapesAction::performCall() {
     53ActionState::ptr ShapeCombineShapesAction::performCall() {
    5454  LOG(1, "Combining shapes in ShapeRegistry.");
    5555
     
    8888  ShapeRegistry::getInstance().addShape(s);
    8989
    90   return Action::state_ptr(new ShapeCombineShapesState(old_name, params));
     90  return ActionState::ptr(new ShapeCombineShapesState(old_name, params));
    9191}
    9292
    93 Action::state_ptr ShapeCombineShapesAction::performUndo(Action::state_ptr _state) {
     93ActionState::ptr ShapeCombineShapesAction::performUndo(ActionState::ptr _state) {
    9494  ShapeCombineShapesState *state = assert_cast<ShapeCombineShapesState*>(_state.get());
    9595
     
    9999  ShapeRegistry::getInstance().removeShape(state->old_name);
    100100
    101   return Action::state_ptr(_state);
     101  return ActionState::ptr(_state);
    102102}
    103103
    104 Action::state_ptr ShapeCombineShapesAction::performRedo(Action::state_ptr _state){
     104ActionState::ptr ShapeCombineShapesAction::performRedo(ActionState::ptr _state){
    105105  ShapeCombineShapesState *state = assert_cast<ShapeCombineShapesState*>(_state.get());
    106106
     
    134134  ShapeRegistry::getInstance().addShape(s);
    135135
    136   return Action::state_ptr(_state);
     136  return ActionState::ptr(_state);
    137137}
    138138
  • src/Actions/ShapeAction/CreateShapeAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeCreateShapeAction::performCall() {
     53ActionState::ptr ShapeCreateShapeAction::performCall() {
    5454  LOG(1, "Adding shape into ShapeRegistry.");
    5555
     
    6565  ShapeRegistry::getInstance().addShape(s);
    6666
    67   return Action::state_ptr(new ShapeCreateShapeState(old_name, params));
     67  return ActionState::ptr(new ShapeCreateShapeState(old_name, params));
    6868}
    6969
    70 Action::state_ptr ShapeCreateShapeAction::performUndo(Action::state_ptr _state) {
     70ActionState::ptr ShapeCreateShapeAction::performUndo(ActionState::ptr _state) {
    7171  ShapeCreateShapeState *state = assert_cast<ShapeCreateShapeState*>(_state.get());
    7272
     
    7676  ShapeRegistry::getInstance().removeShape(state->old_name);
    7777
    78   return Action::state_ptr(_state);
     78  return ActionState::ptr(_state);
    7979}
    8080
    81 Action::state_ptr ShapeCreateShapeAction::performRedo(Action::state_ptr _state){
     81ActionState::ptr ShapeCreateShapeAction::performRedo(ActionState::ptr _state){
    8282  ShapeCreateShapeState *state = assert_cast<ShapeCreateShapeState*>(_state.get());
    8383
     
    9393  ShapeRegistry::getInstance().addShape(s);
    9494
    95   return Action::state_ptr(_state);
     95  return ActionState::ptr(_state);
    9696}
    9797
  • src/Actions/ShapeAction/RemoveShapeAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeRemoveShapeAction::performCall() {
     53ActionState::ptr ShapeRemoveShapeAction::performCall() {
    5454  LOG(1, "Removing shapes from ShapeRegistry.");
    5555
     
    6262  }
    6363
    64   return Action::state_ptr(new ShapeRemoveShapeState(old_shapes, params));
     64  return ActionState::ptr(new ShapeRemoveShapeState(old_shapes, params));
    6565}
    6666
    67 Action::state_ptr ShapeRemoveShapeAction::performUndo(Action::state_ptr _state) {
     67ActionState::ptr ShapeRemoveShapeAction::performUndo(ActionState::ptr _state) {
    6868  ShapeRemoveShapeState *state = assert_cast<ShapeRemoveShapeState*>(_state.get());
    6969
     
    7575  }
    7676
    77   return Action::state_ptr(_state);
     77  return ActionState::ptr(_state);
    7878}
    7979
    80 Action::state_ptr ShapeRemoveShapeAction::performRedo(Action::state_ptr _state){
     80ActionState::ptr ShapeRemoveShapeAction::performRedo(ActionState::ptr _state){
    8181  ShapeRemoveShapeState *state = assert_cast<ShapeRemoveShapeState*>(_state.get());
    8282
     
    8585    ShapeRegistry::getInstance().removeShape(selectedShapes[i]->getName());
    8686
    87   return Action::state_ptr(_state);
     87  return ActionState::ptr(_state);
    8888}
    8989
  • src/Actions/ShapeAction/RotateShapeAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeRotateShapeAction::performCall() {
     53ActionState::ptr ShapeRotateShapeAction::performCall() {
    5454  LOG(1, "Translating shapes in ShapeRegistry.");
    5555
     
    7272  }
    7373
    74   return Action::state_ptr(new ShapeRotateShapeState(old_shapes, params));
     74  return ActionState::ptr(new ShapeRotateShapeState(old_shapes, params));
    7575}
    7676
    77 Action::state_ptr ShapeRotateShapeAction::performUndo(Action::state_ptr _state) {
     77ActionState::ptr ShapeRotateShapeAction::performUndo(ActionState::ptr _state) {
    7878  ShapeRotateShapeState *state = assert_cast<ShapeRotateShapeState*>(_state.get());
    7979
     
    8585  }
    8686
    87   return Action::state_ptr(_state);
     87  return ActionState::ptr(_state);
    8888}
    8989
    90 Action::state_ptr ShapeRotateShapeAction::performRedo(Action::state_ptr _state){
     90ActionState::ptr ShapeRotateShapeAction::performRedo(ActionState::ptr _state){
    9191  ShapeRotateShapeState *state = assert_cast<ShapeRotateShapeState*>(_state.get());
    9292
     
    106106  }
    107107
    108   return Action::state_ptr(_state);
     108  return ActionState::ptr(_state);
    109109}
    110110
  • src/Actions/ShapeAction/StretchShapeAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeStretchShapeAction::performCall() {
     53ActionState::ptr ShapeStretchShapeAction::performCall() {
    5454  LOG(1, "Translating shapes in ShapeRegistry.");
    5555
     
    7272  }
    7373
    74   return Action::state_ptr(new ShapeStretchShapeState(old_shapes, params));
     74  return ActionState::ptr(new ShapeStretchShapeState(old_shapes, params));
    7575}
    7676
    77 Action::state_ptr ShapeStretchShapeAction::performUndo(Action::state_ptr _state) {
     77ActionState::ptr ShapeStretchShapeAction::performUndo(ActionState::ptr _state) {
    7878  ShapeStretchShapeState *state = assert_cast<ShapeStretchShapeState*>(_state.get());
    7979
     
    8585  }
    8686
    87   return Action::state_ptr(_state);
     87  return ActionState::ptr(_state);
    8888}
    8989
    90 Action::state_ptr ShapeStretchShapeAction::performRedo(Action::state_ptr _state){
     90ActionState::ptr ShapeStretchShapeAction::performRedo(ActionState::ptr _state){
    9191  ShapeStretchShapeState *state = assert_cast<ShapeStretchShapeState*>(_state.get());
    9292
     
    106106  }
    107107
    108   return Action::state_ptr(_state);
     108  return ActionState::ptr(_state);
    109109}
    110110
  • src/Actions/ShapeAction/TranslateShapeAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr ShapeTranslateShapeAction::performCall() {
     53ActionState::ptr ShapeTranslateShapeAction::performCall() {
    5454  LOG(1, "Translating shapes in ShapeRegistry.");
    5555
     
    6868  }
    6969
    70   return Action::state_ptr(new ShapeTranslateShapeState(old_shapes, params));
     70  return ActionState::ptr(new ShapeTranslateShapeState(old_shapes, params));
    7171}
    7272
    73 Action::state_ptr ShapeTranslateShapeAction::performUndo(Action::state_ptr _state) {
     73ActionState::ptr ShapeTranslateShapeAction::performUndo(ActionState::ptr _state) {
    7474  ShapeTranslateShapeState *state = assert_cast<ShapeTranslateShapeState*>(_state.get());
    7575
     
    8181  }
    8282
    83   return Action::state_ptr(_state);
     83  return ActionState::ptr(_state);
    8484}
    8585
    86 Action::state_ptr ShapeTranslateShapeAction::performRedo(Action::state_ptr _state){
     86ActionState::ptr ShapeTranslateShapeAction::performRedo(ActionState::ptr _state){
    8787  ShapeTranslateShapeState *state = assert_cast<ShapeTranslateShapeState*>(_state.get());
    8888
     
    9898  }
    9999
    100   return Action::state_ptr(_state);
     100  return ActionState::ptr(_state);
    101101}
    102102
Note: See TracChangeset for help on using the changeset viewer.