Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:15:08

0001 // Created on: 2002-10-29
0002 // Created by: Michael SAZONOV
0003 // Copyright (c) 2002-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BinDrivers_DocumentStorageDriver_HeaderFile
0017 #define _BinDrivers_DocumentStorageDriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_OStream.hxx>
0021 #include <BinLDrivers_DocumentStorageDriver.hxx>
0022 
0023 class BinMDF_ADriverTable;
0024 class Message_Messenger;
0025 class BinLDrivers_DocumentSection;
0026 
0027 //! persistent implementation of storage a document in a binary file
0028 class BinDrivers_DocumentStorageDriver : public BinLDrivers_DocumentStorageDriver
0029 {
0030 
0031 public:
0032   //! Constructor
0033   Standard_EXPORT BinDrivers_DocumentStorageDriver();
0034 
0035   Standard_EXPORT occ::handle<BinMDF_ADriverTable> AttributeDrivers(
0036     const occ::handle<Message_Messenger>& theMsgDriver) override;
0037 
0038   //! implements the procedure of writing a shape section to file
0039   Standard_EXPORT void WriteShapeSection(
0040     BinLDrivers_DocumentSection& theDocSection,
0041     Standard_OStream&            theOS,
0042     const TDocStd_FormatVersion  theDocVer,
0043     const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0044 
0045   //! Return true if shape should be stored with triangles.
0046   Standard_EXPORT bool IsWithTriangles() const;
0047   //! Return true if shape should be stored with triangulation normals.
0048   Standard_EXPORT bool IsWithNormals() const;
0049 
0050   //! Set if triangulation should be stored or not.
0051   Standard_EXPORT void SetWithTriangles(const occ::handle<Message_Messenger>& theMessageDriver,
0052                                         const bool                            theWithTriangulation);
0053   //! Set if triangulation should be stored with normals or not.
0054   Standard_EXPORT void SetWithNormals(const occ::handle<Message_Messenger>& theMessageDriver,
0055                                       const bool                            theWithTriangulation);
0056 
0057   //! Enables writing in the quick part access mode.
0058   Standard_EXPORT void EnableQuickPartWriting(
0059     const occ::handle<Message_Messenger>& theMessageDriver,
0060     const bool                            theValue) override;
0061 
0062   //! Clears the NamedShape driver
0063   Standard_EXPORT void Clear() override;
0064 
0065   DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver, BinLDrivers_DocumentStorageDriver)
0066 };
0067 
0068 #endif // _BinDrivers_DocumentStorageDriver_HeaderFile