42cf5bc1 |
1 | // Created on: 1999-06-24 |
2 | // Created by: Sergey ZARITCHNY |
3 | // Copyright (c) 1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _TDF_CopyLabel_HeaderFile |
18 | #define _TDF_CopyLabel_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <TDF_Label.hxx> |
25 | #include <TDF_IDFilter.hxx> |
26 | #include <TDF_AttributeMap.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | class TDF_RelocationTable; |
29 | class TDF_Label; |
30 | class TDF_IDFilter; |
31 | class TDF_DataSet; |
32 | |
33 | |
34 | //! This class gives copy of source label hierarchy |
35 | class TDF_CopyLabel |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | //! Empty constructor |
43 | Standard_EXPORT TDF_CopyLabel(); |
44 | |
45 | //! CopyTool |
46 | Standard_EXPORT TDF_CopyLabel(const TDF_Label& aSource, const TDF_Label& aTarget); |
47 | |
48 | //! Loads src and tgt labels |
49 | Standard_EXPORT void Load (const TDF_Label& aSource, const TDF_Label& aTarget); |
50 | |
51 | //! Sets filter |
52 | Standard_EXPORT void UseFilter (const TDF_IDFilter& aFilter); |
53 | |
54 | //! Check external references and if exist fills the aExternals Map |
55 | Standard_EXPORT static Standard_Boolean ExternalReferences (const TDF_Label& Lab, TDF_AttributeMap& aExternals, const TDF_IDFilter& aFilter); |
56 | |
57 | //! Check external references and if exist fills the aExternals Map |
58 | Standard_EXPORT static void ExternalReferences (const TDF_Label& aRefLab, const TDF_Label& Lab, TDF_AttributeMap& aExternals, const TDF_IDFilter& aFilter, Handle(TDF_DataSet)& aDataSet); |
59 | |
60 | //! performs algorithm of selfcontained copy |
61 | Standard_EXPORT void Perform(); |
62 | |
63 | Standard_Boolean IsDone() const; |
64 | |
65 | //! returns relocation table |
66 | Standard_EXPORT const Handle(TDF_RelocationTable)& RelocationTable() const; |
67 | |
68 | |
69 | |
70 | |
71 | protected: |
72 | |
73 | |
74 | |
75 | |
76 | |
77 | private: |
78 | |
79 | |
80 | |
81 | Handle(TDF_RelocationTable) myRT; |
82 | TDF_Label mySL; |
83 | TDF_Label myTL; |
84 | TDF_IDFilter myFilter; |
85 | TDF_AttributeMap myMapOfExt; |
86 | Standard_Boolean myIsDone; |
87 | |
88 | |
89 | }; |
90 | |
91 | |
92 | #include <TDF_CopyLabel.lxx> |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | #endif // _TDF_CopyLabel_HeaderFile |