#1064 Use constexpr to verify keywords for pdmObject and pdmFields

This commit is contained in:
Magne Sjaastad
2017-01-07 08:57:49 +01:00
parent c65c9b1c58
commit 5d9fd5ddeb
4 changed files with 71 additions and 2 deletions

View File

@@ -97,6 +97,8 @@ class PdmObjectCapability;
#define CAF_PDM_InitField(field, keyword, default, uiName, iconResourceName, toolTip, whatsThis) \
{ \
CAF_PDM_VERIFY_XML_KEYWORD(keyword) \
\
static bool chekingThePresenceOfHeaderAndSourceInitMacros = \
Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \
this->isInheritedFromPdmUiObject(); \
@@ -113,6 +115,8 @@ class PdmObjectCapability;
#define CAF_PDM_InitFieldNoDefault(field, keyword, uiName, iconResourceName, toolTip, whatsThis) \
{ \
CAF_PDM_VERIFY_XML_KEYWORD(keyword) \
\
static bool chekingThePresenceOfHeaderAndSourceInitMacros = \
Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class(); \
this->isInheritedFromPdmUiObject(); \