LibreOffice Module forms (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
frm::ControlModelLock Class Reference

class whose instances lock an OControlModel More...

#include <FormComponent.hxx>

Collaboration diagram for frm::ControlModelLock:
[legend]

Public Member Functions

 ControlModelLock (OControlModel &_rModel)
 
 ~ControlModelLock ()
 
void acquire ()
 
void release ()
 
OControlModelgetModel () const
 
void addPropertyNotification (const sal_Int32 _nHandle, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
 adds a property change notification, which is to be fired when the last lock on the model (in the current thread) is released. More...
 

Private Member Functions

void impl_notifyAll_nothrow ()
 
 ControlModelLock (const ControlModelLock &)=delete
 
ControlModelLockoperator= (const ControlModelLock &)=delete
 

Private Attributes

OControlModelm_rModel
 
bool m_bLocked
 
std::vector< sal_Int32 > m_aHandles
 
std::vector< css::uno::Any > m_aOldValues
 
std::vector< css::uno::Any > m_aNewValues
 

Detailed Description

class whose instances lock an OControlModel

Locking here merely means locking the OControlModel's mutex.

In addition to the locking facility, the class is also able to fire property change notifications. This happens when the last ControlModelLock instance on a stack dies.

Definition at line 87 of file FormComponent.hxx.

Constructor & Destructor Documentation

◆ ControlModelLock() [1/2]

frm::ControlModelLock::ControlModelLock ( OControlModel _rModel)
inline

Definition at line 90 of file FormComponent.hxx.

References acquire().

◆ ~ControlModelLock()

frm::ControlModelLock::~ControlModelLock ( )
inline

Definition at line 97 of file FormComponent.hxx.

References m_bLocked, and release().

◆ ControlModelLock() [2/2]

frm::ControlModelLock::ControlModelLock ( const ControlModelLock )
privatedelete

Member Function Documentation

◆ acquire()

void frm::ControlModelLock::acquire ( )
inline

◆ addPropertyNotification()

void frm::ControlModelLock::addPropertyNotification ( const sal_Int32  _nHandle,
const css::uno::Any &  _rOldValue,
const css::uno::Any &  _rNewValue 
)

adds a property change notification, which is to be fired when the last lock on the model (in the current thread) is released.

Definition at line 81 of file FormComponent.cxx.

References m_aHandles, m_aNewValues, and m_aOldValues.

Referenced by frm::OBoundControlModel::disposing().

◆ getModel()

OControlModel & frm::ControlModelLock::getModel ( ) const
inline

Definition at line 105 of file FormComponent.hxx.

References m_rModel.

◆ impl_notifyAll_nothrow()

void frm::ControlModelLock::impl_notifyAll_nothrow ( )
private

◆ operator=()

ControlModelLock & frm::ControlModelLock::operator= ( const ControlModelLock )
privatedelete

◆ release()

void frm::ControlModelLock::release ( )
inline

Member Data Documentation

◆ m_aHandles

std::vector< sal_Int32 > frm::ControlModelLock::m_aHandles
private

Definition at line 121 of file FormComponent.hxx.

Referenced by addPropertyNotification(), and impl_notifyAll_nothrow().

◆ m_aNewValues

std::vector< css::uno::Any > frm::ControlModelLock::m_aNewValues
private

Definition at line 123 of file FormComponent.hxx.

Referenced by addPropertyNotification(), and impl_notifyAll_nothrow().

◆ m_aOldValues

std::vector< css::uno::Any > frm::ControlModelLock::m_aOldValues
private

Definition at line 122 of file FormComponent.hxx.

Referenced by addPropertyNotification(), and impl_notifyAll_nothrow().

◆ m_bLocked

bool frm::ControlModelLock::m_bLocked
private

Definition at line 120 of file FormComponent.hxx.

Referenced by acquire(), release(), and ~ControlModelLock().

◆ m_rModel

OControlModel& frm::ControlModelLock::m_rModel
private

Definition at line 119 of file FormComponent.hxx.

Referenced by acquire(), getModel(), impl_notifyAll_nothrow(), and release().


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