Changeset 360c8b for src/Parser/FormatParser_common.cpp
- Timestamp:
- Oct 20, 2011, 10:42:16 PM (14 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, Candidate_v1.7.0, 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:
- f94953
- Parents:
- fa9d1d (diff), 752bb4 (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. - git-author:
- Frederik Heber <heber@…> (10/20/11 22:40:59)
- git-committer:
- Frederik Heber <heber@…> (10/20/11 22:42:16)
- File:
-
- 1 moved
-
src/Parser/FormatParser_common.cpp (moved) (moved from src/Parser/FormatParser.cpp ) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/FormatParser_common.cpp
rfa9d1d r360c8b 7 7 8 8 /* 9 * FormatParser .cpp9 * FormatParser_common_common.cpp 10 10 * 11 11 * Created on: Mar 1, 2010 … … 20 20 #include "CodePatterns/MemDebug.hpp" 21 21 22 #include "FormatParser.hpp"23 22 #include <iostream> 23 24 #include "CodePatterns/Observer.hpp" 25 #include "World.hpp" 26 #include "ChangeTracker.hpp" 27 #include "FormatParser_common.hpp" 24 28 25 29 using namespace std; … … 28 32 * Constructor. 29 33 */ 30 FormatParser::FormatParser() : 31 Observer("FormatParser"), 32 parameters(NULL), 33 saveStream(NULL) 34 FormatParser_common::FormatParser_common(FormatParser_Parameters *_parameters) : 35 Observer("FormatParser_common") 34 36 { 37 parameters = _parameters; 35 38 ChangeTracker::getInstance().signOn(this); 36 39 World::getInstance().signOn(this, World::getInstance().getChannel(World::AtomInserted)); … … 41 44 * Destructor. 42 45 */ 43 FormatParser::~FormatParser() { 46 FormatParser_common::~FormatParser_common() 47 { 44 48 ChangeTracker::getInstance().signOff(this); 45 49 World::getInstance().signOff(this, World::getInstance().getChannel(World::AtomInserted)); 46 50 World::getInstance().signOff(this, World::getInstance().getChannel(World::AtomRemoved)); 51 if (parameters != NULL) 52 delete parameters; 47 53 } 48 54 … … 51 57 * change tracker here). 52 58 */ 53 void FormatParser ::update(Observable *publisher) {59 void FormatParser_common::update(Observable *publisher) { 54 60 if (!saveStream) { 55 61 cerr << "Please invoke setOstream() so the parser knows where to save the World's data." << endl; … … 64 70 * With this, each format parser is informed about specific changes in the World. 65 71 */ 66 void FormatParser ::recieveNotification(Observable *publisher, Notification_ptr notification) {72 void FormatParser_common::recieveNotification(Observable *publisher, Notification_ptr notification) { 67 73 switch (notification->getChannelNo()) { 68 74 case World::AtomInserted: … … 74 80 default: 75 81 ASSERT(0, 76 "FormatParser ::recieveNotification() - unknown notification "82 "FormatParser_common::recieveNotification() - unknown notification " 77 83 +toString(notification->getChannelNo())+" received."); 78 84 break; … … 83 89 * The observable can tell when it dies. 84 90 */ 85 void FormatParser::subjectKilled(Observable *publisher) {} 86 91 void FormatParser_common::subjectKilled(Observable *publisher) {} 87 92 88 93 /** … … 92 97 * \param ostream where to save the World's state 93 98 */ 94 void FormatParser ::setOstream(ostream* output) {99 void FormatParser_common::setOstream(ostream* output) { 95 100 saveStream = output; 96 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
