Changes in src/atom_particleinfo.cpp [b8d4a3:68f03d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/atom_particleinfo.cpp
rb8d4a3 r68f03d 11 11 /** Constructor of ParticleInfo. 12 12 */ 13 ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {}; 13 ParticleInfo::ParticleInfo() : nr(-1), name("Unknown") { 14 }; 14 15 15 16 ParticleInfo::ParticleInfo(ParticleInfo *pointer) : 16 17 nr(pointer->nr), 17 Name(pointer->Name) 18 { 19 if (Name == NULL) 20 Name = " "; 21 } 18 name(pointer->name) 19 {} 22 20 23 21 … … 25 23 */ 26 24 ParticleInfo::~ParticleInfo() 27 { 28 Free(&Name); 29 }; 25 {}; 26 27 const string& ParticleInfo::getName() const{ 28 return name; 29 } 30 31 void ParticleInfo::setName(const string& _name){ 32 name = _name; 33 } 30 34 31 35 ostream & operator << (ostream &ost, const ParticleInfo &a) 32 36 { 33 ost << "[" << a. Name<< "|" << &a << "]";37 ost << "[" << a.getName() << "|" << &a << "]"; 34 38 return ost; 35 39 }; … … 37 41 ostream & ParticleInfo::operator << (ostream &ost) const 38 42 { 39 ost << "[" << Name << "|" << this << "]";43 ost << "[" << name << "|" << this << "]"; 40 44 return ost; 41 45 };
Note:
See TracChangeset
for help on using the changeset viewer.