File indexing completed on 2026-07-24 09:15:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BinTools_HeaderFile
0017 #define _BinTools_HeaderFile
0018
0019 #include <BinTools_FormatVersion.hxx>
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Real.hxx>
0025 #include <Message_ProgressRange.hxx>
0026
0027 class TopoDS_Shape;
0028
0029
0030 class BinTools
0031 {
0032 public:
0033 DEFINE_STANDARD_ALLOC
0034
0035 Standard_EXPORT static Standard_OStream& PutReal(Standard_OStream& OS,
0036 const Standard_Real& theValue);
0037
0038 Standard_EXPORT static Standard_OStream& PutShortReal(Standard_OStream& OS,
0039 const Standard_ShortReal& theValue);
0040
0041 Standard_EXPORT static Standard_OStream& PutInteger(Standard_OStream& OS,
0042 const Standard_Integer theValue);
0043
0044 Standard_EXPORT static Standard_OStream& PutBool(Standard_OStream& OS,
0045 const Standard_Boolean theValue);
0046
0047 Standard_EXPORT static Standard_OStream& PutExtChar(Standard_OStream& OS,
0048 const Standard_ExtCharacter theValue);
0049
0050 Standard_EXPORT static Standard_IStream& GetReal(Standard_IStream& IS, Standard_Real& theValue);
0051
0052 Standard_EXPORT static Standard_IStream& GetShortReal(Standard_IStream& IS,
0053 Standard_ShortReal& theValue);
0054
0055 Standard_EXPORT static Standard_IStream& GetInteger(Standard_IStream& IS,
0056 Standard_Integer& theValue);
0057
0058 Standard_EXPORT static Standard_IStream& GetBool(Standard_IStream& IS,
0059 Standard_Boolean& theValue);
0060
0061 Standard_EXPORT static Standard_IStream& GetExtChar(Standard_IStream& IS,
0062 Standard_ExtCharacter& theValue);
0063
0064
0065
0066
0067
0068
0069 static void Write(const TopoDS_Shape& theShape,
0070 Standard_OStream& theStream,
0071 const Message_ProgressRange& theRange = Message_ProgressRange())
0072 {
0073 Write(theShape,
0074 theStream,
0075 Standard_True,
0076 Standard_False,
0077 BinTools_FormatVersion_CURRENT,
0078 theRange);
0079 }
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092 Standard_EXPORT static void Write(
0093 const TopoDS_Shape& theShape,
0094 Standard_OStream& theStream,
0095 const Standard_Boolean theWithTriangles,
0096 const Standard_Boolean theWithNormals,
0097 const BinTools_FormatVersion theVersion,
0098 const Message_ProgressRange& theRange = Message_ProgressRange());
0099
0100
0101 Standard_EXPORT static void Read(TopoDS_Shape& theShape,
0102 Standard_IStream& theStream,
0103 const Message_ProgressRange& theRange = Message_ProgressRange());
0104
0105
0106
0107
0108
0109 static Standard_Boolean Write(const TopoDS_Shape& theShape,
0110 const Standard_CString theFile,
0111 const Message_ProgressRange& theRange = Message_ProgressRange())
0112 {
0113 return Write(theShape,
0114 theFile,
0115 Standard_True,
0116 Standard_False,
0117 BinTools_FormatVersion_CURRENT,
0118 theRange);
0119 }
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132 Standard_EXPORT static Standard_Boolean Write(
0133 const TopoDS_Shape& theShape,
0134 const Standard_CString theFile,
0135 const Standard_Boolean theWithTriangles,
0136 const Standard_Boolean theWithNormals,
0137 const BinTools_FormatVersion theVersion,
0138 const Message_ProgressRange& theRange = Message_ProgressRange());
0139
0140
0141 Standard_EXPORT static Standard_Boolean Read(
0142 TopoDS_Shape& theShape,
0143 const Standard_CString theFile,
0144 const Message_ProgressRange& theRange = Message_ProgressRange());
0145 };
0146
0147 #endif