Changeset 257c77 for src/Actions


Ignore:
Timestamp:
Jun 17, 2010, 2:55:56 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
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, Candidate_v1.7.0, Candidate_v1.7.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:
b47bfc
Parents:
992fd7 (diff), 5f5a7b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'stable' into QT4Refactoring

Conflicts:

molecuilder/src/Actions/TesselationAction/ConvexEnvelopeAction.hpp
molecuilder/src/Helpers/MemDebug.hpp
molecuilder/src/Makefile.am
molecuilder/src/UIElements/Dialog.cpp
molecuilder/src/UIElements/MainWindow.cpp
molecuilder/src/UIElements/TextUI/TextUIFactory.cpp
molecuilder/src/builder.cpp

Location:
src/Actions
Files:
83 added
1 deleted
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/Actions/Action.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include <string>
     
    1517using namespace std;
    1618
     19Action::state_ptr getEmptyState() {
     20  return Action::state_ptr(Memory::ignore(new ActionState()));
     21}
     22
    1723// An empty state to indicate success
    18 Action::state_ptr Action::success = Action::state_ptr(Memory::ignore(new ActionState()));
    19 Action::state_ptr Action::failure = Action::state_ptr(Memory::ignore(new ActionState()));
     24Action::state_ptr Action::success = getEmptyState();
     25Action::state_ptr Action::failure = getEmptyState();
    2026
    2127Action::Action(std::string _name,bool _doRegister) :
  • src/Actions/ActionHistory.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include "ActionHistory.hpp"
  • src/Actions/ActionRegistry.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include "Actions/ActionRegistry.hpp"
     
    3739}
    3840
     41bool ActionRegistry::isActionByNamePresent(const std::string name){
     42  map<const string,Action*>::iterator iter;
     43  iter = actionMap.find(name);
     44  return iter!=actionMap.end();
     45}
     46
    3947void ActionRegistry::registerAction(Action* action){
    4048  pair<map<const string,Action*>::iterator,bool> ret;
     
    4351}
    4452
     53void ActionRegistry::unregisterAction(Action* action){
     54  actionMap.erase(action->getName());
     55}
     56
     57std::map<const std::string,Action*>::iterator ActionRegistry::getBeginIter()
     58{
     59  return actionMap.begin();
     60}
     61
     62std::map<const std::string,Action*>::iterator ActionRegistry::getEndIter()
     63{
     64  return actionMap.end();
     65}
     66
    4567CONSTRUCT_SINGLETON(ActionRegistry)
  • src/Actions/ActionRegistry.hpp

    r992fd7 r257c77  
    2121public:
    2222  Action* getActionByName(const std::string);
     23  bool isActionByNamePresent(const std::string name);
    2324  void registerAction(Action*);
     25  void unregisterAction(Action*);
     26
     27  std::map<const std::string,Action*>::iterator getBeginIter();
     28  std::map<const std::string,Action*>::iterator getEndIter();
    2429
    2530private:
  • src/Actions/ActionSequence.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include "Actions/ActionSequence.hpp"
  • src/Actions/ErrorAction.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include <iostream>
  • src/Actions/MakroAction.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include <string>
  • src/Actions/ManipulateAtomsProcess.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include "ManipulateAtomsProcess.hpp"
  • src/Actions/MethodAction.cpp

    r992fd7 r257c77  
    55 *      Author: crueger
    66 */
     7
     8#include "Helpers/MemDebug.hpp"
    79
    810#include <iostream>
  • src/Actions/MoleculeAction/ChangeNameAction.hpp

    r992fd7 r257c77  
    1 // All rather small Actions should go into this file for simplicities sake
     1/*
     2 * ChangeNameAction.hpp
     3 *
     4 *  Created on: Jan 15, 2010
     5 *      Author: crueger
     6 */
    27
    3 #ifndef _SMALL_ACTIONS_HPP
    4 #define _SMALL_ACTIONS_HPP
     8#ifndef CHANGENAMEACTION_HPP
     9#define CHANGENAMEACTION_HPP
    510
    611#include "Actions/Action.hpp"
     
    914class MoleculeListClass;
    1015
    11 class ChangeMoleculeNameAction : public Action {
     16class MoleculeChangeNameAction : public Action {
    1217public:
    13   ChangeMoleculeNameAction(MoleculeListClass*);
    14   virtual ~ChangeMoleculeNameAction();
     18  MoleculeChangeNameAction();
     19  virtual ~MoleculeChangeNameAction();
    1520
    1621  bool canUndo();
     
    2732};
    2833
    29 #endif // _SMALL_ACTIONS_HPP
     34
     35#endif // CHANGENAMEACTION_HPP
  • src/Actions/Process.cpp

    r992fd7 r257c77  
    66 */
    77
     8#include "Helpers/MemDebug.hpp"
     9
    810#include "Process.hpp"
    911
     
    1113
    1214Process::Process(int _maxSteps, std::string _name, bool _doRegister) :
     15  Observable("Process"),
    1316  Action(_name,_doRegister),
    1417  maxSteps(_maxSteps),
Note: See TracChangeset for help on using the changeset viewer.