Ignore:
Timestamp:
Oct 27, 2009, 4:11:22 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
069034
Parents:
55a71b
Message:

Huge refactoring to make const what is const (ticket #38), continued.

  • too many changes because of too many cross-references to be able to list them up here.
  • NOTE that "make check" runs fine and did catch several error.
  • note that we had to use const_iterator several times when the map, ... was declared const.
  • at times we changed an allocated LinkedCell LCList(...) into

const LinkedCell *LCList;
LCList = new LinkedCell(...);

  • also mutable (see ticket #5) was used, e.g. for molecule::InternalPointer (PointCloud changes are allowed, because they are just accounting).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.hpp

    r55a71b ra9b2a0a  
    9999    char name[MAXSTRINGSIZE];         //!< arbitrary name
    100100    int IndexNr;        //!< index of molecule in a MoleculeListClass
    101     class Tesselation *TesselStruct;
    102101
    103102  molecule(periodentafel *teil);
     
    105104
    106105  // re-definition of virtual functions from PointCloud
    107   Vector *GetCenter(ofstream *out);
    108   TesselPoint *GetPoint();
    109   TesselPoint *GetTerminalPoint();
    110   void GoToNext();
    111   void GoToPrevious();
    112   void GoToFirst();
    113   void GoToLast();
    114   bool IsEmpty();
    115   bool IsEnd();
     106  Vector *GetCenter(ofstream *out) const ;
     107  TesselPoint *GetPoint() const ;
     108  TesselPoint *GetTerminalPoint() const ;
     109  void GoToNext() const ;
     110  void GoToPrevious() const ;
     111  void GoToFirst() const ;
     112  void GoToLast() const ;
     113  bool IsEmpty() const ;
     114  bool IsEnd() const ;
    116115
    117116  // templates for allowing global manipulation of all vectors
     
    217216  void Mirror(const Vector *x);
    218217  void Align(Vector *n);
    219   void Scale(double **factor);
     218  void Scale(const double ** const factor);
    220219  void DeterminePeriodicCenter(Vector &center);
    221220  Vector * DetermineCenterOfGravity(ofstream *out);
    222   Vector * DetermineCenterOfAll(ofstream *out);
     221  Vector * DetermineCenterOfAll(ofstream *out) const;
    223222  void SetNameFromFilename(const char *filename);
    224223  void SetBoxDimension(Vector *dim);
     
    298297  private:
    299298  int last_atom;      //!< number given to last atom
    300   atom *InternalPointer;  //!< internal pointer for PointCloud
     299  mutable atom *InternalPointer;  //!< internal pointer for PointCloud
    301300};
    302301
Note: See TracChangeset for help on using the changeset viewer.