#include <BinTools.hxx>
#include <BinTools_ShapeSet.hxx>
#include <FSD_FileHeader.hxx>
-#include <Message_ProgressIndicator.hxx>
#include <OSD_OpenFile.hxx>
#include <Storage_StreamTypeMismatchError.hxx>
//=======================================================================
void BinTools::Write (const TopoDS_Shape& theShape, Standard_OStream& theStream,
- const Handle(Message_ProgressIndicator)& theProgress)
+ const Message_ProgressRange& theRange)
{
BinTools_ShapeSet aShapeSet(Standard_True);
aShapeSet.SetFormatNb (3);
aShapeSet.Add (theShape);
- aShapeSet.Write (theStream, theProgress);
+ aShapeSet.Write (theStream, theRange);
aShapeSet.Write (theShape, theStream);
}
//=======================================================================
void BinTools::Read (TopoDS_Shape& theShape, Standard_IStream& theStream,
- const Handle(Message_ProgressIndicator)& theProgress)
+ const Message_ProgressRange& theRange)
{
BinTools_ShapeSet aShapeSet(Standard_True);
- aShapeSet.Read (theStream, theProgress);
+ aShapeSet.Read (theStream, theRange);
aShapeSet.Read (theShape, theStream, aShapeSet.NbShapes());
}
//=======================================================================
Standard_Boolean BinTools::Write (const TopoDS_Shape& theShape, const Standard_CString theFile,
- const Handle(Message_ProgressIndicator)& theProgress)
+ const Message_ProgressRange& theRange)
{
std::ofstream aStream;
aStream.precision (15);
if (!aStream.good())
return Standard_False;
- Write (theShape, aStream, theProgress);
+ Write (theShape, aStream, theRange);
aStream.close();
return aStream.good();
}
//=======================================================================
Standard_Boolean BinTools::Read (TopoDS_Shape& theShape, const Standard_CString theFile,
- const Handle(Message_ProgressIndicator)& theProgress)
+ const Message_ProgressRange& theRange)
{
std::filebuf aBuf;
OSD_OpenStream (aBuf, theFile, std::ios::in | std::ios::binary);
return Standard_False;
Standard_IStream aStream (&aBuf);
- Read (theShape, aStream, theProgress);
+ Read (theShape, aStream, theRange);
return aStream.good();
}