The PersistentAtom object provides a container for a persistent atom reference that can be held onto. The atom() method gets the underlying atom using the unique ID mechanism of the molecule.
#include <avogadro/qtcore/persistentatom.h>
|
typedef Molecule_T | MoleculeType |
|
typedef Molecule_T::AtomType | AtomType |
|
|
| PersistentAtom (MoleculeType *m=nullptr, Index uniqueId=MaxIndex) |
| Create a persistent atom, with the specified unique id. More...
|
|
| PersistentAtom (const AtomType &a) |
| Create a persistent atom from a standard atom object. More...
|
|
void | set (MoleculeType *m, Index uniqueId) |
| Set the molecule and unique ID for the persistent object. More...
|
|
void | set (const AtomType &a) |
| Set the persistent atom from a standard atom object. More...
|
|
void | reset () |
| Reset the object to an invalid state.
|
|
bool | isValid () const |
|
MoleculeType * | molecule () const |
|
Index | uniqueIdentifier () const |
| The persistent unique ID of the atom. More...
|
|
AtomType | atom () const |
| Obtain the atom being held by the persistent object. More...
|
|
◆ PersistentAtom() [1/2]
- Parameters
-
m | The molecule the persistent atom belongs to. |
uniqueId | The unique identifier for the atom. |
◆ PersistentAtom() [2/2]
- Parameters
-
a | The atom that a persistent reference should be created for. |
◆ set() [1/2]
void set |
( |
MoleculeType * |
m, |
|
|
Index |
uniqueId |
|
) |
| |
- Parameters
-
m | The molecule that contains the atom. |
uniqueId | The unique ID of the atom. |
◆ set() [2/2]
void set |
( |
const AtomType & |
a | ) |
|
- Parameters
-
a | The atom that a persistent reference should be created for. |
◆ isValid()
- Returns
- True if the persistent atom is valid.
◆ molecule()
MoleculeType * molecule |
( |
| ) |
const |
- Returns
- The molecule the atom is a part of.
◆ uniqueIdentifier()
Index uniqueIdentifier |
( |
| ) |
const |
- Returns
- The unique ID of the atom.
◆ atom()
Molecule_T::AtomType atom |
- Returns
- A reference to the atom held by the object.
The documentation for this class was generated from the following file: