casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
stdmap.h
Go to the documentation of this file.
00001 //# stdmap.h: Interim solution for standard/nonstandard system map
00002 //# Copyright (C) 2001,2002,2004
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: stdmap.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $
00027 
00028 #ifndef CASA_STDMAP_H
00029 #define CASA_STDMAP_H
00030 
00031 //# Define the C standard C++ include file. 
00032 //# This is an interim solution to cater for the SGI non-existence of
00033 //# them (e.g. <cstring>)
00034 //# Make sure any special macros are set
00035 #include <casa/aips.h>
00036 
00037 #include <map>
00038 
00039 
00040 using std::map;
00041 using std::multimap;
00042 using std::pair;
00043 using std::allocator;
00044 using std::less;
00045 
00046 //# A special macro to create the auxilliary template definitions for
00047 //# various compilers
00048 //# Use if defined a map<T, U> as AIPS_MAP_AUX_TEMPLATES(T, U)
00049 
00050 #if defined(AIPS_MAP_AUX_TEMPLATES)
00051 #undef AIPS_MAP_AUX_TEMPLATES
00052 #endif
00053 
00054 #if !defined(AIPS_AUTO_STL)
00055 # if defined(AIPS_GCC)
00056 #  if defined(AIPS_GCC3) || defined(AIPS_GCC4)
00057 #   define AIPS_MAP_AUX_TEMPLATES(T, U) \
00058 template class \
00059   std::_Rb_tree<T, std::pair<T const, U >, \
00060   std::_Select1st<std::pair<T const, U> >, \
00061   std::less<T>, std::allocator<U > >; \
00062 template class \
00063   std::_Rb_tree<T, std::pair<T const, U >, \
00064   std::_Select1st<std::pair<T const, U> >, \
00065   std::less<T>, std::allocator<pair<T const, U > > >;
00066 #  else
00067 #   define AIPS_MAP_AUX_TEMPLATES(T, U) \
00068 template class \
00069   _Rb_tree<T, pair<T const, U >, \
00070   _Select1st<pair<T const, U> >, \
00071   less<T>, allocator<U > >;
00072 #  endif
00073 # else
00074 #  if defined(AIPS_SUN_NATIVE)
00075 #   define AIPS_MAP_AUX_TEMPLATES(T, U) \
00076 template class \
00077   __rwstd::__rb_tree<T, pair<T const, U >, \
00078   __rwstd::__select1st<pair<T const, U>, T  >, \
00079   std::less<T>, allocator<pair<T const, U> > >; \
00080 template void std::__distance<\
00081   map<T, U>::iterator, uInt> (map<T, U>::iterator, map<T, U>::iterator, uInt&, std::bidirectional_iterator_tag);\
00082 template void std::__distance<\
00083   map<T, U>::const_iterator, uInt> (map<T, U>::const_iterator, map<T, U>::const_iterator, uInt&, std::bidirectional_iterator_tag);
00084 #  else
00085 #   define AIPS_MAP_AUX_TEMPLATES(T, U)
00086 #  endif
00087 # endif
00088 # else
00089 #  define AIPS_MAP_AUX_TEMPLATES(T, U)
00090 #endif
00091 
00092 
00093 #endif