aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/defs.hh
diff options
context:
space:
mode:
authorschnetter <>2004-03-01 17:43:00 +0000
committerschnetter <>2004-03-01 17:43:00 +0000
commit174dd6e9d842b69361fb2014c5b7d0e4f16c4430 (patch)
tree06a9ffcf206979155c974620920da5b07d8a83a6 /Carpet/CarpetLib/src/defs.hh
parent634b177e6ff568220f916da7fbad36af783b46b7 (diff)
Remove macros STR and FORTRAN_NAME.
Remove macros STR and FORTRAN_NAME. Make typestring return Cactus type names instead of C++ type names. darcs-hash:20040301174308-07bb3-5c39e39ac39e4e9e552e3f61b843988b09efbf98.gz
Diffstat (limited to 'Carpet/CarpetLib/src/defs.hh')
-rw-r--r--Carpet/CarpetLib/src/defs.hh67
1 files changed, 60 insertions, 7 deletions
diff --git a/Carpet/CarpetLib/src/defs.hh b/Carpet/CarpetLib/src/defs.hh
index 2d324032a..4297ba8c6 100644
--- a/Carpet/CarpetLib/src/defs.hh
+++ b/Carpet/CarpetLib/src/defs.hh
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/defs.hh,v 1.12 2004/01/25 14:57:29 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/defs.hh,v 1.13 2004/03/01 19:43:08 schnetter Exp $
#ifndef DEFS_HH
#define DEFS_HH
@@ -17,13 +17,9 @@
#include <stack>
#include <vector>
-using namespace std;
-
-// Stringification
-#define STR(s) #s
+#include "cctk.h"
-// Fortranification
-#define FORTRAN_NAME(x) x##_
+using namespace std;
// A general type
enum centering { vertex_centered, cell_centered };
@@ -47,6 +43,9 @@ void consume (istream& is, const char c);
// Names for types
+
+#if 0
+
inline const char * typestring (const char& dummy)
{ return "char"; }
@@ -98,6 +97,60 @@ inline const char * typestring (const complex<double>& dummy)
inline const char * typestring (const complex<long double>& dummy)
{ return "complex<long double>"; }
+#else
+
+# ifdef CCTK_INT1
+inline const char * typestring (const CCTK_INT1& dummy)
+{ return "CCTK_INT1"; }
+# endif
+
+# ifdef CCTK_INT2
+inline const char * typestring (const CCTK_INT2& dummy)
+{ return "CCTK_INT2"; }
+# endif
+
+# ifdef CCTK_INT4
+inline const char * typestring (const CCTK_INT4& dummy)
+{ return "CCTK_INT4"; }
+# endif
+
+# ifdef CCTK_INT8
+inline const char * typestring (const CCTK_INT8& dummy)
+{ return "CCTK_INT8"; }
+# endif
+
+# ifdef CCTK_REAL4
+inline const char * typestring (const CCTK_REAL4& dummy)
+{ return "CCTK_REAL4"; }
+# endif
+
+# ifdef CCTK_REAL8
+inline const char * typestring (const CCTK_REAL8& dummy)
+{ return "CCTK_REAL8"; }
+# endif
+
+# ifdef CCTK_REAL16
+inline const char * typestring (const CCTK_REAL16& dummy)
+{ return "CCTK_REAL16"; }
+# endif
+
+# ifdef CCTK_REAL4
+inline const char * typestring (const CCTK_COMPLEX8& dummy)
+{ return "CCTK_COMPLEX8"; }
+# endif
+
+# ifdef CCTK_REAL8
+inline const char * typestring (const CCTK_COMPLEX16& dummy)
+{ return "CCTK_COMPLEX16"; }
+# endif
+
+# ifdef CCTK_REAL16
+inline const char * typestring (const CCTK_COMPLEX32& dummy)
+{ return "CCTK_COMPLEX32"; }
+# endif
+
+#endif
+
// Container input