diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h index 029b7ce78a4e060d6261fd74c4dc9da8e876fc58..7c1027339fdf5d8ee3d6e08308d114dee7e9354f 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h @@ -7,10 +7,8 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoIntrusivePtr.h" +#include "GeoModelKernel/PersistifierFwd.h" -#ifndef _GeoShapePersistification_On_ - class Persistifier; -#endif class GeoShapeIntersection : public GeoShape { diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeShift.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeShift.h index 1274a5144dfe4cb55e8a41ce25c3e0b09af199b7..ab7fa80b8d55b614c6ac6478f2dad8cce219398b 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeShift.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeShift.h @@ -8,11 +8,7 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoIntrusivePtr.h" #include "GeoModelKernel/GeoDefinitions.h" - - -#ifndef _GeoShapePersistification_On_ - class Persistifier; -#endif +#include "GeoModelKernel/PersistifierFwd.h" class GeoShapeShift : public GeoShape { diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h index 2ab3e08e468fc5ff4461bf762152e6f757a57053..6036e09216f9da85af3d50f31ae9e7b015b2cd37 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h @@ -7,11 +7,7 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoIntrusivePtr.h" - - -#ifndef _GeoShapePersistification_On_ - class Persistifier; -#endif +#include "GeoModelKernel/PersistifierFwd.h" class GeoShapeSubtraction : public GeoShape { diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h index b712b180a3a48e8ccc474b7e267ec3c660ffb9e4..7849753e58a7ce471152cece86b42f512bd53da1 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h @@ -7,10 +7,7 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoIntrusivePtr.h" - -#ifndef _GeoShapePersistification_On_ - class Persistifier; -#endif +#include "GeoModelKernel/PersistifierFwd.h" class GeoShapeUnion : public GeoShape { diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/PersistifierFwd.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/PersistifierFwd.h new file mode 100644 index 0000000000000000000000000000000000000000..025d31cc73991859a9a1f0b5a49d198bb70a4344 --- /dev/null +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/PersistifierFwd.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOMODELKERNEL_PERSISTIFIERFWD_H +#define GEOMODELKERNEL_PERSISTIFIERFWD_H + +// **************************************************************** +// *** PERSISTIFICATION SETTINGS FOR GeoModel BOOLEAN SHAPES ****** +// **************************************************************** +// Note: +// -- The instructions below are needed +// -- to correctly persistify/restore boolean shapes. +// -- They must be declared before including GeoModelKernel files. +// **************************************************************** +// This variable is used by GeoModel boolean shapes to switch ON +// the persistification mode +#define _GeoShapePersistification_On_ +// fwd declaration of namespace::class we want to use to persistify +// the GeoModel boolean shapes +namespace GeoModelIO { +class ReadGeoModel; +} +// the 'Persistifier' class name is used by GeoModel boolean shapes +// to grant access to friend classes +typedef GeoModelIO::ReadGeoModel Persistifier; +// **************************************************************** +// **************************************************************** + +#endif diff --git a/GeoModelIO/GeoModelRead/GeoModelRead/ReadGeoModel.h b/GeoModelIO/GeoModelRead/GeoModelRead/ReadGeoModel.h index 8acf829c2927fde2edaf802bdfc2302ad0dc0bf7..39aaf8051cd7bd2c1040d4689c4101c0d758c40a 100644 --- a/GeoModelIO/GeoModelRead/GeoModelRead/ReadGeoModel.h +++ b/GeoModelIO/GeoModelRead/GeoModelRead/ReadGeoModel.h @@ -31,29 +31,9 @@ #ifndef GeoModelRead_ReadGeoModel_H_ #define GeoModelRead_ReadGeoModel_H_ -// **************************************************************** -// *** PERSISTIFICATION SETTINGS FOR GeoModel BOOLEAN SHAPES ****** -// **************************************************************** -// Note: -// -- The instructions below are needed -// -- to correctly persistify/restore boolean shapes. -// -- They must be declared before including GeoModelKernel files. -// **************************************************************** -// This variable is used by GeoModel boolean shapes to switch ON -// the persistification mode -#define _GeoShapePersistification_On_ -// fwd declaration of namespace::class we want to use to persistify -// the GeoModel boolean shapes -namespace GeoModelIO { -class ReadGeoModel; -} -// the 'Persistifier' class name is used by GeoModel boolean shapes -// to grant access to friend classes -typedef GeoModelIO::ReadGeoModel Persistifier; -// **************************************************************** -// **************************************************************** // GeoModel includes +#include "GeoModelKernel/PersistifierFwd.h" #include "GeoModelDBManager/GMDBManager.h" #include "GeoModelDBManager/definitions.h"