aipsdef.h

Go to the documentation of this file.
00001 //# aipsdef.h: Global initialization for special Casacore macros
00002 //# Copyright (C) 2000,2001,2002
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef CASA_AIPSDEF_H
00029 #define CASA_AIPSDEF_H
00030 
00031 #include <casacore/casa/aipstype.h>   //# needed for Bool
00032 
00033 //# Define the Casacore global macros
00034 
00035 //# Defined the "aips_name2" macro which is used to join two tokens.
00036 
00037 #if defined(__STDC__) || defined(__ANSI_CPP__) || defined(__hpux)
00038 #define aips_name2(a,b) a##b
00039 #else
00040 #define aips_name2(a,b) ab
00041 #endif
00042 
00043 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00044 
00045 // If AIPS_DEBUG is not defined, then the symbol expands to (0) which in an
00046 // if should be removed by the dead code eliminator of any optimizer; thus
00047 // using this in your code should have no performance penalty in the normal
00048 // case. If compiled with AIPS_DEBUG, then aips_debug is (defined to )
00049 // a global boolean variable (so it can be turned on and off in a debugger) 
00050 // which is initialized to True.
00051 
00052 extern Bool aips_debug_on;
00053 
00054 } //# NAMESPACE CASACORE - END
00055 
00056 #if !defined(AIPS_DEBUG)
00057 #define aips_debug (0)
00058 #else
00059 // The reason that we just don't make this a variable here is so that
00060 // we can link against libraries compiled with or without AIPS_DEBUG
00061 // without having any missing symbols.
00062 #define aips_debug aips_debug_on
00063 #endif
00064 
00065 // With sgi the AIPS_USE_NEW_SGI switch is always set to cater for
00066 // still existing problems in FFTPack and SquareMatrix. It should be removed
00067 // at some stage.
00068 // Note that for the gcc compiler 'std::' is recognised as '::' for now.
00069 #if defined(__sgi)
00070 #define AIPS_USE_NEW_SGI
00071 #define AIPS_SGI
00072 namespace std {};
00073 #endif
00074 
00075 // HP/UX
00076 #if defined(__hpux__)
00077 #define AIPS_HPUX
00078 #endif
00079 
00080 // The restrict keyword is supported by some compilers only.
00081 #if !defined(AIPS_KAICC) && !defined(AIPS_INTELCC)
00082 #if !defined(restrict)
00083 #define restrict
00084 #endif
00085 #endif
00086 
00087 // SUN Native compiler has trouble with typedef inside class.
00088 // PGI compiler (QK_USER) on Cray XT3 needs throw specification in .cc file.
00089 #if defined(AIPS_SUN_NATIVE)
00090 #define WHATEVER_SUN_TYPEDEF(X) X::
00091 #define WHATEVER_TYPENAME
00092 #define WHATEVER_SUN_EXCEPTSPEC(X) throw(X)
00093 #else
00094 #define WHATEVER_SUN_TYPEDEF(X)
00095 #define WHATEVER_TYPENAME typename
00096 #if defined(AIPS_CRAY_PGI) || defined(AIPS_GCC)
00097 #define WHATEVER_SUN_EXCEPTSPEC(X) throw(X)
00098 #else
00099 #define WHATEVER_SUN_EXCEPTSPEC(X)
00100 #endif
00101 #endif
00102 
00103 #if defined(AIPS_USE_NEW_SGI) || defined(AIPS_GCC) || defined(AIPS_CRAY_PGI)
00104 #if defined(WHATEVER_VECTOR_FORWARD_DEC)
00105 #undef WHATEVER_VECTOR_FORWARD_DEC
00106 #endif
00107 #else
00108 #define WHATEVER_VECTOR_FORWARD_DEC template <class T, class U> class vector
00109 #endif
00110 
00111 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1