Changeset e04838 for molecuilder


Ignore:
Timestamp:
May 8, 2010, 8:34:05 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
495a53
Parents:
536ce2
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:
molecuilder/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/UIElements/TextWindow.cpp

    r536ce2 re04838  
    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;
  • molecuilder/src/UIElements/UIFactory.hpp

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

    r536ce2 re04838  
    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){
  • molecuilder/src/World.hpp

    r536ce2 re04838  
    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;
  • molecuilder/src/builder.cpp

    r536ce2 re04838  
    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.