Commit bc028b72 authored by Lynn Garren's avatar Lynn Garren
Browse files

backwards compatibility code

wrap in #ifdef ENABLE_BACKWARDS_COMPATIBILITY
configure.in defines ENABLE_BACKWARDS_COMPATIBILITY
parent cc8f7ed8
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
......@@ -56,6 +56,42 @@ AC_SUBST(Evaluator_LDFLAGS)
AH_TOP([#ifndef EVALUATOR_DEFS_H
#define EVALUATOR_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([#endif // EVALUATOR_DEFS_H])
......
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
......@@ -57,6 +57,42 @@ AC_SUBST(GenericFunctions_LDFLAGS)
AH_TOP([#ifndef GENERICFUNCTIONS_DEFS_H
#define GENERICFUNCTIONS_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([#endif // GENERICFUNCTIONS_DEFS_H])
......
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
// -*- C++ -*-
// $Id: BasicVector3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: BasicVector3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -12,6 +12,8 @@
#ifndef BASIC_VECTOR3D_H
#define BASIC_VECTOR3D_H
#include "CLHEP/Geometry/defs.h"
namespace HepGeom {
/**
* Base class for Point3D<T>, Vector3D<T> and Normal3D<T>.
......@@ -549,4 +551,9 @@ namespace HepGeom {
}
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
using namespace HepGeom;
#endif
#endif /* BASIC_VECTOR3D_H */
// -*- C++ -*-
// $Id: Normal3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: Normal3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -15,6 +15,7 @@
#define HEP_NORMAL3D_H
#include <iosfwd>
#include "CLHEP/Geometry/defs.h"
#include "CLHEP/Vector/ThreeVector.h"
#include "CLHEP/Geometry/BasicVector3D.h"
......@@ -181,6 +182,9 @@ namespace HepGeom {
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
typedef HepGeom::Normal3D<double> HepNormal3D;
#endif
#endif /* HEP_NORMAL3D_H */
// -*- C++ -*-
// $Id: Plane3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: Plane3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -13,6 +13,7 @@
#define HEP_PLANE3D_H
#include <iosfwd>
#include "CLHEP/Geometry/defs.h"
#include "CLHEP/Geometry/Point3D.h"
#include "CLHEP/Geometry/Normal3D.h"
#include "CLHEP/Geometry/Transform3D.h"
......@@ -153,6 +154,9 @@ namespace HepGeom {
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
typedef HepGeom::Plane3D<double> HepPlane3D;
#endif
#endif /* HEP_PLANE3D_H */
// -*- C++ -*-
// $Id: Point3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: Point3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -15,6 +15,7 @@
#define HEP_POINT3D_H
#include <iosfwd>
#include "CLHEP/Geometry/defs.h"
#include "CLHEP/Vector/ThreeVector.h"
#include "CLHEP/Geometry/BasicVector3D.h"
......@@ -223,6 +224,9 @@ namespace HepGeom {
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
typedef HepGeom::Point3D<double> HepPoint3D;
#endif
#endif /* HEP_POINT3D_H */
// -*- C++ -*-
// $Id: Transform3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: Transform3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -120,6 +120,7 @@
#ifndef HEP_TRANSFROM3D_H
#define HEP_TRANSFROM3D_H
#include "CLHEP/Geometry/defs.h"
#include "CLHEP/Vector/ThreeVector.h"
namespace HepGeom {
......@@ -808,6 +809,8 @@ namespace HepGeom {
};
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
typedef HepGeom::Transform3D HepTransform3D;
typedef HepGeom::Rotate3D HepRotate3D;
typedef HepGeom::RotateX3D HepRotateX3D;
......@@ -825,6 +828,7 @@ typedef HepGeom::Scale3D HepScale3D;
typedef HepGeom::ScaleX3D HepScaleX3D;
typedef HepGeom::ScaleY3D HepScaleY3D;
typedef HepGeom::ScaleZ3D HepScaleZ3D;
#endif
#include "CLHEP/Geometry/Transform3D.icc"
......
// -*- C++ -*-
// $Id: Vector3D.h,v 1.2 2003/07/17 09:05:28 garren Exp $
// $Id: Vector3D.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
......@@ -15,6 +15,7 @@
#define HEP_VECTOR3D_H
#include <iosfwd>
#include "CLHEP/Geometry/defs.h"
#include "CLHEP/Vector/ThreeVector.h"
#include "CLHEP/Geometry/BasicVector3D.h"
......@@ -181,6 +182,9 @@ namespace HepGeom {
} /* namespace HepGeom */
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
typedef HepGeom::Vector3D<double> HepVector3D;
#endif
#endif /* HEP_VECTOR3D_H */
......@@ -87,6 +87,12 @@ AH_VERBATIM([VERSION],[/* Version number of package */
#undef VERSION
#endif])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([#endif // GEOMETRY_DEFS_H])
......
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
......@@ -89,8 +89,13 @@ AH_VERBATIM([VERSION],[/* Version number of package */
#undef VERSION
#endif])
AH_BOTTOM([
/* use correct std::ios_base or std::ios (old) */
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([/* use correct std::ios_base or std::ios (old) */
#ifdef HAVE_IOS_BASE
#define HepIOS std::ios_base
#define HepIOSOpenMode std::ios_base::openmode
......
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
......@@ -57,8 +57,8 @@ AC_SUBST(HepPDT_LDFLAGS)
# Supply boilerplate for HepPDT/defs.h source header:
# ----------------------------------------------------------------------
AH_TOP([#ifndef VECTOR_DEFS_H
#define VECTOR_DEFS_H])
AH_TOP([#ifndef HEPPDT_DEFS_H
#define HEPPDT_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
......@@ -90,7 +90,24 @@ AH_VERBATIM([VERSION],[/* Version number of package */
#undef VERSION
#endif])
AH_BOTTOM([#endif // VECTOR_DEFS_H])
## backwards compatibility
AH_VERBATIM([ENABLE_BACKWARDS_COMPATIBILITY],[/* backwards compatibility will be enabled ONLY in CLHEP 1.9 */
#ifndef ENABLE_BACKWARDS_COMPATIBILITY
#define ENABLE_BACKWARDS_COMPATIBILITY
#endif])
AH_BOTTOM([/* use correct std::ios_base or std::ios (old) */
#ifdef HAVE_IOS_BASE
#define HepIOS std::ios_base
#define HepIOSOpenMode std::ios_base::openmode
#define HepIOSBadBit std::ios_base::badbit
#else
#define HepIOS std::ios
#define HepIOSOpenMode std::ios::open_mode
#define HepIOSBadBit std::ios::badbit
#endif
#endif // HEPPDT_DEFS_H])
# ----------------------------------------------------------------------
......@@ -199,6 +216,15 @@ AC_CHECK_HEADERS([sstream])
# Check for needed typedefs, structures, and compiler characteristics:
# ----------------------------------------------------------------------
AC_CHECK_TYPES([ptrdiff_t])
AC_MSG_CHECKING([for ios_base])
iosbase=no
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <fstream>
std::ios_base::openmode mode;]])],
[AC_DEFINE([HAVE_IOS_BASE], [], [have std::ios_base]) iosbase=yes] )
AC_MSG_RESULT([$iosbase])
# ----------------------------------------------------------------------
# Check for needed library functions:
......
......@@ -2,3 +2,4 @@ Makefile.in
configure
aclocal.m4
autom4te.cache
config.h.in
// -*- C++ -*-
// CLASSDOC OFF
// $Id: DiagMatrix.h,v 1.2 2003/07/18 05:31:48 garren Exp $
// $Id: DiagMatrix.h,v 1.3 2003/10/23 21:29:50 garren Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -51,6 +51,7 @@
#pragma interface
#endif
#include "CLHEP/Matrix/defs.h"
#include "CLHEP/Matrix/GenMatrix.h"
namespace CLHEP {
......@@ -255,6 +256,11 @@ HepDiagMatrix dsum(const HepDiagMatrix &s1, const HepDiagMatrix &s2);
} // namespace CLHEP
#ifdef ENABLE_BACKWARDS_COMPATIBILITY
// backwards compatibility will be enabled ONLY in CLHEP 1.9
using namespace CLHEP;
#endif
#ifndef HEP_DEBUG_INLINE
#include "CLHEP/Matrix/DiagMatrix.icc"
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment