(#496) Use system macro for init of abstract PDM classes

Removed project specific macro
This commit is contained in:
Magne Sjaastad 2015-09-25 15:09:19 +02:00
parent 7b802187d0
commit 1933bbeb84
4 changed files with 3 additions and 15 deletions

View File

@ -20,14 +20,12 @@
#include "RimCase.h"
#include "cafPdmObjectFactory.h"
#include "cafPdmAbstractClassSourceInit.h"
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include <QDebug>
CAF_PDM_ABSTRACT_SOURCE_INIT(RimCase, "RimCase");
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimCase, "RimCase");
//--------------------------------------------------------------------------------------------------

View File

@ -44,9 +44,7 @@
#include <QDebug>
#include "cafPdmAbstractClassSourceInit.h"
CAF_PDM_ABSTRACT_SOURCE_INIT(RimEclipseCase, "RimReservoir");
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimEclipseCase, "RimReservoir");
//------------------------------------------------------------------------------------------------
///

View File

@ -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
//--------------------------------------------------------------------------------------------------
///

View File

@ -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; }