IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
IPSDK_Nightly
include
public
IPSDKBaseData
ToolTip
ToolTipSrcMacros.h
Go to the documentation of this file.
1
// ToolTipSrcMacros.h:
3
// -------------------
4
//
14
15
#ifndef __IPSDKBASEDATA_TOOLTIPSRCMACROS_H__
16
#define __IPSDKBASEDATA_TOOLTIPSRCMACROS_H__
17
18
#include <boost/thread/lock_guard.hpp>
19
#include <IPSDKUtil/Logger/LogMessageFormater.h>
20
#include <
IPSDKUtil/Tools/BaseMacros.h
>
21
#include <
IPSDKUtil/Tools/MutexMacros.h
>
22
23
// mutex used to protect data for concurrent accesses
24
IPSDK_STATIC_MUTEX
(ToolTipMutex);
25
28
31
#define IPSDK_IMPLEMENT_TOOLTIP(libraryName, className, eMsgEnum) \
32
const std::string& className::getObjectName() const \
33
{ \
34
return getObjectNameStr(); \
35
} \
36
const std::string& className::getToolTip() const \
37
{ \
38
return getToolTipStr(); \
39
} \
40
const std::string& className::getObjectNameStr() \
41
{ \
42
boost::lock_guard<boost::mutex> lock(ToolTipMutex::get()); \
43
static std::string g_objectNameStr; \
44
if (g_objectNameStr.empty() == true) \
45
g_objectNameStr = BOOST_PP_STRINGIZE(className); \
46
return g_objectNameStr; \
47
} \
48
const std::string& className::getToolTipStr() \
49
{ \
50
boost::lock_guard<boost::mutex> lock(ToolTipMutex::get()); \
51
static std::string g_toolTipStr; \
52
if (g_toolTipStr.empty() == true) { \
53
MessageMapRegistrator<eMsgEnum>::process(); \
54
ipsdk::LogMessageFormater logMsgFormater(IPSDK_LIB_LOG_MSG_MANAGER(libraryName)); \
55
logMsgFormater[eMsgEnum::BOOST_PP_CAT(e, BOOST_PP_CAT(className, ToolTipId))]; \
56
g_toolTipStr = logMsgFormater.string(); \
57
} \
58
return g_toolTipStr; \
59
}
60
63
64
#endif // __IPSDKBASEDATA_TOOLTIPSRCMACROS_H__
BaseMacros.h
Base macros set for IPSDK library.
MutexMacros.h
Macros allowing to define a getter to a static mutex.
IPSDK_STATIC_MUTEX
#define IPSDK_STATIC_MUTEX(MutexName)
macro allowing to create a static mutex
Definition:
MutexMacros.h:27
Generated on Tue Apr 15 2025 16:20:46 for IPSDK by
1.8.14