Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ModifiedLock Class Reference

RAII guard that defers BaseGeometry::Modified() calls until destruction. More...

#include <mitkModifiedLock.h>

Public Member Functions

 ModifiedLock ()
 Default constructor. Does not associate with any geometry. More...
 
 ModifiedLock (BaseGeometry *baseGeo)
 Construct a ModifiedLock that defers Modified() calls on the given geometry. More...
 
 ~ModifiedLock ()
 Destructor. Releases the lock and calls Modified() on the geometry if any Modified() calls were deferred during the lock's lifetime. More...
 

Detailed Description

RAII guard that defers BaseGeometry::Modified() calls until destruction.

When an object of ModifiedLock is created, the ModifiedLockFlag in the associated BaseGeometry is set to true. Therefore, all subsequent calls to Modified() are collected and only carried out when the destructor of this ModifiedLock object is called, ensuring that Modified() is invoked at most once.

Definition at line 27 of file mitkModifiedLock.h.

Constructor & Destructor Documentation

◆ ModifiedLock() [1/2]

mitk::ModifiedLock::ModifiedLock ( )

Default constructor. Does not associate with any geometry.

◆ ModifiedLock() [2/2]

mitk::ModifiedLock::ModifiedLock ( BaseGeometry *  baseGeo)

Construct a ModifiedLock that defers Modified() calls on the given geometry.

Parameters
[in]baseGeothe BaseGeometry whose Modified() calls should be deferred.
Precondition
baseGeo must not be nullptr.

◆ ~ModifiedLock()

mitk::ModifiedLock::~ModifiedLock ( )

Destructor. Releases the lock and calls Modified() on the geometry if any Modified() calls were deferred during the lock's lifetime.


The documentation for this class was generated from the following file: