ZFFramework
 
Loading...
Searching...
No Matches
ZFProtocolZFObjectMutex.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFProtocolZFObjectMutex_h_
7#define _ZFI_ZFProtocolZFObjectMutex_h_
8
9#include "ZFCore/ZFProtocol.h"
10#include "ZFCore/ZFObject.h"
12
16#define ZFOBJECT_MUTEX_IMPL_DEFINE(registerSig, protocolLevel, setupAction) \
17 ZF_STATIC_REGISTER_INIT(_ZFP_OMI_##registerSig) { \
18 _protocolLevel = protocolLevel; \
19 if(_ZFP_ZFObjectMutexImplRegistered == zfnull || _protocolLevel > *_ZFP_ZFObjectMutexImplRegistered) { \
20 _ZFP_ZFObjectMutexImplRegistered = &_protocolLevel; \
21 { \
22 setupAction \
23 } \
24 } \
25 } \
26 ZF_STATIC_REGISTER_DESTROY(_ZFP_OMI_##registerSig) { \
27 if(&_protocolLevel == _ZFP_ZFObjectMutexImplRegistered) { \
28 _ZFP_ZFObjectMutexImplRegistered = zfnull; \
29 ZFObjectMutexImplSet(); \
30 } \
31 } \
32 ZFProtocolLevel _protocolLevel; \
33 ZF_STATIC_REGISTER_END(_ZFP_OMI_##registerSig)
34
35extern ZFLIB_ZFCore ZFProtocolLevel *_ZFP_ZFObjectMutexImplRegistered;
36
38#endif // #ifndef _ZFI_ZFProtocolZFObjectMutex_h_
39
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#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.
protocol definitions for ZFFramework
v_ZFProtocolLevel::ZFEnumType ZFProtocolLevel
see v_ZFProtocolLevel
Definition ZFProtocol.h:34