From 1933bbeb848f57d419981b07dd5f5fe7465c674a Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 25 Sep 2015 15:09:19 +0200 Subject: [PATCH] (#496) Use system macro for init of abstract PDM classes Removed project specific macro --- ApplicationCode/ProjectDataModel/RimCase.cpp | 4 +--- ApplicationCode/ProjectDataModel/RimEclipseCase.cpp | 4 +--- ApplicationCode/ProjectDataModel/RimView.cpp | 4 +--- .../ProjectDataModel/cafPdmAbstractClassSourceInit.h | 6 ------ 4 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 ApplicationCode/ProjectDataModel/cafPdmAbstractClassSourceInit.h diff --git a/ApplicationCode/ProjectDataModel/RimCase.cpp b/ApplicationCode/ProjectDataModel/RimCase.cpp index 55f8510f02..09e06d6f75 100644 --- a/ApplicationCode/ProjectDataModel/RimCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimCase.cpp @@ -20,14 +20,12 @@ #include "RimCase.h" #include "cafPdmObjectFactory.h" -#include "cafPdmAbstractClassSourceInit.h" - #include #include #include #include -CAF_PDM_ABSTRACT_SOURCE_INIT(RimCase, "RimCase"); +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimCase, "RimCase"); //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp index bef0245695..b0edcf3b20 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp @@ -44,9 +44,7 @@ #include -#include "cafPdmAbstractClassSourceInit.h" - -CAF_PDM_ABSTRACT_SOURCE_INIT(RimEclipseCase, "RimReservoir"); +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimEclipseCase, "RimReservoir"); //------------------------------------------------------------------------------------------------ /// diff --git a/ApplicationCode/ProjectDataModel/RimView.cpp b/ApplicationCode/ProjectDataModel/RimView.cpp index 6db59b25f5..46d7c2082d 100644 --- a/ApplicationCode/ProjectDataModel/RimView.cpp +++ b/ApplicationCode/ProjectDataModel/RimView.cpp @@ -55,9 +55,7 @@ void caf::AppEnum< RimView::SurfaceModeType >::setUp() } // End namespace caf -#include "cafPdmAbstractClassSourceInit.h" - -CAF_PDM_ABSTRACT_SOURCE_INIT(RimView, "GenericView"); // Do not use. Abstract class +CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimView, "GenericView"); // Do not use. Abstract class //-------------------------------------------------------------------------------------------------- /// diff --git a/ApplicationCode/ProjectDataModel/cafPdmAbstractClassSourceInit.h b/ApplicationCode/ProjectDataModel/cafPdmAbstractClassSourceInit.h deleted file mode 100644 index 06e1e84314..0000000000 --- a/ApplicationCode/ProjectDataModel/cafPdmAbstractClassSourceInit.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - - -#define CAF_PDM_ABSTRACT_SOURCE_INIT(ClassName, keyword) \ - bool ClassName::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() { return false; } \ - QString ClassName::classKeywordStatic() { assert(PdmXmlObjectHandle::isValidXmlElementName(keyword)); return keyword; }