0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / TDF / TDF_ClosureTool.hxx
1 // Created by: DAUTRY Philippe
2 // Copyright (c) 1998-1999 Matra Datavision
3 // Copyright (c) 1999-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 _TDF_ClosureTool_HeaderFile
17 #define _TDF_ClosureTool_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
22
23 #include <TDF_LabelMap.hxx>
24 #include <TDF_AttributeMap.hxx>
25 class TDF_DataSet;
26 class TDF_IDFilter;
27 class TDF_ClosureMode;
28 class TDF_Label;
29
30
31 //! This class provides services to build the closure
32 //! of an information set.
33 //! This class gives services around the transitive
34 //! enclosure of a set of information, starting from a
35 //! list of label.
36 //! You can set closure options by using IDFilter
37 //! (to select or exclude specific attribute IDs) and
38 //! CopyOption objects and by giving to Closure
39 //! method.
40 class TDF_ClosureTool 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   //! Builds the transitive closure of label and
48   //! attribute sets into <aDataSet>.
49   Standard_EXPORT static void Closure (const Handle(TDF_DataSet)& aDataSet);
50   
51   //! Builds the transitive closure of label and
52   //! attribute sets into <aDataSet>. Uses <aFilter> to
53   //! determine if an attribute has to be taken in
54   //! account or not. Uses <aMode> for various way of
55   //! closing.
56   Standard_EXPORT static void Closure (const Handle(TDF_DataSet)& aDataSet, const TDF_IDFilter& aFilter, const TDF_ClosureMode& aMode);
57   
58   //! Builds the transitive closure of <aLabel>.
59   Standard_EXPORT static void Closure (const TDF_Label& aLabel, TDF_LabelMap& aLabMap, TDF_AttributeMap& anAttMap, const TDF_IDFilter& aFilter, const TDF_ClosureMode& aMode);
60
61
62
63
64 protected:
65
66
67
68
69
70 private:
71
72   
73   //! Adds label attributes and dependences.
74   Standard_EXPORT static void LabelAttributes (const TDF_Label& aLabel, TDF_LabelMap& aLabMap, TDF_AttributeMap& anAttMap, const TDF_IDFilter& aFilter, const TDF_ClosureMode& aMode);
75
76
77
78
79 };
80
81
82
83
84
85
86
87 #endif // _TDF_ClosureTool_HeaderFile