Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

stringstream.h

Go to the documentation of this file.
00001 // This file is part of dvi2bitmap. 00002 // Copyright 1999--2002, Council for the Central Laboratory of the Research Councils 00003 // 00004 // This program is part of the Starlink Software Distribution: see 00005 // http://www.starlink.ac.uk 00006 // 00007 // dvi2bitmap is free software; you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation; either version 2 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // dvi2bitmap is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with dvi2bitmap; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 // The General Public License is distributed along with this 00022 // program in the file LICENCE. 00023 // 00024 // Author: Norman Gray <norman@astro.gla.ac.uk> 00025 // $Id: stringstream.h,v 1.7 2004/11/04 20:32:28 nxg Exp $ 00026 00027 #ifndef STRINGSTREAM_H_LOADED 00028 #define STRINGSTREAM_H_LOADED 1 00029 00030 #include <config.h> 00031 00032 #ifdef HAVE_SSTREAM 00033 00034 #include <sstream> 00035 #define SSTREAM ostringstream 00036 #define SS_C_STR(s) (s).str().c_str() 00037 #define SS_STRING(s) (s).str() 00038 00039 using STD::ostringstream; 00040 00041 #elif HAVE_STRSTREAM 00042 00043 #include <strstream> 00044 #define SSTREAM ostrstream 00045 #define SS_C_STR(s) (s).str() 00046 /* Add the end-of-string to the stringbuf and convert it to a string */ 00047 #define SS_STRING(s) ((s)<<ends,string((s).str())) 00048 00049 using STD::ostrstream; 00050 using STD::ends; 00051 00052 #else 00053 #error "Neither HAVE_SSTREAM nor HAVE_STRSTREAM is defined!" 00054 #endif 00055 00056 #endif /* STRINGSTREAM_H_LOADED */

Generated on Sun Aug 21 18:21:02 2005 for dvi2bitmap by doxygen 1.3.8