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_ShapeListBinder_HeaderFile |
18 | #define _TransferBRep_ShapeListBinder_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <TopTools_HSequenceOfShape.hxx> |
24 | #include <Transfer_Binder.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <Standard_Type.hxx> |
27 | #include <Standard_CString.hxx> |
28 | #include <Standard_Integer.hxx> |
29 | #include <TopAbs_ShapeEnum.hxx> |
30 | class Standard_TypeMismatch; |
31 | class Standard_OutOfRange; |
32 | class TopoDS_Shape; |
33 | class TopoDS_Vertex; |
34 | class TopoDS_Edge; |
35 | class TopoDS_Wire; |
36 | class TopoDS_Face; |
37 | class TopoDS_Shell; |
38 | class TopoDS_Solid; |
39 | class TopoDS_CompSolid; |
40 | class TopoDS_Compound; |
41 | |
42 | |
43 | class TransferBRep_ShapeListBinder; |
44 | DEFINE_STANDARD_HANDLE(TransferBRep_ShapeListBinder, Transfer_Binder) |
45 | |
46 | //! This binder binds several (a list of) shapes with a starting |
47 | //! entity, when this entity itself corresponds to a simple list |
48 | //! of shapes. Each part is not seen as a sub-result of an |
49 | //! independant componant, but as an item of a built-in list |
50 | class TransferBRep_ShapeListBinder : public Transfer_Binder |
51 | { |
52 | |
53 | public: |
54 | |
55 | |
56 | Standard_EXPORT TransferBRep_ShapeListBinder(); |
57 | |
58 | Standard_EXPORT TransferBRep_ShapeListBinder(const Handle(TopTools_HSequenceOfShape)& list); |
59 | |
60 | Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE; |
61 | |
79104795 |
62 | Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE; |
42cf5bc1 |
63 | |
79104795 |
64 | Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE; |
42cf5bc1 |
65 | |
66 | //! Adds an item to the result list |
67 | Standard_EXPORT void AddResult (const TopoDS_Shape& res); |
68 | |
69 | Standard_EXPORT Handle(TopTools_HSequenceOfShape) Result() const; |
70 | |
71 | //! Changes an already defined sub-result |
72 | Standard_EXPORT void SetResult (const Standard_Integer num, const TopoDS_Shape& res); |
73 | |
74 | Standard_EXPORT Standard_Integer NbShapes() const; |
75 | |
76 | Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer num) const; |
77 | |
78 | Standard_EXPORT TopAbs_ShapeEnum ShapeType (const Standard_Integer num) const; |
79 | |
80 | Standard_EXPORT TopoDS_Vertex Vertex (const Standard_Integer num) const; |
81 | |
82 | Standard_EXPORT TopoDS_Edge Edge (const Standard_Integer num) const; |
83 | |
84 | Standard_EXPORT TopoDS_Wire Wire (const Standard_Integer num) const; |
85 | |
86 | Standard_EXPORT TopoDS_Face Face (const Standard_Integer num) const; |
87 | |
88 | Standard_EXPORT TopoDS_Shell Shell (const Standard_Integer num) const; |
89 | |
90 | Standard_EXPORT TopoDS_Solid Solid (const Standard_Integer num) const; |
91 | |
92 | Standard_EXPORT TopoDS_CompSolid CompSolid (const Standard_Integer num) const; |
93 | |
94 | Standard_EXPORT TopoDS_Compound Compound (const Standard_Integer num) const; |
95 | |
96 | |
97 | |
98 | |
92efcf78 |
99 | DEFINE_STANDARD_RTTIEXT(TransferBRep_ShapeListBinder,Transfer_Binder) |
42cf5bc1 |
100 | |
101 | protected: |
102 | |
103 | |
104 | |
105 | |
106 | private: |
107 | |
108 | |
109 | Handle(TopTools_HSequenceOfShape) theres; |
110 | |
111 | |
112 | }; |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 | #endif // _TransferBRep_ShapeListBinder_HeaderFile |