aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-10-07 20:18:46 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-10-07 20:18:46 +0000
commit8a5de99cbfe223c1564f95b7d900bc7abd8eeb07 (patch)
treee3abc8a254b39f495861920ed30de983e1610ea1 /src
parentf6b73eb2bba737fd76c0b8b576e02b518befa6c7 (diff)
This change fixes problems with some compilers recognizing only <vector>,
and others recognizing only <vector.h>; change from #include <vector.h> to #include "stl_vector.hh" (this now after includeing "cctk.h"), where "stl_vector.hh" is a new header file that looks at the symbols HAVE_VECTOR and HAVE_VECTOR_H (defined by Cactus at configuration time) to see what to #include and whether or not to use an explicit using declaration to bring vector into the global namespace git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@809 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r--src/driver/Newton.cc3
-rw-r--r--src/driver/find_horizons.cc3
-rw-r--r--src/driver/initial_guess.cc3
-rw-r--r--src/driver/io.cc3
-rw-r--r--src/driver/setup.cc3
-rw-r--r--src/driver/state.cc3
-rw-r--r--src/elliptic/Jacobian.cc3
-rw-r--r--src/gr/Schwarzschild_EF.cc3
-rw-r--r--src/gr/horizon_Jacobian.cc3
-rw-r--r--src/gr/horizon_function.cc3
-rw-r--r--src/include/README6
-rw-r--r--src/include/stl_vector.hh22
-rw-r--r--src/patch/patch_system.cc3
-rw-r--r--src/patch/test_patch_system.cc3
14 files changed, 52 insertions, 12 deletions
diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc
index 3402526..aa31876 100644
--- a/src/driver/Newton.cc
+++ b/src/driver/Newton.cc
@@ -7,12 +7,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/find_horizons.cc b/src/driver/find_horizons.cc
index 055461c..8fd8f29 100644
--- a/src/driver/find_horizons.cc
+++ b/src/driver/find_horizons.cc
@@ -12,13 +12,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/initial_guess.cc b/src/driver/initial_guess.cc
index a7a563b..f8d8369 100644
--- a/src/driver/initial_guess.cc
+++ b/src/driver/initial_guess.cc
@@ -12,13 +12,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/io.cc b/src/driver/io.cc
index 3f465ff..052c8e2 100644
--- a/src/driver/io.cc
+++ b/src/driver/io.cc
@@ -13,13 +13,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/setup.cc b/src/driver/setup.cc
index 89683b5..20ba7c6 100644
--- a/src/driver/setup.cc
+++ b/src/driver/setup.cc
@@ -16,13 +16,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/driver/state.cc b/src/driver/state.cc
index 3d89a2e..20b5e0c 100644
--- a/src/driver/state.cc
+++ b/src/driver/state.cc
@@ -4,13 +4,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/elliptic/Jacobian.cc b/src/elliptic/Jacobian.cc
index 2698c16..c883143 100644
--- a/src/elliptic/Jacobian.cc
+++ b/src/elliptic/Jacobian.cc
@@ -21,12 +21,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/Schwarzschild_EF.cc b/src/gr/Schwarzschild_EF.cc
index ad7294d..5f405cd 100644
--- a/src/gr/Schwarzschild_EF.cc
+++ b/src/gr/Schwarzschild_EF.cc
@@ -13,12 +13,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/horizon_Jacobian.cc b/src/gr/horizon_Jacobian.cc
index d995664..2d4e8e3 100644
--- a/src/gr/horizon_Jacobian.cc
+++ b/src/gr/horizon_Jacobian.cc
@@ -15,12 +15,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/gr/horizon_function.cc b/src/gr/horizon_function.cc
index b583ac1..bc49a1b 100644
--- a/src/gr/horizon_function.cc
+++ b/src/gr/horizon_function.cc
@@ -14,12 +14,13 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/include/README b/src/include/README
index 8858d92..84f80ed 100644
--- a/src/include/README
+++ b/src/include/README
@@ -13,3 +13,9 @@ config.hh
defines compile-time configuration for this thorn, eg the "fp"
typedef (= CCTK_REAL), the choice of 2nd vs 4th order finite
differencing, etc etc
+
+stl_vector.hh
+ This defines the STL vector class in the global namespace,
+ by #including the appropriate system header (either <vector.h>
+ or <vector> as appropriate for this platform), and possibly using
+ an explicit using declaration.
diff --git a/src/include/stl_vector.hh b/src/include/stl_vector.hh
new file mode 100644
index 0000000..9e4d817
--- /dev/null
+++ b/src/include/stl_vector.hh
@@ -0,0 +1,22 @@
+// stl_vector.hh -- define STL vector class in global namespace.
+// $Header$
+
+//
+// prerequisites:
+// "cctk.h"
+//
+
+//
+// This header file defines the STL vector class in the global namespace.
+// It makes use of Cactus's configuration-time probing of what header
+// files are available.
+//
+
+#if defined(HAVE_VECTOR)
+ #include <vector>
+ using std::vector;
+#elif defined(HAVE_VECTOR_H)
+ #include <vector.h>
+#else
+ #error "Cactus couldn't find the STL vector class!"
+#endif
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index b526c32..238ba6b 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -47,12 +47,13 @@
#include <stdio.h>
#include <math.h>
#include <string.h>
-#include <vector.h>
#include <assert.h>
#include <limits.h>
#include "cctk.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"
diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc
index 6056d1b..863f780 100644
--- a/src/patch/test_patch_system.cc
+++ b/src/patch/test_patch_system.cc
@@ -29,13 +29,14 @@
#include <stdio.h>
#include <assert.h>
#include <math.h>
-#include <vector.h>
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
+#include "stl_vector.hh"
+
#include "config.h"
#include "stdc.h"
#include "../jtutil/util.hh"