File indexing completed on 2025-01-18 10:03:00
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
0031 class BinTools
0032 {
0033 public:
0034
0035 DEFINE_STANDARD_ALLOC
0036
0037 Standard_EXPORT static Standard_OStream& PutReal (Standard_OStream& OS, const Standard_Real& theValue);
0038
0039 Standard_EXPORT static Standard_OStream& PutShortReal (Standard_OStream& OS, const Standard_ShortReal& theValue);
0040
0041 Standard_EXPORT static Standard_OStream& PutInteger (Standard_OStream& OS, const Standard_Integer theValue);
0042
0043 Standard_EXPORT static Standard_OStream& PutBool (Standard_OStream& OS, const Standard_Boolean theValue);
0044
0045 Standard_EXPORT static Standard_OStream& PutExtChar (Standard_OStream& OS, const Standard_ExtCharacter theValue);
0046
0047 Standard_EXPORT static Standard_IStream& GetReal (Standard_IStream& IS, Standard_Real& theValue);
0048
0049 Standard_EXPORT static Standard_IStream& GetShortReal (Standard_IStream& IS, Standard_ShortReal& theValue);
0050
0051 Standard_EXPORT static Standard_IStream& GetInteger (Standard_IStream& IS, Standard_Integer& theValue);
0052
0053 Standard_EXPORT static Standard_IStream& GetBool (Standard_IStream& IS, Standard_Boolean& theValue);
0054
0055 Standard_EXPORT static Standard_IStream& GetExtChar (Standard_IStream& IS, Standard_ExtCharacter& theValue);
0056
0057
0058
0059
0060
0061
0062 static void Write (const TopoDS_Shape& theShape,
0063 Standard_OStream& theStream,
0064 const Message_ProgressRange& theRange = Message_ProgressRange())
0065 {
0066 Write (theShape, theStream, Standard_True, Standard_False,
0067 BinTools_FormatVersion_CURRENT, theRange);
0068 }
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079 Standard_EXPORT static void Write(const TopoDS_Shape& theShape, Standard_OStream& theStream,
0080 const Standard_Boolean theWithTriangles,
0081 const Standard_Boolean theWithNormals,
0082 const BinTools_FormatVersion theVersion,
0083 const Message_ProgressRange& theRange = Message_ProgressRange());
0084
0085
0086 Standard_EXPORT static void Read (TopoDS_Shape& theShape, Standard_IStream& theStream,
0087 const Message_ProgressRange& theRange = Message_ProgressRange());
0088
0089
0090
0091
0092
0093 static Standard_Boolean Write (const TopoDS_Shape& theShape,
0094 const Standard_CString theFile,
0095 const Message_ProgressRange& theRange = Message_ProgressRange())
0096 {
0097 return Write (theShape, theFile, Standard_True, Standard_False,
0098 BinTools_FormatVersion_CURRENT, theRange);
0099 }
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110 Standard_EXPORT static Standard_Boolean Write (const TopoDS_Shape& theShape,
0111 const Standard_CString theFile,
0112 const Standard_Boolean theWithTriangles,
0113 const Standard_Boolean theWithNormals,
0114 const BinTools_FormatVersion theVersion,
0115 const Message_ProgressRange& theRange = Message_ProgressRange());
0116
0117
0118 Standard_EXPORT static Standard_Boolean Read
0119 (TopoDS_Shape& theShape, const Standard_CString theFile,
0120 const Message_ProgressRange& theRange = Message_ProgressRange());
0121
0122 };
0123
0124 #endif