Replace tabs with spaces in more files.
--HG-- branch : trunk
This commit is contained in:
@@ -34,25 +34,25 @@ namespace ZThread {
|
||||
* @date <2003-07-20T20:17:34-0400>
|
||||
* @version 2.3.0
|
||||
*
|
||||
* A simple wrapper template that uses Guard's to provide
|
||||
* A simple wrapper template that uses Guard's to provide
|
||||
* serialized access to an objects member functions.
|
||||
*/
|
||||
template <class T, class LockType = Mutex>
|
||||
class GuardedClass {
|
||||
|
||||
|
||||
LockType _lock;
|
||||
T* _ptr;
|
||||
|
||||
|
||||
class TransferedScope {
|
||||
public:
|
||||
|
||||
|
||||
template <class LockType1, class LockType2>
|
||||
static void shareScope(LockHolder<LockType1>& l1,
|
||||
LockHolder<LockType2>& l2) {
|
||||
l1.disable();
|
||||
l2.getLock().acquire();
|
||||
}
|
||||
|
||||
|
||||
template <class LockType1>
|
||||
static void createScope(LockHolder<LockType1>& l) {
|
||||
// Don't acquire the lock when scope the Guard is created
|
||||
@@ -82,9 +82,9 @@ namespace ZThread {
|
||||
|
||||
GuardedClass();
|
||||
GuardedClass& operator=(const GuardedClass&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
GuardedClass(T* ptr) : _ptr(ptr) {}
|
||||
~GuardedClass() {
|
||||
if(_ptr)
|
||||
@@ -95,9 +95,9 @@ namespace ZThread {
|
||||
Proxy p(_lock, _ptr);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace ZThread
|
||||
|
||||
#endif // __ZTGUARDEDCLASS_H__
|
||||
|
||||
Reference in New Issue
Block a user