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