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