#ifndef SSTREAM_INCLUDED #define SSTREAM_INCLUDED // ---------------------------------------------------------------------- // // sstream // // History: // 28-Oct-1997 WEB Initial draft, adapted from code in "Simultaneous // Support for KAI C++ and GNU C++ in Source Code" by Rob Kennedy, // revised 23-Sep-1997 // 29-Oct-1997 WEB Included fix for GNU C++ bug // 04-Nov-1997 WEB Renamed; removed using statements; included // additional code guards; indented // 13-Nov-1997 WEB Renamed // 14-Feb-2000 WEB Incorporated ISOcxx compatibility // 19-Mar-2003 MSF Conditionalized the replacement inclusion on // CLHEP's replacement NOT being in // ---------------------------------------------------------------------- // --- ISOcxx compatibility: #if defined ISOCXX__ISOCXX #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif // ZMENVIRONMENT_H #include // --- original code: #else // ! defined ISOCXX__ISOCXX #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif // ZMENVIRONMENT_H #ifdef ZM_STD_sstream #ifndef IOSFWD_INCLUDED #define IOSFWD_INCLUDED #include // declare classes #endif // IOSFWD_INCLUDED #include #elif defined(__GNUG__)||defined(DEFECT_SSTREAM) // only GNU C++ seems to have this flaw #ifndef HEP_SSTREAM_H // -- if this is defined, then CLHEP/config/sstream // has inserted its own (conflicting) fix! #ifndef STRSTREAM_INCLUDED #define STRSTREAM_INCLUDED #include #endif // STRSTREAM_INCLUDED class ostringstream : public ostrstream { public: string str() { *(this) << '\0'; // ugly trick to eliminate trailing garbage return string( ostrstream::str() ); } }; #endif // HEP_SSTREAM_H #else #define ostringstream ostrstream // trick to allow use of "ostringstream" in source #ifndef STRSTREAM_INCLUDED #define STRSTREAM_INCLUDED #include #endif // STRSTREAM_INCLUDED #endif // ZM_STD_sstream #endif // ISOCXX__ISOCXX // ---------------------------------------------------------------------- #endif // SSTREAM_INCLUDED