00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_liboctave_sstream_h)
00024 #define octave_liboctave_sstream_h 1
00025
00026 #if defined (__GNUG__) && __GNUC__ < 3
00027 #undef HAVE_SSTREAM
00028 #endif
00029
00030 #ifdef HAVE_SSTREAM
00031
00032 #include <sstream>
00033
00034 #define STRINGSTREAMBUF std::stringbuf
00035
00036 #define ISSTREAM std::istringstream
00037
00038 #define OSSTREAM std::ostringstream
00039 #define OSSTREAM_STR(os) (os).str ()
00040
00041
00042 #define OSSTREAM_C_STR(os) (os).str () . c_str ()
00043 #define OSSTREAM_ENDS ""
00044 #define OSSTREAM_FREEZE(os) do { } while (0)
00045
00046 #else
00047
00048 #include <strstream>
00049
00050 #define STRINGSTREAMBUF std::strstreambuf
00051
00052 #define ISSTREAM std::istrstream
00053
00054 #define OSSTREAM std::ostrstream
00055 #define OSSTREAM_STR(os) std::string ((os).str ())
00056 #define OSSTREAM_C_STR(os) (os).str ()
00057 #define OSSTREAM_ENDS std::ends
00058 #define OSSTREAM_FREEZE(os) do { (os).freeze (false); } while (0)
00059
00060 #endif
00061
00062 #endif
00063
00064
00065
00066
00067
00068