fei_sstream.hpp

00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _fei_sstream_hpp_
00010 #define _fei_sstream_hpp_
00011 
00012 #include "fei_macros.hpp"
00013 
00014 //
00015 //The stuff in this file somewhat protects us from the fact that some
00016 //platforms may not put stream-related stuff in the std namespace,
00017 //even though most do.
00018 //These days (2007) perhaps all platforms do put everything in std and
00019 //perhaps no platforms still have iostream.h without having <iostream>, etc.
00020 //But historically we've had to account for these possibilities and I see
00021 //little to be gained from removing this flexibility at this point.
00022 //
00023 //The basic mechanism here is to use macros that are defined differently
00024 //for certain situations. An alternative approach would be to import
00025 //symbols into our namespace, but we choose not to do that since it is
00026 //a well-known sin to perform namespace pollution from within a header.
00027 //
00028 
00029 #ifdef FEI_HAVE_SSTREAM
00030 #include <sstream>
00031 #define FEI_ISTRINGSTREAM std::istringstream
00032 #define FEI_OSTRINGSTREAM std::ostringstream
00033 #elif defined(FEI_HAVE_SSTREAM_H)
00034 #include <sstream.h>
00035 #define FEI_ISTRINGSTREAM istringstream
00036 #define FEI_OSTRINGSTREAM ostringstream
00037 #else
00038 #error "must have <sstream> or <sstream.h>"
00039 #endif
00040 
00041 
00042 #endif
00043 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:24 2011 for FEI by  doxygen 1.6.3