Changeset 7fc447 for src/Actions
- Timestamp:
- Apr 29, 2014, 12:42:44 PM (11 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:
- d9f2b3
- Parents:
- af5384
- git-author:
- Frederik Heber <heber@…> (08/28/13 22:08:39)
- git-committer:
- Frederik Heber <heber@…> (04/29/14 12:42:44)
- Location:
- src/Actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionQueue.cpp
raf5384 r7fc447 59 59 ActionQueue::~ActionQueue() 60 60 { 61 // free all actions contained in queue62 for (ActionQueue_t::iterator iter = queue.begin(); !queue.empty(); iter =queue.begin()) {61 // free all actions contained in actionqueue 62 for (ActionQueue_t::iterator iter = actionqueue.begin(); !actionqueue.empty(); iter = actionqueue.begin()) { 63 63 delete *iter; 64 queue.erase(iter);64 actionqueue.erase(iter); 65 65 } 66 66 … … 78 78 Action *newaction = _action->clone(state); 79 79 newaction->prepare(state); 80 queue.push_back( newaction );80 actionqueue.push_back( newaction ); 81 81 newaction->call(); 82 82 } … … 99 99 void ActionQueue::outputAsCLI(std::ostream &output) const 100 100 { 101 for (ActionQueue_t::const_iterator iter = queue.begin();102 iter != queue.end();101 for (ActionQueue_t::const_iterator iter = actionqueue.begin(); 102 iter != actionqueue.end(); 103 103 ++iter) { 104 104 // skip store-session in printed list 105 105 if ( ((*iter)->getName() != std::string("store-session")) 106 106 && ((*iter)->getName() != std::string("load-session"))) { 107 if (iter != queue.begin())107 if (iter != actionqueue.begin()) 108 108 output << " "; 109 109 (*iter)->outputAsCLI(output); … … 118 118 output << "import " << prefix << std::endl; 119 119 output << "# ========================== Stored Session BEGIN ==========================" << std::endl; 120 for (ActionQueue_t::const_iterator iter = queue.begin();121 iter != queue.end();120 for (ActionQueue_t::const_iterator iter = actionqueue.begin(); 121 iter != actionqueue.end(); 122 122 ++iter) { 123 123 // skip store-session in printed list -
src/Actions/ActionQueue.hpp
raf5384 r7fc447 41 41 /** Queues the Action with \a name to be called. 42 42 * 43 * \param name token of Action to queue43 * \param name token of Action to actionqueue 44 44 * \param state whether Actions needs to be filled via a Dialog or not 45 45 */ … … 55 55 /** Returns the spawned action by token \a name. 56 56 * 57 * Action is checked into internal queue.57 * Action is checked into internal actionqueue. 58 58 * 59 59 * \return pointer to newly spawned action … … 87 87 const ActionTrait& getActionsTrait(const std::string &name) const; 88 88 89 /** Print the current contents of the queue as CLI instantiated list of Actions.89 /** Print the current contents of the actionqueue as CLI instantiated list of Actions. 90 90 * 91 91 * This is useful for storing the current session. … … 95 95 void outputAsCLI(std::ostream &output) const; 96 96 97 /** Print the current contents of the queue as Python instantiated list of Actions.97 /** Print the current contents of the actionqueue as Python instantiated list of Actions. 98 98 * 99 99 * This is useful for storing the current session. … … 121 121 */ 122 122 const Action &getLastAction() const { 123 return *( queue.back());123 return *(actionqueue.back()); 124 124 } 125 125 … … 159 159 ActionHistory *history; 160 160 161 //!> internal queue of actions162 ActionQueue_t queue;161 //!> internal actionqueue of actions 162 ActionQueue_t actionqueue; 163 163 164 //!> point to current action in queue164 //!> point to current action in actionqueue 165 165 size_t CurrentAction; 166 166 };
Note:
See TracChangeset
for help on using the changeset viewer.