Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_particleinfo.cpp

    rb8d4a3 r68f03d  
    1111/** Constructor of ParticleInfo.
    1212 */
    13 ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {};
     13ParticleInfo::ParticleInfo() : nr(-1), name("Unknown") {
     14};
    1415
    1516ParticleInfo::ParticleInfo(ParticleInfo *pointer) :
    1617    nr(pointer->nr),
    17     Name(pointer->Name)
    18     {
    19       if (Name == NULL)
    20         Name = " ";
    21     }
     18    name(pointer->name)
     19    {}
    2220
    2321
     
    2523 */
    2624ParticleInfo::~ParticleInfo()
    27 {
    28   Free(&Name);
    29 };
     25{};
     26
     27const string& ParticleInfo::getName() const{
     28  return name;
     29}
     30
     31void ParticleInfo::setName(const string& _name){
     32  name = _name;
     33}
    3034
    3135ostream & operator << (ostream &ost, const ParticleInfo &a)
    3236{
    33   ost << "[" << a.Name << "|" << &a << "]";
     37  ost << "[" << a.getName() << "|" << &a << "]";
    3438  return ost;
    3539};
     
    3741ostream & ParticleInfo::operator << (ostream &ost) const
    3842{
    39   ost << "[" << Name << "|" << this << "]";
     43  ost << "[" << name << "|" << this << "]";
    4044  return ost;
    4145};
Note: See TracChangeset for help on using the changeset viewer.