- Timestamp:
- Nov 7, 2011, 10:46:25 AM (13 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:
- dad802
- Parents:
- aee2da
- git-author:
- Frederik Heber <heber@…> (09/21/11 18:56:31)
- git-committer:
- Frederik Heber <heber@…> (11/07/11 10:46:25)
- Location:
- src/Actions
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionRegistry.cpp
raee2da r83e90c 24 24 #include "CodePatterns/Registry_impl.hpp" 25 25 26 #include "GlobalListOfActions.hpp" 27 28 #include "AllActionHeaders.hpp" 29 30 #include <boost/preprocessor/iteration/local.hpp> 31 #include <boost/preprocessor/seq/elem.hpp> 32 #include <boost/preprocessor/seq/size.hpp> 33 26 34 using namespace MoleCuilder; 27 35 … … 29 37 */ 30 38 ActionRegistry::ActionRegistry() 31 {} 39 { 40 //std::cout << "ActionRegistry::ActionRegistry() called, instance is " << this << "." << std::endl; 41 fillRegistry(); 42 } 32 43 33 44 /** Destructor for class ActionRegistry. … … 35 46 ActionRegistry::~ActionRegistry() 36 47 { 48 //std::cout << "ActionRegistry::~ActionRegistry() called, instance is " << this << "." << std::endl; 37 49 cleanup(); 50 } 51 52 53 /** Instantiates each existing Action. 54 * 55 */ 56 void ActionRegistry::fillRegistry() 57 { 58 #define instance_print(z,n,list) \ 59 { \ 60 Action * presentAction = new \ 61 BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(n, list), Action) \ 62 (); \ 63 registerInstance(presentAction); \ 64 } 65 #define BOOST_PP_LOCAL_MACRO(n) instance_print(~, n, GLOBALLISTOFACTIONS) 66 #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(GLOBALLISTOFACTIONS))) 67 #include BOOST_PP_LOCAL_ITERATE() 68 #undef instance_print 38 69 } 39 70 -
src/Actions/ActionRegistry.hpp
raee2da r83e90c 44 44 ActionRegistry(); 45 45 ~ActionRegistry(); 46 47 void fillRegistry(); 46 48 }; 47 49 -
src/Actions/Action_impl_pre.hpp
raee2da r83e90c 174 174 175 175 // (const) prototype to be placed into the ActionRegistry (must be deleted by registry itself) 176 const ACTION *INSTANCE = new ACTION(); 176 //const ACTION INSTANCE; 177 //boost::shared_ptr< ACTION > INSTANCE( new ACTION() ); 177 178 178 179 // =========== constructor =========== 179 180 ACTION::ACTION () : 180 Action(ActionTrait< ACTION>())181 Action(ActionTrait< ACTION >(), false) 181 182 {} 182 183 -
src/Actions/Makefile.am
raee2da r83e90c 407 407 libMolecuilderActionPrototypes_la_includedir = $(includedir)/MoleCuilder/Actions/ 408 408 409 BUILT_SOURCES += AllActionHeaders.hpp 410 409 411 # UIElements/libMolecuilderUI.la 410 412 nobase_libMolecuilderActions_la_include_HEADERS = ${ACTIONSHEADER} 411 nobase_libMolecuilderActionPrototypes_la_include_HEADERS = ${ACTIONPROTOTYPESHEADER} ${ACTIONPROTOTYPESDEFS} 413 nobase_libMolecuilderActionPrototypes_la_include_HEADERS = ${ACTIONPROTOTYPESHEADER} ${ACTIONPROTOTYPESDEFS} AllActionHeaders.hpp 414 nodist_libMolecuilderActionPrototypes_la_include_HEADERS = AllActionHeaders.hpp 412 415 413 416 ## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la" … … 447 450 #pkgconfigdir = $(libdir)/pkgconfig 448 451 #pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc 452 453 AllActionHeaders.hpp: $(ACTIONPROTOTYPESHEADER) 454 echo "#ifndef ALLACTIONHEADERS_HPP_" >$@; \ 455 echo "#define ALLACTIONHEADERS_HPP_" >>$@; \ 456 for file in $(ACTIONPROTOTYPESHEADER); do \ 457 echo "#include \"$$file\"" >>$@; \ 458 done; \ 459 echo "#endif /* ALLACTIONHEADERS_HPP_ */" >>$@; 460 461 MOSTLYCLEANFILES += \ 462 AllActionHeaders.hpp
Note:
See TracChangeset
for help on using the changeset viewer.