diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-29 09:58:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-29 11:02:45 +0100 |
commit | c24272c7972e0cbb51e7f104e356973ecb03c352 (patch) | |
tree | c8e3c0dd30daabae61adbdf9e70e70a1fc8b551c /include | |
parent | a65b6a4626d85880a4f39bda177473df91cf5369 (diff) |
the dubious SfxModelSubComponent and friends aren't used outside sfx2
so move out of the globals headers and drop their public visibility
markup
Change-Id: Ie0a852c962a9d05488022397e83152d1c73cfa29
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sfxbasemodel.hxx | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx index 9988183f0ad3..25c5a0901ea0 100644 --- a/include/sfx2/sfxbasemodel.hxx +++ b/include/sfx2/sfxbasemodel.hxx @@ -894,82 +894,6 @@ private: } ; // class SfxBaseModel -/** base class for sub components of an SfxBaseModel, which share their ref count and lifetime with the SfxBaseModel -*/ -class SFX2_DLLPUBLIC SfxModelSubComponent -{ -public: - /** checks whether the instance is alive, i.e. properly initialized, and not yet disposed - */ - void MethodEntryCheck() - { - m_rModel.MethodEntryCheck( true ); - } - - // called when the SfxBaseModel which the component is superordinate of is being disposed - virtual void disposing(); - -protected: - SfxModelSubComponent( SfxBaseModel& i_model ) - :m_rModel( i_model ) - { - } - virtual ~SfxModelSubComponent(); - - void acquireModel() { m_rModel.acquire(); } - void releaseModel() { m_rModel.release(); } - - bool isDisposed() const { return m_rModel.IsDisposed(); } - -protected: - const SfxBaseModel& getBaseModel() const { return m_rModel; } - SfxBaseModel& getBaseModel() { return m_rModel; } - - ::osl::Mutex& getMutex() { return m_rModel.getMutex(); } - -private: - SfxBaseModel& m_rModel; -}; - -class SFX2_DLLPUBLIC SfxModelGuard -{ -public: - enum AllowedModelState - { - // not yet initialized - E_INITIALIZING, - // fully alive, i.e. initialized, and not yet disposed - E_FULLY_ALIVE - }; - - SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE ) - : m_aGuard() - { - i_rModel.MethodEntryCheck( i_eState != E_INITIALIZING ); - } - SfxModelGuard( SfxModelSubComponent& i_rSubComponent ) - :m_aGuard() - { - i_rSubComponent.MethodEntryCheck(); - } - ~SfxModelGuard() - { - } - - void reset() - { - m_aGuard.reset(); - } - - void clear() - { - m_aGuard.clear(); - } - -private: - SolarMutexResettableGuard m_aGuard; -}; - #endif // INCLUDED_SFX2_SFXBASEMODEL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |