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/MoleculeAction
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/BondFileAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr MoleculeBondFileAction::performCall() {
     55ActionState::ptr MoleculeBondFileAction::performCall() {
    5656  molecule *mol = NULL;
    5757
     
    7171}
    7272
    73 Action::state_ptr MoleculeBondFileAction::performUndo(Action::state_ptr _state) {
     73ActionState::ptr MoleculeBondFileAction::performUndo(ActionState::ptr _state) {
    7474//  MoleculeBondFileState *state = assert_cast<MoleculeBondFileState*>(_state.get());
    7575
     
    8080}
    8181
    82 Action::state_ptr MoleculeBondFileAction::performRedo(Action::state_ptr _state){
     82ActionState::ptr MoleculeBondFileAction::performRedo(ActionState::ptr _state){
    8383  return Action::failure;
    8484}
  • src/Actions/MoleculeAction/ChangeBondAngleAction.cpp

    rf92ef3 rb5b01e  
    115115}
    116116
    117 Action::state_ptr MoleculeChangeBondAngleAction::performCall()
     117ActionState::ptr MoleculeChangeBondAngleAction::performCall()
    118118{
    119119  // check precondition: three atoms
     
    148148      atoms[ indices[1] ]->getPosition(), atoms[ indices[2] ]->getPosition(),
    149149      params);
    150   return Action::state_ptr(UndoState);
     150  return ActionState::ptr(UndoState);
    151151}
    152152
    153 Action::state_ptr MoleculeChangeBondAngleAction::performUndo(Action::state_ptr _state) {
     153ActionState::ptr MoleculeChangeBondAngleAction::performUndo(ActionState::ptr _state) {
    154154  MoleculeChangeBondAngleState *state = assert_cast<MoleculeChangeBondAngleState*>(_state.get());
    155155
     
    160160  second->setPosition(state->secondOldPosition);
    161161
    162   return Action::state_ptr(_state);
     162  return ActionState::ptr(_state);
    163163}
    164164
    165 Action::state_ptr MoleculeChangeBondAngleAction::performRedo(Action::state_ptr _state){
     165ActionState::ptr MoleculeChangeBondAngleAction::performRedo(ActionState::ptr _state){
    166166  MoleculeChangeBondAngleState *state = assert_cast<MoleculeChangeBondAngleState*>(_state.get());
    167167
     
    172172  second->setPosition(state->secondNewPosition);
    173173
    174   return Action::state_ptr(_state);
     174  return ActionState::ptr(_state);
    175175}
    176176
  • src/Actions/MoleculeAction/ChangeNameAction.cpp

    rf92ef3 rb5b01e  
    4949#include "Action_impl_pre.hpp"
    5050/** =========== define the function ====================== */
    51 Action::state_ptr MoleculeChangeNameAction::performCall() {
     51ActionState::ptr MoleculeChangeNameAction::performCall() {
    5252  molecule *mol = NULL;
    5353
     
    5656    string oldName = mol->getName();
    5757    mol->setName(params.name.get());
    58     return Action::state_ptr(new MoleculeChangeNameState(mol,params));
     58    return ActionState::ptr(new MoleculeChangeNameState(mol,params));
    5959  } else
    6060    return Action::failure;
    6161}
    6262
    63 Action::state_ptr MoleculeChangeNameAction::performUndo(Action::state_ptr _state) {
     63ActionState::ptr MoleculeChangeNameAction::performUndo(ActionState::ptr _state) {
    6464  MoleculeChangeNameState *state = assert_cast<MoleculeChangeNameState*>(_state.get());
    6565
     
    6868  state->params.name.set(newName);
    6969
    70   return Action::state_ptr(_state);
     70  return ActionState::ptr(_state);
    7171}
    7272
    73 Action::state_ptr MoleculeChangeNameAction::performRedo(Action::state_ptr _state){
     73ActionState::ptr MoleculeChangeNameAction::performRedo(ActionState::ptr _state){
    7474  // Undo and redo have to do the same for this action
    7575  return performUndo(_state);
  • src/Actions/MoleculeAction/CopyAction.cpp

    rf92ef3 rb5b01e  
    5757#include "Action_impl_pre.hpp"
    5858/** =========== define the function ====================== */
    59 Action::state_ptr MoleculeCopyAction::performCall()
     59ActionState::ptr MoleculeCopyAction::performCall()
    6060{
    6161  std::vector<moleculeId_t> molecules;
     
    7171  }
    7272
    73   return Action::state_ptr(new MoleculeCopyState(molecules,params));
     73  return ActionState::ptr(new MoleculeCopyState(molecules,params));
    7474}
    7575
    76 Action::state_ptr MoleculeCopyAction::performUndo(Action::state_ptr _state) {
     76ActionState::ptr MoleculeCopyAction::performUndo(ActionState::ptr _state) {
    7777  MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get());
    7878
    7979  RemoveMoleculesWithAtomsByIds(state->copies);
    8080
    81   return Action::state_ptr(_state);
     81  return ActionState::ptr(_state);
    8282}
    8383
    84 Action::state_ptr MoleculeCopyAction::performRedo(Action::state_ptr _state){
     84ActionState::ptr MoleculeCopyAction::performRedo(ActionState::ptr _state){
    8585  return performCall();
    8686}
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp

    rf92ef3 rb5b01e  
    6060#include "Action_impl_pre.hpp"
    6161/** =========== define the function ====================== */
    62 Action::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() {
     62ActionState::ptr MoleculeFillVoidWithMoleculeAction::performCall() {
    6363  if (!boost::filesystem::exists(params.fillername.get())) {
    6464    ELOG(1, "File with filler molecule " << params.fillername.get() << " does not exist!");
     
    123123//  LOG(0, fillermolecules.size() << " molecules have been inserted.");
    124124
    125   return Action::state_ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,params));
     125  return ActionState::ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,params));
    126126}
    127127
    128 Action::state_ptr MoleculeFillVoidWithMoleculeAction::performUndo(Action::state_ptr _state) {
     128ActionState::ptr MoleculeFillVoidWithMoleculeAction::performUndo(ActionState::ptr _state) {
    129129  MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get());
    130130
     
    146146  // as molecules and atoms from state are removed, we have to create a new one
    147147  std::vector<molecule *> fillermolecules;
    148   return Action::state_ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,state->params));
     148  return ActionState::ptr(new MoleculeFillVoidWithMoleculeState(fillermolecules,state->params));
    149149}
    150150
    151 Action::state_ptr MoleculeFillVoidWithMoleculeAction::performRedo(Action::state_ptr _state){
     151ActionState::ptr MoleculeFillVoidWithMoleculeAction::performRedo(ActionState::ptr _state){
    152152  //MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get());
    153153
    154154  return Action::failure;
    155   //return Action::state_ptr(_state);
     155  //return ActionState::ptr(_state);
    156156}
    157157
  • src/Actions/MoleculeAction/FillWithMoleculeAction.cpp

    rf92ef3 rb5b01e  
    5858#include "Action_impl_pre.hpp"
    5959/** =========== define the function ====================== */
    60 Action::state_ptr MoleculeFillWithMoleculeAction::performCall() {
     60ActionState::ptr MoleculeFillWithMoleculeAction::performCall() {
    6161
    6262  LOG(1, "INFO: Filling Box with water molecules, "
     
    127127//  LOG(0, fillermolecules.size() << " molecules have been inserted.");
    128128
    129   return Action::state_ptr(new MoleculeFillWithMoleculeState(fillermolecules,params));
     129  return ActionState::ptr(new MoleculeFillWithMoleculeState(fillermolecules,params));
    130130}
    131131
    132 Action::state_ptr MoleculeFillWithMoleculeAction::performUndo(Action::state_ptr _state) {
     132ActionState::ptr MoleculeFillWithMoleculeAction::performUndo(ActionState::ptr _state) {
    133133  MoleculeFillWithMoleculeState *state = assert_cast<MoleculeFillWithMoleculeState*>(_state.get());
    134134
     
    150150  // as molecules and atoms from state are removed, we have to create a new one
    151151  std::vector<molecule *> fillermolecules;
    152   return Action::state_ptr(new MoleculeFillWithMoleculeState(fillermolecules,state->params));
     152  return ActionState::ptr(new MoleculeFillWithMoleculeState(fillermolecules,state->params));
    153153}
    154154
    155 Action::state_ptr MoleculeFillWithMoleculeAction::performRedo(Action::state_ptr _state){
     155ActionState::ptr MoleculeFillWithMoleculeAction::performRedo(ActionState::ptr _state){
    156156  //MoleculeFillWithMoleculeState *state = assert_cast<MoleculeFillWithMoleculeState*>(_state.get());
    157157
    158158  return Action::failure;
    159   //return Action::state_ptr(_state);
     159  //return ActionState::ptr(_state);
    160160}
    161161
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp

    rf92ef3 rb5b01e  
    5757#include "Action_impl_pre.hpp"
    5858/** =========== define the function ====================== */
    59 Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {
     59ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {
    6060  LOG(0, "STATUS: Linear interpolation between configuration " << params.start.get() << " and " << params.end.get() << "." << endl);
    6161  ASSERT(params.end.get() > params.start.get(), "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step.");
     
    6868}
    6969
    70 Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performUndo(Action::state_ptr _state) {
     70ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performUndo(ActionState::ptr _state) {
    7171//  MoleculeLinearInterpolationofTrajectoriesState *state = assert_cast<MoleculeLinearInterpolationofTrajectoriesState*>(_state.get());
    7272
     
    7777}
    7878
    79 Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performRedo(Action::state_ptr _state){
     79ActionState::ptr MoleculeLinearInterpolationofTrajectoriesAction::performRedo(ActionState::ptr _state){
    8080  // Undo and redo have to do the same for this action
    8181  return performUndo(_state);
  • src/Actions/MoleculeAction/LoadAction.cpp

    rf92ef3 rb5b01e  
    5757#include "Action_impl_pre.hpp"
    5858/** =========== define the function ====================== */
    59 Action::state_ptr MoleculeLoadAction::performCall() {
     59ActionState::ptr MoleculeLoadAction::performCall() {
    6060  // parsing file if present
    6161  if (!boost::filesystem::exists(params.filename.get())) {
     
    9898    LOG(0, "Chemical formula is " << (*iter)->getFormula());
    9999
    100     return Action::state_ptr(
     100    return ActionState::ptr(
    101101        new MoleculeLoadState((*iter)->getId(),FilenamePrefix,FilenameSuffix,boost::shared_ptr<FormatParser_Parameters>(ParserParams),params)
    102102    );
     
    104104}
    105105
    106 Action::state_ptr MoleculeLoadAction::performUndo(Action::state_ptr _state) {
     106ActionState::ptr MoleculeLoadAction::performUndo(ActionState::ptr _state) {
    107107  MoleculeLoadState *state = assert_cast<MoleculeLoadState*>(_state.get());
    108108
     
    119119    ParserParams->makeClone(*state->ParserParameters);
    120120
    121   return Action::state_ptr(_state);
     121  return ActionState::ptr(_state);
    122122}
    123123
    124 Action::state_ptr MoleculeLoadAction::performRedo(Action::state_ptr _state){
     124ActionState::ptr MoleculeLoadAction::performRedo(ActionState::ptr _state){
    125125  MoleculeLoadState *state = assert_cast<MoleculeLoadState*>(_state.get());
    126126
     
    145145  LOG(0, "Chemical formula is " << (*iter)->getFormula());
    146146
    147   return Action::state_ptr(
     147  return ActionState::ptr(
    148148      new MoleculeLoadState((*iter)->getId(),state->FilenamePrefix,state->FilenameSuffix,boost::shared_ptr<FormatParser_Parameters>(ParserParams),params)
    149149  );
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp

    rf92ef3 rb5b01e  
    5454#include "Action_impl_pre.hpp"
    5555/** =========== define the function ====================== */
    56 Action::state_ptr MoleculeRotateAroundSelfByAngleAction::performCall() {
     56ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performCall() {
    5757  // check whether a molecule is selected
    5858  std::vector<molecule *> selectedMolecules = World::getInstance().getSelectedMolecules();
     
    8282  }
    8383
    84   return Action::state_ptr(new MoleculeRotateAroundSelfByAngleState(selectedMolecules, params));
     84  return ActionState::ptr(new MoleculeRotateAroundSelfByAngleState(selectedMolecules, params));
    8585}
    8686
    87 Action::state_ptr MoleculeRotateAroundSelfByAngleAction::performUndo(Action::state_ptr _state) {
     87ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performUndo(ActionState::ptr _state) {
    8888  MoleculeRotateAroundSelfByAngleState *state = assert_cast<MoleculeRotateAroundSelfByAngleState*>(_state.get());
    8989
     
    100100  }
    101101
    102   return Action::state_ptr(_state);
     102  return ActionState::ptr(_state);
    103103}
    104104
    105 Action::state_ptr MoleculeRotateAroundSelfByAngleAction::performRedo(Action::state_ptr _state){
     105ActionState::ptr MoleculeRotateAroundSelfByAngleAction::performRedo(ActionState::ptr _state){
    106106  MoleculeRotateAroundSelfByAngleState *state = assert_cast<MoleculeRotateAroundSelfByAngleState*>(_state.get());
    107107
     
    118118  }
    119119
    120   return Action::state_ptr(_state);
     120  return ActionState::ptr(_state);
    121121}
    122122
  • src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performCall() {
     57ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performCall() {
    5858  molecule *mol = NULL;
    5959
     
    7272}
    7373
    74 Action::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performUndo(Action::state_ptr _state) {
     74ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performUndo(ActionState::ptr _state) {
    7575//  MoleculeRotateToPrincipalAxisSystemState *state = assert_cast<MoleculeRotateToPrincipalAxisSystemState*>(_state.get());
    7676
     
    8181}
    8282
    83 Action::state_ptr MoleculeRotateToPrincipalAxisSystemAction::performRedo(Action::state_ptr _state){
     83ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performRedo(ActionState::ptr _state){
    8484  return Action::failure;
    8585}
  • src/Actions/MoleculeAction/SaveAdjacencyAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr MoleculeSaveAdjacencyAction::performCall() {
     54ActionState::ptr MoleculeSaveAdjacencyAction::performCall() {
    5555  molecule *mol = NULL;
    5656
     
    7676}
    7777
    78 Action::state_ptr MoleculeSaveAdjacencyAction::performUndo(Action::state_ptr _state) {
     78ActionState::ptr MoleculeSaveAdjacencyAction::performUndo(ActionState::ptr _state) {
    7979//  MoleculeSaveAdjacencyState *state = assert_cast<MoleculeSaveAdjacencyState*>(_state.get());
    8080
     
    8585}
    8686
    87 Action::state_ptr MoleculeSaveAdjacencyAction::performRedo(Action::state_ptr _state){
     87ActionState::ptr MoleculeSaveAdjacencyAction::performRedo(ActionState::ptr _state){
    8888  // Undo and redo have to do the same for this action
    8989  return performUndo(_state);
  • src/Actions/MoleculeAction/SaveBondsAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr MoleculeSaveBondsAction::performCall() {
     54ActionState::ptr MoleculeSaveBondsAction::performCall() {
    5555  molecule *mol = NULL;
    5656
     
    6464}
    6565
    66 Action::state_ptr MoleculeSaveBondsAction::performUndo(Action::state_ptr _state) {
     66ActionState::ptr MoleculeSaveBondsAction::performUndo(ActionState::ptr _state) {
    6767//  MoleculeSaveBondsState *state = assert_cast<MoleculeSaveBondsState*>(_state.get());
    6868
     
    7373}
    7474
    75 Action::state_ptr MoleculeSaveBondsAction::performRedo(Action::state_ptr _state){
     75ActionState::ptr MoleculeSaveBondsAction::performRedo(ActionState::ptr _state){
    7676  // Undo and redo have to do the same for this action
    7777  return performUndo(_state);
  • src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr MoleculeSaveSelectedMoleculesAction::performCall() {
     54ActionState::ptr MoleculeSaveSelectedMoleculesAction::performCall() {
    5555  LOG(1, "Storing selected molecules to file " << params.filename.get() << ".");
    5656
     
    8181}
    8282
    83 Action::state_ptr MoleculeSaveSelectedMoleculesAction::performUndo(Action::state_ptr _state) {
     83ActionState::ptr MoleculeSaveSelectedMoleculesAction::performUndo(ActionState::ptr _state) {
    8484//  ParserSaveXyzState *state = assert_cast<ParserSaveXyzState*>(_state.get());
    8585
     
    8888//  state->mol->setName(state->lastName);
    8989//
    90 //  return Action::state_ptr(new ParserSaveXyzState(state->mol,newName));
     90//  return ActionState::ptr(new ParserSaveXyzState(state->mol,newName));
    9191}
    9292
    93 Action::state_ptr MoleculeSaveSelectedMoleculesAction::performRedo(Action::state_ptr _state){
     93ActionState::ptr MoleculeSaveSelectedMoleculesAction::performRedo(ActionState::ptr _state){
    9494  return Action::failure;
    9595//  // Undo and redo have to do the same for this action
  • src/Actions/MoleculeAction/SaveTemperatureAction.cpp

    rf92ef3 rb5b01e  
    5656#include "Action_impl_pre.hpp"
    5757/** =========== define the function ====================== */
    58 Action::state_ptr MoleculeSaveTemperatureAction::performCall() {
     58ActionState::ptr MoleculeSaveTemperatureAction::performCall() {
    5959  LOG(1, "Storing temperatures in " << params.temperaturefile.get() << ".");
    6060  ofstream output;
     
    7171}
    7272
    73 Action::state_ptr MoleculeSaveTemperatureAction::performUndo(Action::state_ptr _state) {
     73ActionState::ptr MoleculeSaveTemperatureAction::performUndo(ActionState::ptr _state) {
    7474//  MoleculeSaveTemperatureState *state = assert_cast<MoleculeSaveTemperatureState*>(_state.get());
    7575
     
    8080}
    8181
    82 Action::state_ptr MoleculeSaveTemperatureAction::performRedo(Action::state_ptr _state){
     82ActionState::ptr MoleculeSaveTemperatureAction::performRedo(ActionState::ptr _state){
    8383  // Undo and redo have to do the same for this action
    8484  return performUndo(_state);
  • src/Actions/MoleculeAction/StretchBondAction.cpp

    rf92ef3 rb5b01e  
    5353#include "Action_impl_pre.hpp"
    5454/** =========== define the function ====================== */
    55 Action::state_ptr MoleculeStretchBondAction::performCall()
     55ActionState::ptr MoleculeStretchBondAction::performCall()
    5656{
    5757  // check preconditions
     
    9191
    9292  MoleculeStretchBondState *UndoState = new MoleculeStretchBondState(shift, bondplane, mol, params);
    93   return Action::state_ptr(UndoState);
     93  return ActionState::ptr(UndoState);
    9494}
    9595
    96 Action::state_ptr MoleculeStretchBondAction::performUndo(Action::state_ptr _state) {
     96ActionState::ptr MoleculeStretchBondAction::performUndo(ActionState::ptr _state) {
    9797  MoleculeStretchBondState *state = assert_cast<MoleculeStretchBondState*>(_state.get());
    9898
     
    112112  }
    113113
    114   return Action::state_ptr(_state);
     114  return ActionState::ptr(_state);
    115115}
    116116
    117 Action::state_ptr MoleculeStretchBondAction::performRedo(Action::state_ptr _state){
     117ActionState::ptr MoleculeStretchBondAction::performRedo(ActionState::ptr _state){
    118118  MoleculeStretchBondState *state = assert_cast<MoleculeStretchBondState*>(_state.get());
    119119
     
    132132    }
    133133  }
    134   return Action::state_ptr(_state);
     134  return ActionState::ptr(_state);
    135135}
    136136
  • src/Actions/MoleculeAction/SuspendInWaterAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr MoleculeSuspendInWaterAction::performCall() {
     54ActionState::ptr MoleculeSuspendInWaterAction::performCall() {
    5555  molecule *mol = NULL;
    5656  double volume = 0.;
     
    6868}
    6969
    70 Action::state_ptr MoleculeSuspendInWaterAction::performUndo(Action::state_ptr _state) {
     70ActionState::ptr MoleculeSuspendInWaterAction::performUndo(ActionState::ptr _state) {
    7171//  MoleculeSuspendInWaterState *state = assert_cast<MoleculeSuspendInWaterState*>(_state.get());
    7272
     
    7777}
    7878
    79 Action::state_ptr MoleculeSuspendInWaterAction::performRedo(Action::state_ptr _state){
     79ActionState::ptr MoleculeSuspendInWaterAction::performRedo(ActionState::ptr _state){
    8080  // Undo and redo have to do the same for this action
    8181  return performUndo(_state);
  • src/Actions/MoleculeAction/VerletIntegrationAction.cpp

    rf92ef3 rb5b01e  
    5757#include "Action_impl_pre.hpp"
    5858/** =========== define the function ====================== */
    59 Action::state_ptr MoleculeVerletIntegrationAction::performCall() {
     59ActionState::ptr MoleculeVerletIntegrationAction::performCall() {
    6060  // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test
    6161  AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms());
     
    8383}
    8484
    85 Action::state_ptr MoleculeVerletIntegrationAction::performUndo(Action::state_ptr _state) {
     85ActionState::ptr MoleculeVerletIntegrationAction::performUndo(ActionState::ptr _state) {
    8686//  MoleculeVerletIntegrationState *state = assert_cast<MoleculeVerletIntegrationState*>(_state.get());
    8787
     
    9292}
    9393
    94 Action::state_ptr MoleculeVerletIntegrationAction::performRedo(Action::state_ptr _state){
     94ActionState::ptr MoleculeVerletIntegrationAction::performRedo(ActionState::ptr _state){
    9595  return Action::failure;
    9696}
Note: See TracChangeset for help on using the changeset viewer.