Ignore:
Timestamp:
Jul 26, 2010, 4:41:03 PM (14 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:
ecbc9a
Parents:
4e4c4d
Message:

All AtomActions contain now a ActionCall.hpp function.

  • to have the Action's NAME, the action call function has to be friend of the Action.
Location:
src/Actions/AtomAction
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/AtomAction/AddAction.cpp

    r4e4c4d r1a8fbf6  
    99
    1010#include "Actions/AtomAction/AddAction.hpp"
     11#include "Actions/ActionCalls.hpp"
    1112#include "atom.hpp"
    1213#include "element.hpp"
     
    3435AtomAddAction::~AtomAddAction()
    3536{}
     37
     38void AtomAdd(element *elemental, Vector &position) {
     39  ValueStorage::getInstance().setCurrentValue(AtomAddAction::NAME, elemental);
     40  ValueStorage::getInstance().setCurrentValue("position", elemental);
     41  ActionRegistry::getInstance().getActionByName(AtomAddAction::NAME)->call(Action::NonInteractive);
     42};
    3643
    3744Dialog * AtomAddAction::createDialog() {
  • src/Actions/AtomAction/AddAction.hpp

    r4e4c4d r1a8fbf6  
    1010
    1111#include "Actions/Action.hpp"
     12#include "vector.hpp"
     13
     14class element;
    1215
    1316class AtomAddAction : public Action {
     17  friend void AtomAdd(element *elemental, Vector &position);
     18
    1419public:
    1520  AtomAddAction();
  • src/Actions/AtomAction/ChangeElementAction.cpp

    r4e4c4d r1a8fbf6  
    99
    1010#include "Actions/AtomAction/ChangeElementAction.hpp"
     11#include "Actions/ActionCalls.hpp"
    1112#include "atom.hpp"
    1213#include "element.hpp"
     
    3334AtomChangeElementAction::~AtomChangeElementAction()
    3435{}
     36
     37void AtomChangeElement(element *elemental) {
     38  ValueStorage::getInstance().setCurrentValue(AtomChangeElementAction::NAME, elemental);
     39  ActionRegistry::getInstance().getActionByName(AtomChangeElementAction::NAME)->call(Action::NonInteractive);
     40};
    3541
    3642Dialog* AtomChangeElementAction::createDialog() {
  • src/Actions/AtomAction/ChangeElementAction.hpp

    r4e4c4d r1a8fbf6  
    1111#include "Actions/Action.hpp"
    1212
     13class element;
     14
    1315class AtomChangeElementAction : public Action {
     16  friend void AtomChangeElement(element *elemental);
     17
    1418public:
    1519  AtomChangeElementAction();
  • src/Actions/AtomAction/RemoveAction.cpp

    r4e4c4d r1a8fbf6  
    99
    1010#include "Actions/AtomAction/RemoveAction.hpp"
     11#include "Actions/ActionCalls.hpp"
    1112#include "atom.hpp"
    1213#include "Descriptors/AtomDescriptor.hpp"
     
    3334AtomRemoveAction::~AtomRemoveAction()
    3435{}
     36
     37void AtomRemove() {
     38  ActionRegistry::getInstance().getActionByName(AtomRemoveAction::NAME)->call(Action::NonInteractive);
     39};
    3540
    3641Dialog* AtomRemoveAction::createDialog() {
  • src/Actions/AtomAction/RemoveAction.hpp

    r4e4c4d r1a8fbf6  
    1212
    1313class AtomRemoveAction : public Action {
     14  friend void AtomRemove();
     15
    1416public:
    1517  AtomRemoveAction();
Note: See TracChangeset for help on using the changeset viewer.