Warnings on vc14 were eliminated
[occt.git] / src / TDF / TDF_DataSet.hxx
1 // Created by: DAUTRY Philippe
2 // Copyright (c) 1997-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_DataSet_HeaderFile
17 #define _TDF_DataSet_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <TDF_LabelList.hxx>
23 #include <TDF_LabelMap.hxx>
24 #include <TDF_AttributeMap.hxx>
25 #include <MMgt_TShared.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_OStream.hxx>
28 class TDF_Label;
29 class TDF_Attribute;
30
31
32 class TDF_DataSet;
33 DEFINE_STANDARD_HANDLE(TDF_DataSet, MMgt_TShared)
34
35 //! This class is a set of TDF informations like
36 //! labels and attributes.
37 class TDF_DataSet : public MMgt_TShared
38 {
39
40 public:
41
42   
43   //! Creates an  empty   DataSet  object.
44   Standard_EXPORT TDF_DataSet();
45   
46   //! Clears all information.
47   Standard_EXPORT void Clear();
48   
49   //! Returns true if there is at least one label or one
50   //! attribute.
51     Standard_Boolean IsEmpty() const;
52   
53   //! Adds <aLabel> in  the  current  data  set.
54     void AddLabel (const TDF_Label& aLabel);
55   
56   //! Returns true if the label  <alabel>   is in the data set.
57     Standard_Boolean ContainsLabel (const TDF_Label& aLabel) const;
58   
59   //! Returns the map of labels in this data set.
60   //! This map can be used directly, or updated.
61     TDF_LabelMap& Labels();
62   
63   //! Adds <anAttribute> into the current data  set.
64     void AddAttribute (const Handle(TDF_Attribute)& anAttribute);
65   
66   //! Returns true if <anAttribute> is in the data set.
67     Standard_Boolean ContainsAttribute (const Handle(TDF_Attribute)& anAttribute) const;
68   
69   //! Returns the map of attributes in the  current  data   set.
70   //! This map can be used directly, or updated.
71     TDF_AttributeMap& Attributes();
72   
73   //! Adds a root label to <myRootLabels>.
74     void AddRoot (const TDF_Label& aLabel);
75   
76   //! Returns <myRootLabels> to be used or updated.
77     TDF_LabelList& Roots();
78   
79   //! Dumps the minimum information about <me> on
80   //! <aStream>.
81   Standard_EXPORT Standard_OStream& Dump (Standard_OStream& anOS) const;
82 Standard_OStream& operator<< (Standard_OStream& anOS) const
83 {
84   return Dump(anOS);
85 }
86
87
88
89
90   DEFINE_STANDARD_RTTIEXT(TDF_DataSet,MMgt_TShared)
91
92 protected:
93
94
95
96
97 private:
98
99
100   TDF_LabelList myRootLabels;
101   TDF_LabelMap myLabelMap;
102   TDF_AttributeMap myAttributeMap;
103
104
105 };
106
107
108 #include <TDF_DataSet.lxx>
109
110
111
112
113
114 #endif // _TDF_DataSet_HeaderFile