LibreOffice Module svl (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
svl::undo::impl::UndoManagerGuard Class Reference
Collaboration diagram for svl::undo::impl::UndoManagerGuard:
[legend]

Classes

struct  ResetGuard
 

Public Member Functions

 UndoManagerGuard (SfxUndoManager_Data &i_managerData)
 
 ~UndoManagerGuard ()
 
ResetGuard clear ()
 
void cancelNotifications ()
 
void markForDeletion (std::unique_ptr< SfxUndoAction > i_action)
 marks the given Undo action for deletion More...
 
void scheduleNotification (UndoListenerVoidMethod i_notificationMethod)
 schedules the given SfxUndoListener method to be called for all registered listeners. More...
 
void scheduleNotification (UndoListenerStringMethod i_notificationMethod, const OUString &i_actionComment)
 

Private Attributes

SfxUndoManager_Datam_rManagerData
 
::osl::ResettableMutexGuard m_aGuard
 
::std::vector< std::unique_ptr< SfxUndoAction > > m_aUndoActionsCleanup
 
::std::vector< NotifyUndoListener > m_notifiers
 

Detailed Description

Definition at line 255 of file undo.cxx.

Constructor & Destructor Documentation

◆ UndoManagerGuard()

svl::undo::impl::UndoManagerGuard::UndoManagerGuard ( SfxUndoManager_Data i_managerData)
inlineexplicit

Definition at line 258 of file undo.cxx.

References aMutex.

◆ ~UndoManagerGuard()

svl::undo::impl::UndoManagerGuard::~UndoManagerGuard ( )

Member Function Documentation

◆ cancelNotifications()

void svl::undo::impl::UndoManagerGuard::cancelNotifications ( )
inline

Definition at line 277 of file undo.cxx.

References m_notifiers.

◆ clear()

ResetGuard svl::undo::impl::UndoManagerGuard::clear ( )
inline

Definition at line 271 of file undo.cxx.

References m_aGuard.

◆ markForDeletion()

void svl::undo::impl::UndoManagerGuard::markForDeletion ( std::unique_ptr< SfxUndoAction i_action)
inline

marks the given Undo action for deletion

The Undo action will be put into a list, whose members will be deleted from within the destructor of the UndoManagerGuard. This deletion will happen without the UndoManager's mutex locked.

Definition at line 287 of file undo.cxx.

References m_aUndoActionsCleanup.

◆ scheduleNotification() [1/2]

void svl::undo::impl::UndoManagerGuard::scheduleNotification ( UndoListenerStringMethod  i_notificationMethod,
const OUString &  i_actionComment 
)
inline

Definition at line 304 of file undo.cxx.

References m_notifiers.

◆ scheduleNotification() [2/2]

void svl::undo::impl::UndoManagerGuard::scheduleNotification ( UndoListenerVoidMethod  i_notificationMethod)
inline

schedules the given SfxUndoListener method to be called for all registered listeners.

The notification will happen after the Undo manager's mutex has been released, and after all pending deletions of Undo actions are done.

Definition at line 299 of file undo.cxx.

References m_notifiers.

Member Data Documentation

◆ m_aGuard

::osl::ResettableMutexGuard svl::undo::impl::UndoManagerGuard::m_aGuard
private

Definition at line 311 of file undo.cxx.

Referenced by clear(), and ~UndoManagerGuard().

◆ m_aUndoActionsCleanup

::std::vector< std::unique_ptr<SfxUndoAction> > svl::undo::impl::UndoManagerGuard::m_aUndoActionsCleanup
private

Definition at line 312 of file undo.cxx.

Referenced by markForDeletion(), and ~UndoManagerGuard().

◆ m_notifiers

::std::vector< NotifyUndoListener > svl::undo::impl::UndoManagerGuard::m_notifiers
private

Definition at line 313 of file undo.cxx.

Referenced by cancelNotifications(), scheduleNotification(), and ~UndoManagerGuard().

◆ m_rManagerData

SfxUndoManager_Data& svl::undo::impl::UndoManagerGuard::m_rManagerData
private

Definition at line 310 of file undo.cxx.

Referenced by ~UndoManagerGuard().


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