1 // Created on: 2004-04-08
2 // Created by: Sergey ZARITCHNY <szy@opencascade.com>
3 // Copyright (c) 2004-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BinMNaming_NamedShapeDriver_HeaderFile
17 #define _BinMNaming_NamedShapeDriver_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <BinTools_ShapeSet.hxx>
23 #include <Standard_Integer.hxx>
24 #include <BinMDF_ADriver.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <BinObjMgt_RRelocationTable.hxx>
27 #include <BinObjMgt_SRelocationTable.hxx>
28 #include <Standard_IStream.hxx>
29 #include <Standard_OStream.hxx>
30 class CDM_MessageDriver;
32 class BinObjMgt_Persistent;
33 class BinTools_LocationSet;
36 class BinMNaming_NamedShapeDriver;
37 DEFINE_STANDARD_HANDLE(BinMNaming_NamedShapeDriver, BinMDF_ADriver)
39 //! NamedShape Attribute Driver.
40 class BinMNaming_NamedShapeDriver : public BinMDF_ADriver
46 Standard_EXPORT BinMNaming_NamedShapeDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
48 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
50 Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const;
52 Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const;
54 //! Input the shapes from Bin Document file
55 Standard_EXPORT void ReadShapeSection (Standard_IStream& theIS);
57 //! Output the shapes into Bin Document file
58 Standard_EXPORT void WriteShapeSection (Standard_OStream& theOS);
61 Standard_EXPORT void Clear();
63 //! set whether to store triangulation
64 void SetWithTriangles (const Standard_Boolean isWithTriangles);
66 //! set the format of topology
67 //! First : does not write CurveOnSurface UV Points into the file
68 //! on reading calls Check() method.
69 //! Second: stores CurveOnSurface UV Points.
70 void SetFormatNb (const Standard_Integer theFormat);
72 //! get the format of topology
73 Standard_Integer GetFormatNb() const;
75 //! get the format of topology
76 BinTools_LocationSet& GetShapesLocations();
81 DEFINE_STANDARD_RTTI(BinMNaming_NamedShapeDriver,BinMDF_ADriver)
91 BinTools_ShapeSet myShapeSet;
92 Standard_Integer myFormatNb;
98 #include <BinMNaming_NamedShapeDriver.lxx>
104 #endif // _BinMNaming_NamedShapeDriver_HeaderFile