b311480e |
1 | // Created on: 2008-06-03 |
2 | // Created by: Alexander GRIGORIEV |
973c2be1 |
3 | // Copyright (c) 2008-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #ifndef VrmlData_DataMapOfShapeAppearance_HeaderFile |
17 | #define VrmlData_DataMapOfShapeAppearance_HeaderFile |
18 | |
19 | #include <NCollection_DataMap.hxx> |
7fd59977 |
20 | #include <VrmlData_Appearance.hxx> |
21 | #include <TopoDS_TShape.hxx> |
22 | |
23 | /** |
24 | * Data Map that provides the link between each Shape obtained in VRML import |
25 | * and the corresponding Appearance. |
26 | */ |
27 | class VrmlData_DataMapOfShapeAppearance |
857ffd5e |
28 | : public NCollection_DataMap<Handle(TopoDS_TShape), Handle(VrmlData_Appearance)> |
7fd59977 |
29 | { |
30 | public: |
31 | //! Constructor |
32 | inline VrmlData_DataMapOfShapeAppearance |
33 | (const Standard_Integer NbBuckets=1, |
34 | const Handle(NCollection_BaseAllocator)& theAllocator = 0L) |
857ffd5e |
35 | : NCollection_DataMap<Handle(TopoDS_TShape), |
36 | Handle(VrmlData_Appearance)> (NbBuckets, theAllocator) |
7fd59977 |
37 | {} |
38 | |
39 | //! Copy constructor |
40 | inline VrmlData_DataMapOfShapeAppearance |
41 | (const VrmlData_DataMapOfShapeAppearance& theOther) |
857ffd5e |
42 | : NCollection_DataMap<Handle(TopoDS_TShape), |
43 | Handle(VrmlData_Appearance)> (theOther) |
7fd59977 |
44 | {} |
45 | |
46 | |
857ffd5e |
47 | friend Standard_Boolean IsEqual (const Handle(TopoDS_TShape)& one, |
48 | const Handle(TopoDS_TShape)& two); |
7fd59977 |
49 | |
50 | }; |
51 | |
52 | //======================================================================= |
53 | //function : IsEqual |
54 | //purpose : for NCollection_DataMap interface |
55 | //======================================================================= |
857ffd5e |
56 | inline Standard_Boolean IsEqual (const Handle(TopoDS_TShape)& one, |
57 | const Handle(TopoDS_TShape)& two) |
7fd59977 |
58 | { |
59 | return one == two; |
60 | } |
61 | |
62 | |
63 | #endif |