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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TransferBRep_ShapeListBinder_HeaderFile
18 #define _TransferBRep_ShapeListBinder_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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>
37 class TopoDS_CompSolid;
38 class TopoDS_Compound;
41 class TransferBRep_ShapeListBinder;
42 DEFINE_STANDARD_HANDLE(TransferBRep_ShapeListBinder, Transfer_Binder)
44 //! This binder binds several (a list of) shapes with a starting
45 //! entity, when this entity itself corresponds to a simple list
46 //! of shapes. Each part is not seen as a sub-result of an
47 //! independent component, but as an item of a built-in list
48 class TransferBRep_ShapeListBinder : public Transfer_Binder
54 Standard_EXPORT TransferBRep_ShapeListBinder();
56 Standard_EXPORT TransferBRep_ShapeListBinder(const Handle(TopTools_HSequenceOfShape)& list);
58 Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE;
60 Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE;
62 Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE;
64 //! Adds an item to the result list
65 Standard_EXPORT void AddResult (const TopoDS_Shape& res);
67 Standard_EXPORT Handle(TopTools_HSequenceOfShape) Result() const;
69 //! Changes an already defined sub-result
70 Standard_EXPORT void SetResult (const Standard_Integer num, const TopoDS_Shape& res);
72 Standard_EXPORT Standard_Integer NbShapes() const;
74 Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer num) const;
76 Standard_EXPORT TopAbs_ShapeEnum ShapeType (const Standard_Integer num) const;
78 Standard_EXPORT TopoDS_Vertex Vertex (const Standard_Integer num) const;
80 Standard_EXPORT TopoDS_Edge Edge (const Standard_Integer num) const;
82 Standard_EXPORT TopoDS_Wire Wire (const Standard_Integer num) const;
84 Standard_EXPORT TopoDS_Face Face (const Standard_Integer num) const;
86 Standard_EXPORT TopoDS_Shell Shell (const Standard_Integer num) const;
88 Standard_EXPORT TopoDS_Solid Solid (const Standard_Integer num) const;
90 Standard_EXPORT TopoDS_CompSolid CompSolid (const Standard_Integer num) const;
92 Standard_EXPORT TopoDS_Compound Compound (const Standard_Integer num) const;
97 DEFINE_STANDARD_RTTIEXT(TransferBRep_ShapeListBinder,Transfer_Binder)
107 Handle(TopTools_HSequenceOfShape) theres;
118 #endif // _TransferBRep_ShapeListBinder_HeaderFile