Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:00

0001 // Copyright (c) 2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BinObjMgt_Position_HeaderFile
0015 #define _BinObjMgt_Position_HeaderFile
0016 
0017 #include <Standard_Type.hxx>
0018 
0019 class BinObjMgt_Position;
0020 DEFINE_STANDARD_HANDLE (BinObjMgt_Position, Standard_Transient)
0021 
0022 //! Stores and manipulates position in the stream.
0023 class BinObjMgt_Position : public Standard_Transient
0024 {
0025 public:
0026 
0027   DEFINE_STANDARD_ALLOC
0028 
0029   //! Creates position using the current stream position.
0030   Standard_EXPORT BinObjMgt_Position (Standard_OStream& theStream);
0031 
0032   //! Stores the difference between the current position and the stored one.
0033   Standard_EXPORT void StoreSize (Standard_OStream& theStream);
0034   //! Writes stored size at the stored position. Changes the current stream position.
0035 //! If theDummy is true, is writes to the current position zero size.
0036   Standard_EXPORT void WriteSize (Standard_OStream& theStream, const Standard_Boolean theDummy = Standard_False);
0037 
0038   DEFINE_STANDARD_RTTIEXT (BinObjMgt_Position, Standard_Transient)
0039 
0040 private:
0041   std::streampos myPosition;
0042   uint64_t mySize;
0043 };
0044 
0045 #endif // _BinObjMgt_Position_HeaderFile