Avogadro::Core::LayerManager#
-
class LayerManager#
Subclassed by PluginLayerManager, RWLayerManager
Public Static Functions
-
static Layer &getMoleculeLayer(const Molecule *mol)#
- Returns:
Layer from
moland creates MoleculeInfo if not exists
-
static std::shared_ptr<MoleculeInfo> getMoleculeInfo()#
- Returns:
the MoleculeInfo from active molecule
-
static std::shared_ptr<MoleculeInfo> getMoleculeInfo(const Molecule *mol)#
- Returns:
the MoleculeInfo from
mol
-
static size_t layerCount()#
- Returns:
the layer quantity from activeMolecule
Protected Static Functions
-
static std::shared_ptr<MoleculeInfo> activeMoleculeInfo()#
- Returns:
the layer state of the active molecule, or nullptr when there is no active molecule.
Protected Static Attributes
-
static std::weak_ptr<MoleculeInfo> m_activeInfo#
The layer state of the molecule the GUI is acting on, held weakly.
Deliberately not a
const Molecule*. Layer state is owned by each Molecule, so nothing here keeps one alive, and a raw pointer would dangle the moment the active molecule was destroyed — reading it would then either fault or silently report whatever object had taken over that address. A weak_ptr simply stops resolving instead.
-
static Layer &getMoleculeLayer(const Molecule *mol)#