#include <AtomNumber.h>
Public Member Functions | |
AtomNumber () | |
Initialize to index=0 (serial=1) More... | |
unsigned | index () const |
Returns the index number. More... | |
unsigned | serial () const |
Returns the serial number. More... | |
AtomNumber & | setIndex (unsigned) |
Sets the atom number by index, returning a reference to the AtomNumber itself. More... | |
AtomNumber & | setSerial (unsigned) |
Sets the atom number by serial, returning a reference to the AtomNumber itself. More... | |
Static Public Member Functions | |
static AtomNumber | index (unsigned) |
Returns an AtomNumber with a specified index. More... | |
static AtomNumber | serial (unsigned) |
Returns an AtomNumber with a specified serial. More... | |
Private Member Functions | |
AtomNumber (unsigned) | |
Construct with a given index. More... | |
Private Attributes | |
unsigned | index_ |
Friends | |
bool | operator!= (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
bool | operator< (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
bool | operator<= (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
bool | operator== (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
bool | operator> (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
bool | operator>= (const AtomNumber &, const AtomNumber &) |
Comparison operators. More... | |
Simple class to store the index of an atom. It is just an unsigned, with all the methods inlined for better efficiency. Its special thing is that it is only accessed through serial(), index(), setSerial() and setIndex() methods, so that there no ambiguity about using the "from 0" (index) or "from 1" (serial) numbering (names as in VMD convention).
|
inlineexplicitprivate |
Construct with a given index.
This constructor is kept private to avoid implicit cast.
|
inline |
Initialize to index=0 (serial=1)
|
inline |
Returns the index number.
|
inlinestatic |
Returns an AtomNumber with a specified index.
|
inline |
Returns the serial number.
|
inlinestatic |
Returns an AtomNumber with a specified serial.
|
inline |
Sets the atom number by index, returning a reference to the AtomNumber itself.
|
inline |
Sets the atom number by serial, returning a reference to the AtomNumber itself.
|
friend |
Comparison operators.
|
friend |
Comparison operators.
|
friend |
Comparison operators.
|
friend |
Comparison operators.
|
friend |
Comparison operators.
|
friend |
Comparison operators.
|
private |
Hosted by GitHub | 1.8.17 |