5a0dfe0c3a2a8f728ab9b2a0223480d0de7f1ef1
[occt.git] / src / TCollection / TCollection_HSet.gxx
1 // Created on: 1993-03-03
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-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 //=======================================================================
18 //function : TCollection_HSet
19 //purpose  : 
20 //=======================================================================
21
22 TCollection_HSet::TCollection_HSet()
23 {
24 }
25
26 //=======================================================================
27 //function : Union
28 //purpose  : 
29 //=======================================================================
30
31 Handle(TCollection_HSet) TCollection_HSet::Union
32        (const Handle(TCollection_HSet)& B) const
33 {
34   Handle(TCollection_HSet) R = new TCollection_HSet();
35   R->ChangeSet() = mySet;
36   R->ChangeSet().Union(B->Set());
37   return R;
38 }
39
40 //=======================================================================
41 //function : Intersection
42 //purpose  : 
43 //=======================================================================
44
45 Handle(TCollection_HSet) TCollection_HSet::Intersection
46        (const Handle(TCollection_HSet)& B) const
47 {
48   Handle(TCollection_HSet) R = new TCollection_HSet();
49   R->ChangeSet() = mySet;
50   R->ChangeSet().Intersection(B->Set());
51   return R;
52 }
53
54 //=======================================================================
55 //function : Difference
56 //purpose  : 
57 //=======================================================================
58
59 Handle(TCollection_HSet) TCollection_HSet::Difference
60        (const Handle(TCollection_HSet)& B) const
61 {
62   Handle(TCollection_HSet) R = new TCollection_HSet();
63   R->ChangeSet() = mySet;
64   R->ChangeSet().Difference(B->Set());
65   return R;
66 }
67
68 //=======================================================================
69 //function : ShallowCopy
70 //purpose  : 
71 //=======================================================================
72
73 Handle(TCollection_HSet) TCollection_HSet::ShallowCopy() const
74 {
75   Handle(TCollection_HSet) S = new TCollection_HSet();
76   S->ChangeSet() = mySet;
77   return S;
78 }
79
80 //=======================================================================
81 //function : IsSameState
82 //purpose  : 
83 //=======================================================================
84
85 //Standard_Boolean TCollection_HSet::IsSameState
86 //  (const Handle(TCollection_HSet)& Other) const
87 //{
88 //  Handle(TCollection_HSet) S = Handle(TCollection_HSet)::DownCast(Other);
89 //  Standard_Boolean result = Standard_False;
90 //  if (!S.IsNull()) {
91 //    if (S->Extent() == Extent()) {
92 //      result = IsASubset(S);
93 //    }
94 //  }
95 //  return result;
96 //}