From: Christian P. <cp...@us...> - 2005-01-23 13:28:11
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17607/include/pclasses/System Modified Files: Mutex.h CriticalSection.h Log Message: Added copy-ctor and assignment operator to Mutex::ScopedLock and CriticalSection::ScopedLock. Index: Mutex.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Mutex.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Mutex.h 22 Dec 2004 17:54:42 -0000 1.1.1.1 +++ Mutex.h 23 Jan 2005 13:28:00 -0000 1.2 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004 by Christian Prochnow * + * Copyright (C) 2004,2005 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * @@ -126,13 +126,16 @@ } \endcode */ - class ScopedLock: public NonCopyable { + class ScopedLock { public: ScopedLock(Mutex& mutex) throw(SystemError); + ScopedLock(const ScopedLock& lck) throw(SystemError); ~ScopedLock() throw(); void release() throw(SystemError); + ScopedLock& operator=(Mutex& mutex) throw(SystemError); + ScopedLock& operator=(const ScopedLock& lck) throw(SystemError); private: Mutex* _mutex; Index: CriticalSection.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/CriticalSection.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- CriticalSection.h 22 Dec 2004 17:54:41 -0000 1.1.1.1 +++ CriticalSection.h 23 Jan 2005 13:28:00 -0000 1.2 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004 by Christian Prochnow * + * Copyright (C) 2004,2005 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * @@ -81,13 +81,16 @@ } \endcode */ - class ScopedLock: public NonCopyable { + class ScopedLock { public: ScopedLock(CriticalSection& cs) throw(); + ScopedLock(const ScopedLock& lck) throw(); ~ScopedLock() throw(); void release() throw(); + ScopedLock& operator=(CriticalSection& cs) throw(); + ScopedLock& operator=(const ScopedLock& lck) throw(); private: CriticalSection* _cs; |