Scanframe Modular Application 0.1.0
|
TStaticSync provides a system-independent interface to build sets of classes that act somewhat like monitors, i.e., classes in which only one member function can execute at any one time regardless of which instance it is being called on. TStaticSync uses Mutex, so it is portable to all platforms that Mutex has been ported to. More...
#include <TStaticSync.h>
Classes | |
class | Lock |
Public Member Functions | |
TStaticSync< T > & | operator= (const TStaticSync< T > &)=delete |
Do not allow copying. | |
Protected Member Functions | |
TStaticSync () | |
Default constructor. | |
TStaticSync (const TStaticSync< T > &) | |
Copy constructor. | |
~TStaticSync () | |
Destructor. | |
TStaticSync provides a system-independent interface to build sets of classes that act somewhat like monitors, i.e., classes in which only one member function can execute at any one time regardless of which instance it is being called on. TStaticSync uses Mutex, so it is portable to all platforms that Mutex has been ported to.
TStaticSync Public Interface
None. TStaticSync can only be a base class.
TStaticSync Protected Interface
TStaticSync<T>(const TStaticSync<T>&); Copy constructor. Does not copy the Mutex object. const TStaticSync<T>& operator =(const TStaticSync<T>&); Assignment operator. Does not copy the Mutex object. class Lock; Handles locking and unlocking of member functions.
Example:
|
inlineprotected |
Default constructor.
If this is the first TStaticSync<T> object to be constructed, create the semaphore.
The copy constructor only has to increment the count, since there will already be at least one TStaticSync<T> object, namely, the one being copied.
|
inlineprotected |
Copy constructor.
|
inlineprotected |
Destructor.
|
delete |
Do not allow copying.