0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BinMNaming / BinMNaming_NamedShapeDriver.hxx
CommitLineData
42cf5bc1 1// Created on: 2004-04-08
2// Created by: Sergey ZARITCHNY <szy@opencascade.com>
3// Copyright (c) 2004-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _BinMNaming_NamedShapeDriver_HeaderFile
17#define _BinMNaming_NamedShapeDriver_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
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>
83ae3591 30class Message_Messenger;
42cf5bc1 31class TDF_Attribute;
32class BinObjMgt_Persistent;
33class BinTools_LocationSet;
34
35
36class BinMNaming_NamedShapeDriver;
37DEFINE_STANDARD_HANDLE(BinMNaming_NamedShapeDriver, BinMDF_ADriver)
38
39//! NamedShape Attribute Driver.
40class BinMNaming_NamedShapeDriver : public BinMDF_ADriver
41{
42
43public:
44
45
83ae3591 46 Standard_EXPORT BinMNaming_NamedShapeDriver(const Handle(Message_Messenger)& theMessageDriver);
42cf5bc1 47
79104795 48 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
42cf5bc1 49
79104795 50 Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
42cf5bc1 51
79104795 52 Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
42cf5bc1 53
54 //! Input the shapes from Bin Document file
6d8f9f4a 55 Standard_EXPORT void ReadShapeSection (Standard_IStream& theIS,
56 const Handle(Message_ProgressIndicator)& theProgress = NULL);
42cf5bc1 57
58 //! Output the shapes into Bin Document file
6d8f9f4a 59 Standard_EXPORT void WriteShapeSection (Standard_OStream& theOS,
60 const Handle(Message_ProgressIndicator)& theProgress = NULL);
42cf5bc1 61
62 //! Clear myShapeSet
63 Standard_EXPORT void Clear();
f1fb0901 64
65 //! Return true if shape should be stored with triangles.
66 Standard_Boolean IsWithTriangles() const { return myShapeSet.IsWithTriangles(); }
67
42cf5bc1 68 //! set whether to store triangulation
f1fb0901 69 void SetWithTriangles (const Standard_Boolean isWithTriangles);
42cf5bc1 70
71 //! set the format of topology
72 //! First : does not write CurveOnSurface UV Points into the file
73 //! on reading calls Check() method.
74 //! Second: stores CurveOnSurface UV Points.
75 void SetFormatNb (const Standard_Integer theFormat);
76
77 //! get the format of topology
78 Standard_Integer GetFormatNb() const;
79
80 //! get the format of topology
81 BinTools_LocationSet& GetShapesLocations();
82
83
84
85
92efcf78 86 DEFINE_STANDARD_RTTIEXT(BinMNaming_NamedShapeDriver,BinMDF_ADriver)
42cf5bc1 87
88protected:
89
90
91
92
93private:
94
95
96 BinTools_ShapeSet myShapeSet;
97 Standard_Integer myFormatNb;
98
99
100};
101
102
103#include <BinMNaming_NamedShapeDriver.lxx>
104
105
106
107
108
109#endif // _BinMNaming_NamedShapeDriver_HeaderFile