Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    rac9b56 r24a5e0  
    2929#include <string>
    3030
     31#include "defs.hpp"
    3132#include "graph.hpp"
    3233#include "stackclass.hpp"
     
    8586 */
    8687class molecule : public PointCloud , public Observable {
     88  friend molecule *NewMolecule();
     89  friend void DeleteMolecule(molecule *);
    8790  public:
    8891    double cell_size[6];//!< cell size
     
    108111  private:
    109112    Cacheable<string> formula;
     113    moleculeId_t id;
     114  protected:
     115    molecule(const periodentafel * const teil);
     116    virtual ~molecule();
     117
    110118
    111119public:
    112   molecule(const periodentafel * const teil);
    113   virtual ~molecule();
    114 
    115120  //getter and setter
    116121  const std::string getName();
     122  moleculeId_t getId();
     123  void setId(moleculeId_t);
    117124  void setName(const std::string);
    118125  const std::string getFormula();
    119126  std::string calcFormula();
     127
    120128
    121129  // re-definition of virtual functions from PointCloud
     
    321329};
    322330
     331molecule *NewMolecule();
     332void DeleteMolecule(molecule* mol);
     333
    323334#include "molecule_template.hpp"
    324335
     
    330341    int MaxIndex;
    331342
    332   MoleculeListClass();
     343  MoleculeListClass(World *world);
    333344  ~MoleculeListClass();
    334345
     
    339350  bool OutputConfigForListOfFragments(config *configuration, int *SortIndex);
    340351  int NumberOfActiveMolecules();
    341   void Enumerate(ofstream *out);
     352  void Enumerate(ostream *out);
    342353  void Output(ofstream *out);
    343354  void DissectMoleculeIntoConnectedSubgraphs(const periodentafel * const periode, config * const configuration);
     
    363374
    364375  private:
     376  World *world; //!< The world this List belongs to. Needed to avoid deadlocks in the destructor
    365377};
    366378
Note: See TracChangeset for help on using the changeset viewer.