#include <STEPControl_ActorWrite.hxx>
#include <STEPControl_Controller.hxx>
#include <StepData_StepModel.hxx>
+#include <StepData_Protocol.hxx>
+#include <StepData_StepWriter.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
#include <Transfer_FinderProcess.hxx>
}
+//=======================================================================
+//function : WriteStream
+//purpose :
+//=======================================================================
+
+IFSelect_ReturnStatus STEPControl_Writer::WriteStream (std::ostream& theOStream)
+{
+
+ Handle_StepData_Protocol stepro = Handle_StepData_Protocol::DownCast(
+ this->Model()->Protocol());
+
+ if (this->Model().IsNull() || this->Model()->Protocol().IsNull())
+ return IFSelect_RetFail;
+
+ StepData_StepWriter SW(this->Model());
+ SW.SendModel( stepro );
+
+ Standard_Boolean isGood = SW.Print( theOStream );
+
+ if( isGood )
+ return IFSelect_RetDone;
+ else
+ return IFSelect_RetFail;
+
+}
+
+
+
+
//=======================================================================
//function : PrintStatsTransfer
//purpose :
//! Writes a STEP model in the file identified by filename.
Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString filename);
-
+
+ //! Writes a STEP model in the std::ostream.
+ Standard_EXPORT IFSelect_ReturnStatus WriteStream ( std::ostream& theOStream );
+
//! Displays the statistics for the
//! last translation. what defines the kind of statistics that are displayed:
//! - 0 gives general statistics (number of translated roots,