/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010-2012 University of Bonn. All rights reserved. * * * This file is part of MoleCuilder. * * MoleCuilder is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * MoleCuilder is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MoleCuilder. If not, see . */ /* * atom_particleinfo.cpp * * Created on: Oct 19, 2009 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/MemDebug.hpp" #include "atom_particleinfo.hpp" #include /** Constructor of ParticleInfo. */ ParticleInfo::ParticleInfo() : Nr(-1), name("Unknown") {}; ParticleInfo::ParticleInfo(const ParticleInfo &pointer) : Nr(pointer.Nr), name(pointer.name) {} /** Destructor of ParticleInfo. */ ParticleInfo::~ParticleInfo() {}; const string& ParticleInfo::getName() const{ return name; } void ParticleInfo::setName(const string& _name){ OBSERVE; NOTIFY(AtomObservable::NameChanged); name = _name; } ostream & operator << (ostream &ost, const ParticleInfo &a) { ost << a.getName(); return ost; }; const int& ParticleInfo::getNr() const { return Nr; } void ParticleInfo::setNr(const int newnr) { Nr = newnr; } ostream & ParticleInfo::operator << (ostream &ost) const { ost << getName(); return ost; };