ZFFramework
 
Loading...
Searching...
No Matches
ZFSemaphore.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFSemaphore_h_
7#define _ZFI_ZFSemaphore_h_
8
9#include "ZFObject.h"
11
12zfclassFwd _ZFP_ZFSemaphorePrivate;
16zfclass ZFLIB_ZFCore ZFSemaphore : zfextend ZFObject {
17 ZFOBJECT_DECLARE(ZFSemaphore, ZFObject)
18
19protected:
21 virtual void objectOnInit(void);
23 virtual void objectOnDealloc(void);
24
25public:
28
29public:
34
35public:
45
51
57
63 , ZFMP_IN(zftimet, miliSecs)
64 )
65
66public:
75 , ZFMP_IN(zftimet, miliSecs)
76 )
77
78private:
79 _ZFP_ZFSemaphorePrivate *d;
80};
81
83#endif // #ifndef _ZFI_ZFSemaphore_h_
84
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:854
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
ZFObject related include.
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
virtual void semaphoreBroadcast()
notify all waiters
virtual void objectOnInit(void)
override this to init your object
virtual void lockAndBroadcast()
util to semaphoreLock/semaphoreBroadcast/semaphoreUnlock
virtual void semaphoreSignal()
notify one waiter
virtual void * nativeSemaphore()
for internal use only
virtual void semaphoreLock()
lock
virtual void semaphoreWait()
wait until signal
virtual void lockAndWait()
util to semaphoreLock/semaphoreWait/semaphoreUnlock
virtual void semaphoreUnlock()
unlock
virtual void lockAndSignal()
util to semaphoreLock/semaphoreSignal/semaphoreUnlock
virtual void objectOnDealloc(void)
override this to destroy your object