Changeset 26b4eb4 for src/Actions
- Timestamp:
- Jun 27, 2014, 9:32:02 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:
- 378f2d5
- Parents:
- 3ded2b7
- git-author:
- Frederik Heber <heber@…> (06/19/14 09:17:06)
- git-committer:
- Frederik Heber <heber@…> (06/27/14 21:32:02)
- Location:
- src/Actions
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action.cpp
r3ded2b7 r26b4eb4 177 177 } 178 178 179 void Action::pushStatus(const std::string& _msg) 180 { 181 ActionQueue::getInstance().pushStatus(_msg); 182 } 183 -
src/Actions/Action.hpp
r3ded2b7 r26b4eb4 24 24 */ 25 25 #define NOPARAM_DEFAULT BOOST_PP_NIL 26 27 /** Nicely visible short-hand for push a status message 28 * 29 */ 30 #ifndef STATUS 31 #define STATUS(msg) pushStatus(msg) 32 #endif 26 33 27 34 // forward declaration … … 270 277 static void insertAction(Action *_action, enum Action::QueryOptions state); 271 278 279 /** Proxy function to grant all derived Actions access to 280 * ActionQueue::pushStatus(). 281 * 282 * \param _msg status message to push 283 */ 284 void pushStatus(const std::string& _msg); 285 272 286 private: 273 287 -
src/Actions/ActionQueue.hpp
r3ded2b7 r26b4eb4 24 24 #include "Actions/Action.hpp" 25 25 #include "Actions/ActionState.hpp" 26 #include "Actions/ActionStatusList.hpp" 26 27 27 28 #ifdef HAVE_ACTION_THREAD … … 127 128 #endif 128 129 130 /** Getter to ref to list of status messages. 131 * 132 * This is meant for UIs to registers as Observables. 133 * 134 * \return ref to StatusList variable 135 */ 136 ActionStatusList& getStatusList() 137 { return StatusList; } 138 129 139 private: 130 140 //!> grant Action access to internal history functions. … … 138 148 void addElement(Action* _Action, ActionState::ptr _state); 139 149 150 /** Advocate function to add status message to the list. 151 * 152 */ 153 void pushStatus(const std::string &_msg) 154 { StatusList.pushMessage(_msg); } 155 140 156 /** Wrapper function to clear ActionHistory. 141 157 * … … 221 237 boost::mutex mtx_idle; 222 238 #endif 239 240 //!> internal list of status messages from Actions for UIs to display 241 ActionStatusList StatusList; 223 242 }; 224 243 -
src/Actions/Makefile.am
r3ded2b7 r26b4eb4 8 8 Actions/ActionRegistry.cpp \ 9 9 Actions/ActionSequence.cpp \ 10 Actions/ActionStatusList.cpp \ 10 11 Actions/ActionTrait.cpp \ 11 12 Actions/ErrorAction.cpp \ … … 33 34 Actions/ActionSequence.hpp \ 34 35 Actions/ActionState.hpp \ 36 Actions/ActionStatusList.hpp \ 35 37 Actions/ActionTrait.hpp \ 36 38 Actions/ActionTraits.hpp \
Note:
See TracChangeset
for help on using the changeset viewer.