/* * atom_particleinfo.cpp * * Created on: Oct 19, 2009 * Author: heber */ #include "atom_particleinfo.hpp" #include "memoryallocator.hpp" /** Constructor of ParticleInfo. */ ParticleInfo::ParticleInfo() : nr(-1), Name(NULL) {}; ParticleInfo::ParticleInfo(ParticleInfo *pointer) : nr(pointer->nr), Name(pointer->Name) { if (Name == NULL) Name = " "; } /** Destructor of ParticleInfo. */ ParticleInfo::~ParticleInfo() { Free(&Name); }; ostream & operator << (ostream &ost, const ParticleInfo &a) { if (a.Name == NULL) ost << "[NULL]"; else ost << "[" << a.Name << "|" << &a << "]"; return ost; }; ostream & ParticleInfo::operator << (ostream &ost) const { if (Name == NULL) ost << "[NULL]"; else ost << "[" << Name << "|" << this << "]"; return ost; };