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