summaryrefslogtreecommitdiff
path: root/comphelper/inc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-12-21 12:46:15 +0000
committerOliver Bolte <obo@openoffice.org>2005-12-21 12:46:15 +0000
commit68a5c827c656367c84a96dc3a99fd31e3e34e5c2 (patch)
tree27f0dc7bc108483a42777177f8682120c8fa791e /comphelper/inc
parent1b4e7e4263cfe5808f3d62f36b59ae67a79b1330 (diff)
INTEGRATION: CWS dba202a (1.3.34); FILE MERGED
2005/11/25 13:00:41 fs 1.3.34.1: comphelper::OReusableGuard -> osl::ResettableMutexGuard
Diffstat (limited to 'comphelper/inc')
-rw-r--r--comphelper/inc/comphelper/guarding.hxx43
1 files changed, 2 insertions, 41 deletions
diff --git a/comphelper/inc/comphelper/guarding.hxx b/comphelper/inc/comphelper/guarding.hxx
index a21938c327ff..6d152b7bd328 100644
--- a/comphelper/inc/comphelper/guarding.hxx
+++ b/comphelper/inc/comphelper/guarding.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: guarding.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 02:31:37 $
+ * last change: $Author: obo $ $Date: 2005-12-21 13:46:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -65,45 +65,6 @@ public:
typedef ORelease< ::osl::Mutex > MutexRelease;
-// ===================================================================================================
-// = class OCountedMutex - a Mutex which counts the acquire-/release-calls and "ensures" (with
-// = assertions) that the acquire-counter isn't negative ....
-// = (best used with MutexRelease to ensure that this "dangerous" class is used
-// = correctly)
-// ===================================================================================================
-
-// CAN'T USE THIS AS THERE NO SUCH THING AS IMutex ANYMORE ...
-// AND OMutex DOESN'T HAVE THE VIRTUAL METHODS IMutex HAD ...
-typedef ::osl::Mutex OCountedMutex;
-
-// ===================================================================================================
-// = class OReusableGuard
-// = a mutex guard which can be cleared and reattached
-// ===================================================================================================
-template<class T>
-class OReusableGuard : public ::osl::ClearableGuard<T>
-{
-public:
- OReusableGuard(T& _rMutex) : ::osl::ClearableGuard<T>(_rMutex) { }
- ~OReusableGuard() { }
-
- const OReusableGuard& operator= (const OReusableGuard& _rMaster)
- {
- this->clear();
- this->pT = _rMaster.pT;
- if (this->pT)
- this->pT->acquire();
- return *this;
- }
-
- void attach(T& rMutex)
- {
- this->clear();
- this->pT = &rMutex;
- this->pT->acquire();
- }
-};
-
//.........................................................................
} // namespace comphelper
//.........................................................................