Changeset adcdf8
- Timestamp:
- Feb 2, 2010, 12:21:13 PM (16 years ago)
- Children:
- 4bb871a
- Parents:
- 795b4d
- git-author:
- Tillmann Crueger <crueger@…> (01/15/10 15:53:29)
- git-committer:
- Tillmann Crueger <crueger@…> (02/02/10 12:21:13)
- Location:
- molecuilder/src
- Files:
-
- 4 edited
-
Actions/small_actions.cpp (modified) (1 diff)
-
molecule.cpp (modified) (1 diff)
-
molecule.hpp (modified) (3 diffs)
-
moleculelist.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/Actions/small_actions.cpp
r795b4d radcdf8 32 32 dialog->queryString("Enter name: ",&filename); 33 33 if(dialog->display()) { 34 strcpy(mol->name, filename.c_str());34 mol->setName(filename); 35 35 } 36 36 -
molecuilder/src/molecule.cpp
r795b4d radcdf8 61 61 delete(start); 62 62 }; 63 64 65 // getter and setter 66 const std::string molecule::getName(){ 67 return std::string(name); 68 } 69 70 void molecule::setName(const std::string _name){ 71 START_OBSERVER; 72 strncpy(name,_name.c_str(),MAXSTRINGSIZE); 73 FINISH_OBSERVER; 74 } 63 75 64 76 -
molecuilder/src/molecule.hpp
r795b4d radcdf8 26 26 #include <list> 27 27 #include <vector> 28 29 #include <string> 28 30 29 31 #include "graph.hpp" … … 81 83 * Class incorporates number of types 82 84 */ 83 class molecule : public PointCloud {85 class molecule : public PointCloud , public Observable { 84 86 public: 85 87 double cell_size[6];//!< cell size … … 100 102 bool ActiveFlag; //!< in a MoleculeListClass used to discern active from inactive molecules 101 103 Vector Center; //!< Center of molecule in a global box 104 int IndexNr; //!< index of molecule in a MoleculeListClass 102 105 char name[MAXSTRINGSIZE]; //!< arbitrary name 103 int IndexNr; //!< index of molecule in a MoleculeListClass 104 106 107 public: 105 108 molecule(const periodentafel * const teil); 106 109 virtual ~molecule(); 110 111 //getter and setter 112 const std::string getName(); 113 void setName(const std::string); 107 114 108 115 // re-definition of virtual functions from PointCloud -
molecuilder/src/moleculelist.cpp
r795b4d radcdf8 50 50 void MoleculeListClass::insert(molecule *mol) 51 51 { 52 START_OBSERVER; 52 53 mol->IndexNr = MaxIndex++; 53 54 ListOfMolecules.push_back(mol); 55 mol->signOn(this); 56 FINISH_OBSERVER; 54 57 }; 55 58
Note:
See TracChangeset
for help on using the changeset viewer.
