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/CommandAction
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/CommandAction/BondLengthTableAction.cpp

    rf92ef3 rb5b01e  
    5555#include "Action_impl_pre.hpp"
    5656/** =========== define the function ====================== */
    57 Action::state_ptr CommandBondLengthTableAction::performCall() {
     57ActionState::ptr CommandBondLengthTableAction::performCall() {
    5858  ostringstream usage;
    5959
     
    7878      LOG(0, "Bond length table parsed successfully.");
    7979      input.close();
    80       return Action::state_ptr(UndoState);
     80      return ActionState::ptr(UndoState);
    8181    } else {
    8282      ELOG(1, "Bond length table parsing failed.");
     
    9494}
    9595
    96 Action::state_ptr CommandBondLengthTableAction::performUndo(Action::state_ptr _state) {
     96ActionState::ptr CommandBondLengthTableAction::performUndo(ActionState::ptr _state) {
    9797  CommandBondLengthTableState *state = assert_cast<CommandBondLengthTableState*>(_state.get());
    9898
     
    103103  World::getInstance().setBondGraph(BG);
    104104
    105   return Action::state_ptr(_state);
     105  return ActionState::ptr(_state);
    106106}
    107107
    108 Action::state_ptr CommandBondLengthTableAction::performRedo(Action::state_ptr _state){
     108ActionState::ptr CommandBondLengthTableAction::performRedo(ActionState::ptr _state){
    109109  CommandBondLengthTableState *state = assert_cast<CommandBondLengthTableState*>(_state.get());
    110110
     
    117117  }
    118118
    119   return Action::state_ptr(_state);
     119  return ActionState::ptr(_state);
    120120}
    121121
  • src/Actions/CommandAction/ElementDbAction.cpp

    rf92ef3 rb5b01e  
    5757
    5858/** =========== define the function ====================== */
    59 Action::state_ptr CommandElementDbAction::performCall() {
     59ActionState::ptr CommandElementDbAction::performCall() {
    6060  std::ostringstream usage;
    6161
     
    8282    LOG(0, "Element list loaded successfully.");
    8383    //periode->Output();
    84     return Action::state_ptr(UndoState);
     84    return ActionState::ptr(UndoState);
    8585  } else {
    8686    LOG(0, "Element list loading failed.");
     
    9090}
    9191
    92 Action::state_ptr CommandElementDbAction::performUndo(Action::state_ptr _state) {
     92ActionState::ptr CommandElementDbAction::performUndo(ActionState::ptr _state) {
    9393  CommandElementDbState *state = assert_cast<CommandElementDbState*>(_state.get());
    9494
     
    102102  World::getInstance().getPeriode() = periode;
    103103
    104   return Action::state_ptr(_state);
     104  return ActionState::ptr(_state);
    105105}
    106106
    107 Action::state_ptr CommandElementDbAction::performRedo(Action::state_ptr _state){
     107ActionState::ptr CommandElementDbAction::performRedo(ActionState::ptr _state){
    108108  CommandElementDbState *state = assert_cast<CommandElementDbState*>(_state.get());
    109109
     
    119119    LOG(0, "Element list loaded successfully.");
    120120    //periode->Output();
    121     return Action::state_ptr(_state);
     121    return ActionState::ptr(_state);
    122122  } else {
    123123    LOG(0, "Element list loading failed.");
  • src/Actions/CommandAction/FastParsingAction.cpp

    rf92ef3 rb5b01e  
    5151#include "Action_impl_pre.hpp"
    5252/** =========== define the function ====================== */
    53 Action::state_ptr CommandFastParsingAction::performCall() {
     53ActionState::ptr CommandFastParsingAction::performCall() {
    5454  config *configuration = World::getInstance().getConfig();
    5555  bool oldvalue = configuration->FastParsing;
     
    6060  else
    6161    LOG(0, "I will parse trajectories.");
    62   return Action::state_ptr(new CommandFastParsingState(oldvalue, params));
     62  return ActionState::ptr(new CommandFastParsingState(oldvalue, params));
    6363}
    6464
    65 Action::state_ptr CommandFastParsingAction::performUndo(Action::state_ptr _state) {
     65ActionState::ptr CommandFastParsingAction::performUndo(ActionState::ptr _state) {
    6666  CommandFastParsingState *state = assert_cast<CommandFastParsingState*>(_state.get());
    6767
     
    7373    LOG(0, "I will parse trajectories.");
    7474
    75   return Action::state_ptr(_state);
     75  return ActionState::ptr(_state);
    7676}
    7777
    78 Action::state_ptr CommandFastParsingAction::performRedo(Action::state_ptr _state){
     78ActionState::ptr CommandFastParsingAction::performRedo(ActionState::ptr _state){
    7979  CommandFastParsingState *state = assert_cast<CommandFastParsingState*>(_state.get());
    8080
     
    8686    LOG(0, "I will parse trajectories.");
    8787
    88   return Action::state_ptr(_state);
     88  return ActionState::ptr(_state);
    8989}
    9090
  • src/Actions/CommandAction/HelpAction.cpp

    rf92ef3 rb5b01e  
    5252#include "Action_impl_pre.hpp"
    5353/** =========== define the function ====================== */
    54 Action::state_ptr CommandHelpAction::performCall() {
     54ActionState::ptr CommandHelpAction::performCall() {
    5555  // print some general advice
    5656  std::cout << std::endl << std::endl << "Usage help:" << std::endl;
     
    107107}
    108108
    109 Action::state_ptr CommandHelpAction::performUndo(Action::state_ptr _state) {
     109ActionState::ptr CommandHelpAction::performUndo(ActionState::ptr _state) {
    110110  return Action::success;
    111111}
    112112
    113 Action::state_ptr CommandHelpAction::performRedo(Action::state_ptr _state){
     113ActionState::ptr CommandHelpAction::performRedo(ActionState::ptr _state){
    114114  return Action::success;
    115115}
  • src/Actions/CommandAction/HelpRedistributeAction.cpp

    rf92ef3 rb5b01e  
    5050#include "Action_impl_pre.hpp"
    5151/** =========== define the function ====================== */
    52 Action::state_ptr CommandHelpRedistributeAction::performCall() {
     52ActionState::ptr CommandHelpRedistributeAction::performCall() {
    5353  // print some general advice
    5454
     
    7373}
    7474
    75 Action::state_ptr CommandHelpRedistributeAction::performUndo(Action::state_ptr _state) {
     75ActionState::ptr CommandHelpRedistributeAction::performUndo(ActionState::ptr _state) {
    7676  return Action::success;
    7777}
    7878
    79 Action::state_ptr CommandHelpRedistributeAction::performRedo(Action::state_ptr _state){
     79ActionState::ptr CommandHelpRedistributeAction::performRedo(ActionState::ptr _state){
    8080  return Action::success;
    8181}
  • src/Actions/CommandAction/VerboseAction.cpp

    rf92ef3 rb5b01e  
    4949#include "Action_impl_pre.hpp"
    5050/** =========== define the function ====================== */
    51 Action::state_ptr CommandVerboseAction::performCall() {
     51ActionState::ptr CommandVerboseAction::performCall() {
    5252  unsigned int oldverbosity = getVerbosity();
    5353
     
    5858    setVerbosity(params.verbosity.get());
    5959    LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity.get() << ".");
    60     return Action::state_ptr(UndoState);
     60    return ActionState::ptr(UndoState);
    6161  } else {
    6262    LOG(0, "Verbosity remains unchanged at " << oldverbosity << ".");
     
    6565}
    6666
    67 Action::state_ptr CommandVerboseAction::performUndo(Action::state_ptr _state) {
     67ActionState::ptr CommandVerboseAction::performUndo(ActionState::ptr _state) {
    6868  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    6969
     
    7171  setVerbosity(state->oldverbosity);
    7272
    73   return Action::state_ptr(_state);
     73  return ActionState::ptr(_state);
    7474}
    7575
    76 Action::state_ptr CommandVerboseAction::performRedo(Action::state_ptr _state){
     76ActionState::ptr CommandVerboseAction::performRedo(ActionState::ptr _state){
    7777  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    7878
     
    8080  setVerbosity(state->params.verbosity.get());
    8181
    82   return Action::state_ptr(_state);
     82  return ActionState::ptr(_state);
    8383}
    8484
  • src/Actions/CommandAction/VersionAction.cpp

    rf92ef3 rb5b01e  
    4848#include "Action_impl_pre.hpp"
    4949/** =========== define the function ====================== */
    50 Action::state_ptr CommandVersionAction::performCall() {
     50ActionState::ptr CommandVersionAction::performCall() {
    5151  return Action::success;
    5252}
    5353
    54 Action::state_ptr CommandVersionAction::performUndo(Action::state_ptr _state) {
     54ActionState::ptr CommandVersionAction::performUndo(ActionState::ptr _state) {
    5555  return Action::success;
    5656}
    5757
    58 Action::state_ptr CommandVersionAction::performRedo(Action::state_ptr _state){
     58ActionState::ptr CommandVersionAction::performRedo(ActionState::ptr _state){
    5959  return Action::success;
    6060}
  • src/Actions/CommandAction/WarrantyAction.cpp

    rf92ef3 rb5b01e  
    4646#include "Action_impl_pre.hpp"
    4747/** =========== define the function ====================== */
    48 Action::state_ptr CommandWarrantyAction::performCall() {
     48ActionState::ptr CommandWarrantyAction::performCall() {
    4949  std::cout << std::endl;
    5050  std::cout << "This program is distributed in the hope that it will be useful," << std::endl;
     
    5656}
    5757
    58 Action::state_ptr CommandWarrantyAction::performUndo(Action::state_ptr _state) {
     58ActionState::ptr CommandWarrantyAction::performUndo(ActionState::ptr _state) {
    5959  return Action::success;
    6060}
    6161
    62 Action::state_ptr CommandWarrantyAction::performRedo(Action::state_ptr _state){
     62ActionState::ptr CommandWarrantyAction::performRedo(ActionState::ptr _state){
    6363  return Action::success;
    6464}
Note: See TracChangeset for help on using the changeset viewer.