Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

strstream.H

Go to the documentation of this file.
00001 /*
00002  * Copyright 2000, Brown University, Providence, RI.
00003  * 
00004  *                         All Rights Reserved
00005  * 
00006  * Permission to use, copy, modify, and distribute this software and its
00007  * documentation for any purpose other than its incorporation into a
00008  * commercial product is hereby granted without fee, provided that the
00009  * above copyright notice appear in all copies and that both that
00010  * copyright notice and this permission notice appear in supporting
00011  * documentation, and that the name of Brown University not be used in
00012  * advertising or publicity pertaining to distribution of the software
00013  * without specific, written prior permission.
00014  * 
00015  * BROWN UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
00016  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY
00017  * PARTICULAR PURPOSE.  IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE FOR
00018  * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00019  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00020  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00021  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00022  */
00023 // Localize the <strstream.h> weirdness in one place
00024 
00025 #ifndef GLUE_STD_STRSTREAM_H
00026 #define GLUE_STD_STRSTREAM_H
00027 #include <std/config.H>
00028 
00029 #if defined(GLUE_NEW_STYLE_IOSTREAM) && !defined(GLUE_OLD_STYLE_STRSTREAM)
00030 
00031 // start dfk change
00032 #include <strstream>
00033 inline int         str_size(ostrstream &str) { return str.pcount(); }
00034 inline void        buf_freeze(ostrstream &s, bool freeze) {}
00035 inline const char* str_buf(ostrstream &s) { return s.str(); }
00036 // end dfk change
00037 
00038 //#include <sstream>
00039 //#define ostrstream ostringstream
00040 //#define istrstream istringstream
00041 //#define strstream stringstream
00042 //inline int  str_size  (ostrstream &str) { return str.str().size(); }
00043 //inline void buf_freeze(ostrstream &s, bool freeze) {}
00044 //inline const char *str_buf  (ostrstream &s) { return s.str().data(); }
00045 
00046 #else
00047 #ifdef WIN32
00048 #include <strstrea.h>
00049 #else
00050 #include <strstream.h>
00051 #endif
00052 inline int  str_size(ostrstream &str) { return str.pcount(); }
00053 inline void buf_freeze(ostrstream &s, bool freeze) { s.rdbuf()->freeze(freeze);}
00054 inline const char *str_buf  (ostrstream &s) { return s.str(); }
00055 #endif
00056 
00057 #endif

Generated on Mon Sep 15 16:25:57 2003 for gluebase by doxygen1.2.18