Regina Calculation Engine
|
Creates a temporary lock on the topological properties of the given triangulation. More...
#include <triangulation/detail/triangulation.h>
Public Member Functions | |
TopologyLock (TriangulationBase< dim > *tri) | |
Creates a new lock on the given triangulation. More... | |
~TopologyLock () | |
Removes this lock on the associated triangulation. More... | |
Creates a temporary lock on the topological properties of the given triangulation.
While this object exists, any computed properties of the underlying manifold will be preserved even when the triangulation changes. This allows you to avoid recomputing expensive invariants when the underlying manifold is retriangulated.
The lock will be created by the class constructor and removed by the class destructor. That is, the lock will remain in effect until the TopologyLock object goes out of scope (or is otherwise destroyed).
Multiple locks are allowed. If multiple locks are created, then computed properties of the manifold will be preserved as long as any one of these locks still exists. Multiple locks do not necessarily need to be nested (i.e., the order of destruction does not need to be the reverse order of construction).
regina::detail::TriangulationBase< dim >::TopologyLock::TopologyLock | ( | TriangulationBase< dim > * | tri | ) |
Creates a new lock on the given triangulation.
tri | the triangulation whose topological properties are to be locked. This may be null (in which case the lock has no effect). |
regina::detail::TriangulationBase< dim >::TopologyLock::~TopologyLock | ( | ) |
Removes this lock on the associated triangulation.