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