Changeset 7fc447 for src/Actions


Ignore:
Timestamp:
Apr 29, 2014, 12:42:44 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:
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)
Message:

Renamed ActionsQueue's queue -> actionqueue.

Location:
src/Actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionQueue.cpp

    raf5384 r7fc447  
    5959ActionQueue::~ActionQueue()
    6060{
    61   // free all actions contained in queue
    62   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()) {
    6363    delete *iter;
    64     queue.erase(iter);
     64    actionqueue.erase(iter);
    6565  }
    6666
     
    7878  Action *newaction = _action->clone(state);
    7979  newaction->prepare(state);
    80   queue.push_back( newaction );
     80  actionqueue.push_back( newaction );
    8181  newaction->call();
    8282}
     
    9999void ActionQueue::outputAsCLI(std::ostream &output) const
    100100{
    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();
    103103      ++iter) {
    104104    // skip store-session in printed list
    105105    if ( ((*iter)->getName() != std::string("store-session"))
    106106        && ((*iter)->getName() != std::string("load-session"))) {
    107       if (iter != queue.begin())
     107      if (iter != actionqueue.begin())
    108108        output << " ";
    109109      (*iter)->outputAsCLI(output);
     
    118118  output << "import " << prefix << std::endl;
    119119  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();
    122122      ++iter) {
    123123    // skip store-session in printed list
  • src/Actions/ActionQueue.hpp

    raf5384 r7fc447  
    4141  /** Queues the Action with \a name to be called.
    4242   *
    43    * \param name token of Action to queue
     43   * \param name token of Action to actionqueue
    4444   * \param state whether Actions needs to be filled via a Dialog or not
    4545   */
     
    5555  /** Returns the spawned action by token \a name.
    5656   *
    57    * Action is checked into internal queue.
     57   * Action is checked into internal actionqueue.
    5858   *
    5959   * \return pointer to newly spawned action
     
    8787  const ActionTrait& getActionsTrait(const std::string &name) const;
    8888
    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.
    9090   *
    9191   * This is useful for storing the current session.
     
    9595  void outputAsCLI(std::ostream &output) const;
    9696
    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.
    9898   *
    9999   * This is useful for storing the current session.
     
    121121   */
    122122  const Action &getLastAction() const {
    123     return *(queue.back());
     123    return *(actionqueue.back());
    124124  }
    125125
     
    159159  ActionHistory *history;
    160160
    161   //!> internal queue of actions
    162   ActionQueue_t queue;
     161  //!> internal actionqueue of actions
     162  ActionQueue_t actionqueue;
    163163
    164   //!> point to current action in queue
     164  //!> point to current action in actionqueue
    165165  size_t CurrentAction;
    166166};
Note: See TracChangeset for help on using the changeset viewer.