source:
molecuilder/src/atom_particleinfo.cpp@
0341a9
| Last change on this file since 0341a9 was 1de701, checked in by , 16 years ago | |
|---|---|
|
|
| File size: 808 bytes | |
| Rev | Line | |
|---|---|---|
| [2e2a70] | 1 | /* |
| 2 | * atom_particleinfo.cpp | |
| 3 | * | |
| 4 | * Created on: Oct 19, 2009 | |
| 5 | * Author: heber | |
| 6 | */ | |
| 7 | ||
| 8 | #include "atom_particleinfo.hpp" | |
| 9 | #include "memoryallocator.hpp" | |
| 10 | ||
| 11 | /** Constructor of ParticleInfo. | |
| 12 | */ | |
| [1de701] | 13 | ParticleInfo::ParticleInfo() : nr(-1), name("Unknown") { |
| 14 | }; | |
| [2e2a70] | 15 | |
| [7bfc19] | 16 | ParticleInfo::ParticleInfo(ParticleInfo *pointer) : |
| [98a2987] | 17 | nr(pointer->nr), |
| [1de701] | 18 | name(pointer->name) |
| [7bfc19] | 19 | {} |
| 20 | ||
| 21 | ||
| [2e2a70] | 22 | /** Destructor of ParticleInfo. |
| 23 | */ | |
| 24 | ParticleInfo::~ParticleInfo() | |
| [1de701] | 25 | {}; |
| 26 | ||
| 27 | const string& ParticleInfo::getName() const{ | |
| 28 | return name; | |
| 29 | } | |
| 30 | ||
| 31 | void ParticleInfo::setName(const string& _name){ | |
| 32 | name = _name; | |
| 33 | } | |
| [2e2a70] | 34 | |
| [94d0ad] | 35 | ostream & operator << (ostream &ost, const ParticleInfo &a) |
| 36 | { | |
| [1de701] | 37 | ost << "[" << a.getName() << "|" << &a << "]"; |
| [94d0ad] | 38 | return ost; |
| 39 | }; | |
| 40 | ||
| 41 | ostream & ParticleInfo::operator << (ostream &ost) const | |
| 42 | { | |
| [1de701] | 43 | ost << "[" << name << "|" << this << "]"; |
| [94d0ad] | 44 | return ost; |
| 45 | }; | |
| 46 |
Note:
See TracBrowser
for help on using the repository browser.
