#include <Standard_Stream.hxx>
-#include <strstream>
+#include <sstream>
#include "GEOM_Client.hxx"
#include <SALOMEconfig.h>
int sizebuf = SeqFile->length();
char* buf;
buf = (char*) &SeqFile[0];
- std::istrstream streamBrep(buf,sizebuf);
+ std::istringstream streamBrep(buf);
BRep_Builder aBuilder;
BRepTools::Read(S, streamBrep, aBuilder);
return(S);
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Gen)
#
+#ifdef HAVE_FINITE
+#undef HAVE_FINITE // E.A. fix a warning about redefinition of HAVE_FINITE in re-inclusion of Standard_values.h
+#endif
#ifndef _TColStd_SequenceOfAsciiString_HeaderFile
#include <TColStd_SequenceOfAsciiString.hxx>
#endif
#include "GEOM_Object_i.hh"
#include <set>
-#include <strstream>
-//#include <sstream>
+#include <sstream>
#include "Utils_CorbaException.hxx"
#include "OpUtil.hxx"
// Retrieve a TopoDS_Shape from byte stream
TopoDS_Shape aTopology;
- std::istrstream aStreamedBrep((char*) &theStream[0], theStream.length());
+ std::istringstream aStreamedBrep((char*) &theStream[0]);
BRep_Builder aBuilder;
try {
BRepTools::Read(aTopology, aStreamedBrep, aBuilder);
#include "utilities.h"
#include <fstream>
-#include <strstream>
-//#include <sstream>
+#include <sstream>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
if(aShape.IsNull()) return NULL;
- std::ostrstream streamShape;
+ std::ostringstream streamShape;
//Write TopoDS_Shape in ASCII format to the stream
BRepTools::Write(aShape, streamShape);
//Returns the number of bytes that have been stored in the stream's buffer.
- int size = streamShape.pcount();
+ int size = streamShape.str().size();
char* buf = new char [size];
//Get pointer on internal character array in ostrstream
- char* valueOfStream = streamShape.str();
+ const char* valueOfStream = streamShape.str().c_str();
//Create copy of ostrstream content
memcpy(buf, valueOfStream, size);
- //Allow automatic deletion of ostrstream content
- streamShape.rdbuf()->freeze(0);
CORBA::Octet* OctetBuf = (CORBA::Octet*)buf;
SALOMEDS::TMPFile_var SeqFile = new SALOMEDS::TMPFile(size,size,OctetBuf,1);