FEI Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
base
fei_sstream.hpp
Go to the documentation of this file.
1
/*--------------------------------------------------------------------*/
2
/* Copyright 2005 Sandia Corporation. */
3
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4
/* non-exclusive license for use of this work by or on behalf */
5
/* of the U.S. Government. Export of this program may require */
6
/* a license from the United States Government. */
7
/*--------------------------------------------------------------------*/
8
9
#ifndef _fei_sstream_hpp_
10
#define _fei_sstream_hpp_
11
12
#include "
fei_macros.hpp
"
13
14
//
15
//The stuff in this file somewhat protects us from the fact that some
16
//platforms may not put stream-related stuff in the std namespace,
17
//even though most do.
18
//These days (2007) perhaps all platforms do put everything in std and
19
//perhaps no platforms still have iostream.h without having <iostream>, etc.
20
//But historically we've had to account for these possibilities and I see
21
//little to be gained from removing this flexibility at this point.
22
//
23
//The basic mechanism here is to use macros that are defined differently
24
//for certain situations. An alternative approach would be to import
25
//symbols into our namespace, but we choose not to do that since it is
26
//a well-known sin to perform namespace pollution from within a header.
27
//
28
29
#ifdef FEI_HAVE_SSTREAM
30
#include <sstream>
31
#define FEI_ISTRINGSTREAM std::istringstream
32
#define FEI_OSTRINGSTREAM std::ostringstream
33
#elif defined(FEI_HAVE_SSTREAM_H)
34
#include <sstream.h>
35
#define FEI_ISTRINGSTREAM istringstream
36
#define FEI_OSTRINGSTREAM ostringstream
37
#else
38
#error "must have <sstream> or <sstream.h>"
39
#endif
40
41
42
#endif
43
fei_macros.hpp
Generated by
1.8.5