Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:59

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 
0028 class BinDrivers_DocumentStorageDriver;
0029 DEFINE_STANDARD_HANDLE(BinDrivers_DocumentStorageDriver, BinLDrivers_DocumentStorageDriver)
0030 
0031 //! persistent implementation of storage a document in a binary file
0032 class BinDrivers_DocumentStorageDriver : public BinLDrivers_DocumentStorageDriver
0033 {
0034 
0035 public:
0036 
0037   
0038   //! Constructor
0039   Standard_EXPORT BinDrivers_DocumentStorageDriver();
0040   
0041   Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers
0042     (const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
0043   
0044   //! implements the procedure of writing a shape section to file
0045   Standard_EXPORT virtual void WriteShapeSection
0046     (BinLDrivers_DocumentSection& theDocSection, 
0047      Standard_OStream& theOS, 
0048      const TDocStd_FormatVersion theDocVer,
0049      const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0050 
0051   //! Return true if shape should be stored with triangles.
0052   Standard_EXPORT Standard_Boolean IsWithTriangles() const;
0053   //! Return true if shape should be stored with triangulation normals.
0054   Standard_EXPORT Standard_Boolean IsWithNormals() const;
0055 
0056   //! Set if triangulation should be stored or not.
0057   Standard_EXPORT void SetWithTriangles (const Handle(Message_Messenger)& theMessageDriver,
0058                                          const Standard_Boolean theWithTriangulation);
0059   //! Set if triangulation should be stored with normals or not.
0060   Standard_EXPORT void SetWithNormals(const Handle(Message_Messenger)& theMessageDriver,
0061                                          const Standard_Boolean theWithTriangulation);
0062 
0063   //! Enables writing in the quick part access mode.
0064   Standard_EXPORT void EnableQuickPartWriting(const Handle(Message_Messenger)& theMessageDriver,
0065                                               const Standard_Boolean theValue) Standard_OVERRIDE;
0066 
0067   //! Clears the NamedShape driver
0068   Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
0069 
0070   DEFINE_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver,BinLDrivers_DocumentStorageDriver)
0071 
0072 };
0073 
0074 #endif // _BinDrivers_DocumentStorageDriver_HeaderFile