42cf5bc1 |
1 | // Created on: 1994-10-03 |
2 | // Created by: Christian CAILLET |
3 | // Copyright (c) 1994-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 _TransferBRep_ShapeMapper_HeaderFile |
18 | #define _TransferBRep_ShapeMapper_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <TopoDS_Shape.hxx> |
24 | #include <Transfer_Finder.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <Standard_Type.hxx> |
27 | #include <Standard_CString.hxx> |
28 | class TopoDS_Shape; |
29 | class TopTools_ShapeMapHasher; |
30 | class TransferBRep_ShapeInfo; |
31 | class Transfer_Finder; |
32 | |
33 | |
34 | class TransferBRep_ShapeMapper; |
35 | DEFINE_STANDARD_HANDLE(TransferBRep_ShapeMapper, Transfer_Finder) |
36 | |
37 | |
38 | class TransferBRep_ShapeMapper : public Transfer_Finder |
39 | { |
40 | |
41 | public: |
42 | |
43 | |
36b9ff75 |
44 | //! Creates a Mapper with a Value. This Value can then not be |
45 | //! changed. It is used by the Hasher to compute the HashCode, |
46 | //! which will then be stored for an immediate reading. |
42cf5bc1 |
47 | Standard_EXPORT TransferBRep_ShapeMapper(const TopoDS_Shape& akey); |
48 | |
36b9ff75 |
49 | //! Returns the contained value |
42cf5bc1 |
50 | Standard_EXPORT const TopoDS_Shape& Value() const; |
51 | |
36b9ff75 |
52 | //! Specific testof equallity : defined as False if <other> has |
53 | //! not the same true Type, else contents are compared (by |
54 | //! C++ operator ==) |
79104795 |
55 | Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const Standard_OVERRIDE; |
42cf5bc1 |
56 | |
36b9ff75 |
57 | //! Returns the Type of the Value. By default, returns the |
58 | //! DynamicType of <me>, but can be redefined |
42cf5bc1 |
59 | Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE; |
60 | |
36b9ff75 |
61 | //! Returns the name of the Type of the Value. Default is name |
62 | //! of ValueType, unless it is for a non-handled object |
42cf5bc1 |
63 | Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE; |
64 | |
65 | |
66 | |
67 | |
92efcf78 |
68 | DEFINE_STANDARD_RTTI_INLINE(TransferBRep_ShapeMapper,Transfer_Finder) |
42cf5bc1 |
69 | |
70 | protected: |
71 | |
72 | |
73 | |
74 | |
75 | private: |
76 | |
77 | |
78 | TopoDS_Shape theval; |
79 | |
80 | |
81 | }; |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | #endif // _TransferBRep_ShapeMapper_HeaderFile |