Open CASCADE Technology  7.7.0
Static Public Member Functions
BinTools Class Reference

Tool to keep shapes in binary format. More...

#include <BinTools.hxx>

Static Public Member Functions

static Standard_OStreamPutReal (Standard_OStream &OS, const Standard_Real &theValue)
 
static Standard_OStreamPutShortReal (Standard_OStream &OS, const Standard_ShortReal &theValue)
 
static Standard_OStreamPutInteger (Standard_OStream &OS, const Standard_Integer theValue)
 
static Standard_OStreamPutBool (Standard_OStream &OS, const Standard_Boolean theValue)
 
static Standard_OStreamPutExtChar (Standard_OStream &OS, const Standard_ExtCharacter theValue)
 
static Standard_IStreamGetReal (Standard_IStream &IS, Standard_Real &theValue)
 
static Standard_IStreamGetShortReal (Standard_IStream &IS, Standard_ShortReal &theValue)
 
static Standard_IStreamGetInteger (Standard_IStream &IS, Standard_Integer &theValue)
 
static Standard_IStreamGetBool (Standard_IStream &IS, Standard_Boolean &theValue)
 
static Standard_IStreamGetExtChar (Standard_IStream &IS, Standard_ExtCharacter &theValue)
 
static void Write (const TopoDS_Shape &theShape, Standard_OStream &theStream, const Message_ProgressRange &theRange=Message_ProgressRange())
 Writes the shape to the stream in binary format BinTools_FormatVersion_CURRENT. This alias writes shape with triangulation data. More...
 
static void Write (const TopoDS_Shape &theShape, Standard_OStream &theStream, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const BinTools_FormatVersion theVersion, const Message_ProgressRange &theRange=Message_ProgressRange())
 Writes the shape to the stream in binary format of specified version. More...
 
static void Read (TopoDS_Shape &theShape, Standard_IStream &theStream, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads a shape from <theStream> and returns it in <theShape>. More...
 
static Standard_Boolean Write (const TopoDS_Shape &theShape, const Standard_CString theFile, const Message_ProgressRange &theRange=Message_ProgressRange())
 Writes the shape to the file in binary format BinTools_FormatVersion_CURRENT. More...
 
static Standard_Boolean Write (const TopoDS_Shape &theShape, const Standard_CString theFile, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const BinTools_FormatVersion theVersion, const Message_ProgressRange &theRange=Message_ProgressRange())
 Writes the shape to the file in binary format of specified version. More...
 
static Standard_Boolean Read (TopoDS_Shape &theShape, const Standard_CString theFile, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads a shape from <theFile> and returns it in <theShape>. More...
 

Detailed Description

Tool to keep shapes in binary format.

Member Function Documentation

◆ GetBool()

static Standard_IStream& BinTools::GetBool ( Standard_IStream IS,
Standard_Boolean theValue 
)
static

◆ GetExtChar()

static Standard_IStream& BinTools::GetExtChar ( Standard_IStream IS,
Standard_ExtCharacter theValue 
)
static

◆ GetInteger()

static Standard_IStream& BinTools::GetInteger ( Standard_IStream IS,
Standard_Integer theValue 
)
static

◆ GetReal()

static Standard_IStream& BinTools::GetReal ( Standard_IStream IS,
Standard_Real theValue 
)
static

◆ GetShortReal()

static Standard_IStream& BinTools::GetShortReal ( Standard_IStream IS,
Standard_ShortReal theValue 
)
static

◆ PutBool()

static Standard_OStream& BinTools::PutBool ( Standard_OStream OS,
const Standard_Boolean  theValue 
)
static

◆ PutExtChar()

static Standard_OStream& BinTools::PutExtChar ( Standard_OStream OS,
const Standard_ExtCharacter  theValue 
)
static

◆ PutInteger()

static Standard_OStream& BinTools::PutInteger ( Standard_OStream OS,
const Standard_Integer  theValue 
)
static

◆ PutReal()

static Standard_OStream& BinTools::PutReal ( Standard_OStream OS,
const Standard_Real theValue 
)
static

◆ PutShortReal()

static Standard_OStream& BinTools::PutShortReal ( Standard_OStream OS,
const Standard_ShortReal theValue 
)
static

◆ Read() [1/2]

static void BinTools::Read ( TopoDS_Shape theShape,
Standard_IStream theStream,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
static

Reads a shape from <theStream> and returns it in <theShape>.

◆ Read() [2/2]

static Standard_Boolean BinTools::Read ( TopoDS_Shape theShape,
const Standard_CString  theFile,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
static

Reads a shape from <theFile> and returns it in <theShape>.

◆ Write() [1/4]

static void BinTools::Write ( const TopoDS_Shape theShape,
Standard_OStream theStream,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
inlinestatic

Writes the shape to the stream in binary format BinTools_FormatVersion_CURRENT. This alias writes shape with triangulation data.

Parameters
theShape[in] the shape to write
theStream[in][out] the stream to output shape into
theRangethe range of progress indicator to fill in

◆ Write() [2/4]

static void BinTools::Write ( const TopoDS_Shape theShape,
Standard_OStream theStream,
const Standard_Boolean  theWithTriangles,
const Standard_Boolean  theWithNormals,
const BinTools_FormatVersion  theVersion,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
static

Writes the shape to the stream in binary format of specified version.

Parameters
theShape[in] the shape to write
theStream[in][out] the stream to output shape into
theWithTriangles[in] flag which specifies whether to save shape with (TRUE) or without (FALSE) triangles; has no effect on triangulation-only geometry
theWithNormals[in] flag which specifies whether to save triangulation with (TRUE) or without (FALSE) normals; has no effect on triangulation-only geometry
theVersion[in] the BinTools format version
theRangethe range of progress indicator to fill in

◆ Write() [3/4]

static Standard_Boolean BinTools::Write ( const TopoDS_Shape theShape,
const Standard_CString  theFile,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
inlinestatic

Writes the shape to the file in binary format BinTools_FormatVersion_CURRENT.

Parameters
theShape[in] the shape to write
theFile[in] the path to file to output shape into
theRangethe range of progress indicator to fill in

◆ Write() [4/4]

static Standard_Boolean BinTools::Write ( const TopoDS_Shape theShape,
const Standard_CString  theFile,
const Standard_Boolean  theWithTriangles,
const Standard_Boolean  theWithNormals,
const BinTools_FormatVersion  theVersion,
const Message_ProgressRange theRange = Message_ProgressRange() 
)
static

Writes the shape to the file in binary format of specified version.

Parameters
theShape[in] the shape to write
theFile[in] the path to file to output shape into
theWithTriangles[in] flag which specifies whether to save shape with (TRUE) or without (FALSE) triangles; has no effect on triangulation-only geometry
theWithNormals[in] flag which specifies whether to save triangulation with (TRUE) or without (FALSE) normals; has no effect on triangulation-only geometry
theVersion[in] the BinTools format version
theRangethe range of progress indicator to fill in

The documentation for this class was generated from the following file: