Changeset 8e1f7af for src


Ignore:
Timestamp:
May 8, 2010, 8:34:05 PM (15 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:
d893f79
Parents:
4a75d9
git-author:
Frederik Heber <heber@…> (05/08/10 20:30:27)
git-committer:
Frederik Heber <heber@…> (05/08/10 20:34:05)
Message:

class config added to World.

  • World now has the global configuration.
  • new function World::getConfig().
  • TextWindow::TextWindow() uses thr above to obtain the configuration.

Signed-off-by: Frederik Heber <heber@…>

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/TextWindow.cpp

    r4a75d9 r8e1f7af  
    5252{
    5353  MoleculeListClass *molecules = World::getInstance().getMolecules();
    54   config *configuration = NULL;
     54  config *configuration = World::getInstance().getConfig();
    5555  periodentafel *periode = World::getInstance().getPeriode();
    5656  char *ConfigFileName = NULL;
  • src/UIElements/UIFactory.hpp

    r4a75d9 r8e1f7af  
    1212class Dialog;
    1313class DialogDescription;
    14 
    15 class MoleculeListClass;
    16 class config;
    17 class periodentafel;
    1814
    1915struct menuPopulaters;
  • src/World.cpp

    r4a75d9 r8e1f7af  
    99
    1010#include "atom.hpp"
     11#include "config.hpp"
    1112#include "molecule.hpp"
    1213#include "periodentafel.hpp"
     
    2526periodentafel *&World::getPeriode(){
    2627  return periode;
     28}
     29
     30config *&World::getConfig(){
     31  return configuration;
    2732}
    2833
     
    267272World::World() :
    268273    periode(new periodentafel),
     274    configuration(new config),
    269275    atoms(),
    270276    currAtomId(0),
     
    292298  delete molecules_deprecated;
    293299  delete periode;
     300  delete configuration;
    294301  MoleculeSet::iterator molIter;
    295302  for(molIter=molecules.begin();molIter!=molecules.end();++molIter){
  • src/World.hpp

    r4a75d9 r8e1f7af  
    3030
    3131// forward declarations
     32class config;
    3233class periodentafel;
    3334class MoleculeListClass;
     
    7576
    7677  /**
     78   * returns the configuration for the world.
     79   */
     80  config *&getConfig();
     81
     82  /**
    7783   * returns the first atom that matches a given descriptor.
    7884   * Do not rely on ordering for descriptors that match more than one atom.
     
    234240
    235241  periodentafel *periode;
     242  config *configuration;
    236243  static double *cell_size;
    237244  static char *defaultName;
  • src/builder.cpp

    r4a75d9 r8e1f7af  
    25602560int main(int argc, char **argv)
    25612561{
    2562     config *configuration = new config;
     2562    config *configuration = World::getInstance().getConfig();
    25632563    Vector x, y, z, n;
    25642564    ifstream test;
    25652565    ofstream output;
    25662566    string line;
    2567     char *ConfigFileName = NULL;
    25682567
    25692568    cout << ESPACKVersion << endl;
Note: See TracChangeset for help on using the changeset viewer.