- Timestamp:
- Mar 5, 2010, 12:53:13 PM (15 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:
- 7dc102
- Parents:
- 57f5cf
- Location:
- src
- Files:
-
- 5 added
- 7 deleted
- 2 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
r57f5cf rab4b55 10 10 ACTIONSSOURCE = Actions/Action.cpp Actions/Process.cpp Actions/MethodAction.cpp Actions/ActionSequence.cpp Actions/MakroAction.cpp Actions/ErrorAction.cpp Actions/small_actions.cpp Actions/ManipulateAtomsProcess.cpp Actions/ActionRegistry.cpp 11 11 ACTIONSHEADER = Actions/Action.hpp Actions/Process.hpp Actions/Calculation.hpp Actions/Calculation_impl.hpp Actions/MethodAction.hpp Actions/ActionSequence.hpp Actions/MakroAction.hpp Actions/ErrorAction.hpp Actions/small_actions.hpp Actions/ManipulateAtomsProcess.hpp Actions/ActionRegistry.hpp 12 13 PARSERSOURCE = Parser/ChangeTracker.cpp Parser/FormatParser.cpp Parser/XyzParser.cpp 14 PARSERHEADER = Parser/ChangeTracker.hpp Parser/FormatParser.hpp Parser/XyzParser.hpp 12 15 13 16 PATTERNSOURCE = Patterns/Observer.cpp … … 32 35 DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp Descriptors/AtomIdDescriptor.hpp Descriptors/AtomTypeDescriptor.hpp Descriptors/MoleculeDescriptor.hpp 33 36 34 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PA TTERNSOURCE} ${UISOURCE} ${DESCRIPTORSOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp ChangeTracker.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp FormatParser.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp lists.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp WorldIterators.cpp35 HEADER = ${ANALYSISHEADER} ${ATOMHEADER} ${PA TTERNHEADER} ${UIHEADER} ${DESCRIPTORHEADER} ${LEGACYHEADER} bond.hpp bondgraph.hpp boundary.hpp ChangeTracker.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp errorlogger.hpp FormatParser.hpp graph.hpp helpers.hpp info.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp log.hpp logger.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp World.hpp37 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PARSERSOURCE} ${PATTERNSOURCE} ${UISOURCE} ${DESCRIPTORSOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp lists.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp WorldIterators.cpp 38 HEADER = ${ANALYSISHEADER} ${ATOMHEADER} ${PARSERHEADER} ${PATTERNHEADER} ${UIHEADER} ${DESCRIPTORHEADER} ${LEGACYHEADER} bond.hpp bondgraph.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp errorlogger.hpp graph.hpp helpers.hpp info.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp log.hpp logger.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp World.hpp 36 39 37 40 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) -
src/Parser/ChangeTracker.cpp
r57f5cf rab4b55 10 10 ChangeTracker* ChangeTracker::instance = NULL; 11 11 12 /** 13 * Constructor. Signs on as an observer for the World. 14 */ 12 15 ChangeTracker::ChangeTracker() { 13 16 isConsistent = true; … … 15 18 } 16 19 20 /** 21 * Destructor. Signs off from the World. 22 */ 17 23 ChangeTracker::~ChangeTracker() { 18 24 World::get()->signOff(this); 19 25 } 20 26 27 /** 28 * Returns the change tracker instance. 29 * 30 * \return this 31 */ 21 32 ChangeTracker* ChangeTracker::get() { 22 33 if (instance == NULL) { … … 27 38 } 28 39 40 /** 41 * Destroys the change tracker instance. Be careful, the change tracker is a 42 * singleton and destruction might lead to a loss of consistency. 43 */ 29 44 void ChangeTracker::destroy() { 30 45 delete instance; … … 32 47 } 33 48 49 /** 50 * With this, the World can update the change tracker's state. 51 */ 34 52 void ChangeTracker::update(Observable *publisher) { 35 53 isConsistent = false; 36 54 } 37 55 56 /** 57 * Gets whether there are non-saved changes. 58 * 59 * \param true if there are any changes, false otherwise 60 */ 38 61 bool ChangeTracker::hasChanged() { 39 62 return !isConsistent; 40 63 } 41 64 65 /** 66 * Tells all observers (which are the different parsers) that they are supposed 67 * to save the current state. 68 */ 42 69 void ChangeTracker::saveStatus() { 43 70 if (hasChanged()) { -
src/Parser/FormatParser.hpp
r57f5cf rab4b55 13 13 #include "parser.hpp" 14 14 15 using namespace std; 16 15 /** 16 * General parser which observes the change tracker. 17 */ 17 18 class FormatParser : public Observer { 18 19 public: 19 20 FormatParser(); 20 ~FormatParser(); 21 virtual void save(char* fileName); 22 virtual void load(char* fileName); 21 virtual ~FormatParser(); 22 virtual void save(std::ostream* file)=0; 23 virtual void load(std::istream* file)=0; 24 void setOstream(std::ostream* file); 25 void update(Observable *publisher); 26 void subjectKilled(Observable *publisher); 23 27 24 28 private: 25 MatrixContainer* readData(char* fileName, int skiplines, int skipcolumns); 26 virtual int getHeaderSize(char identifier); 29 std::ostream* saveStream; 27 30 }; 28 31 -
src/unittests/Makefile.am
r57f5cf rab4b55 30 30 CacheableTest \ 31 31 DescriptorUnittest \ 32 MatrixUnitTest \32 ParserUnitTest \ 33 33 manipulateAtomsTest \ 34 34 atomsCalculationTest \ … … 66 66 CacheableTest.cpp \ 67 67 DescriptorUnittest.cpp \ 68 MatrixUnitTest.cpp \68 ParserUnitTest.cpp \ 69 69 manipulateAtomsTest.cpp \ 70 70 atomsCalculationTest.cpp \ … … 146 146 DescriptorUnittest_LDADD = ${ALLLIBS} 147 147 148 MatrixUnitTest_SOURCES = UnitTestMain.cpp MatrixUnitTest.cpp MatrixUnitTest.hpp149 MatrixUnitTest_LDADD = ${ALLLIBS}148 ParserUnitTest_SOURCES = UnitTestMain.cpp ParserUnitTest.cpp ParserUnitTest.hpp 149 ParserUnitTest_LDADD = ${ALLLIBS} 150 150 151 151 manipulateAtomsTest_SOURCES = UnitTestMain.cpp manipulateAtomsTest.cpp manipulateAtomsTest.hpp
Note:
See TracChangeset
for help on using the changeset viewer.