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_Integer.hxx>
26 #include <TopAbs_ShapeEnum.hxx>
34 class TopoDS_CompSolid;
35 class TopoDS_Compound;
38 class TransferBRep_ShapeListBinder;
39 DEFINE_STANDARD_HANDLE(TransferBRep_ShapeListBinder, Transfer_Binder)
41 //! This binder binds several (a list of) shapes with a starting
42 //! entity, when this entity itself corresponds to a simple list
43 //! of shapes. Each part is not seen as a sub-result of an
44 //! independent component, but as an item of a built-in list
45 class TransferBRep_ShapeListBinder : public Transfer_Binder
51 Standard_EXPORT TransferBRep_ShapeListBinder();
53 Standard_EXPORT TransferBRep_ShapeListBinder(const Handle(TopTools_HSequenceOfShape)& list);
55 Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE;
57 Standard_EXPORT Handle(Standard_Type) ResultType() const Standard_OVERRIDE;
59 Standard_EXPORT Standard_CString ResultTypeName() const Standard_OVERRIDE;
61 //! Adds an item to the result list
62 Standard_EXPORT void AddResult (const TopoDS_Shape& res);
64 Standard_EXPORT Handle(TopTools_HSequenceOfShape) Result() const;
66 //! Changes an already defined sub-result
67 Standard_EXPORT void SetResult (const Standard_Integer num, const TopoDS_Shape& res);
69 Standard_EXPORT Standard_Integer NbShapes() const;
71 Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer num) const;
73 Standard_EXPORT TopAbs_ShapeEnum ShapeType (const Standard_Integer num) const;
75 Standard_EXPORT TopoDS_Vertex Vertex (const Standard_Integer num) const;
77 Standard_EXPORT TopoDS_Edge Edge (const Standard_Integer num) const;
79 Standard_EXPORT TopoDS_Wire Wire (const Standard_Integer num) const;
81 Standard_EXPORT TopoDS_Face Face (const Standard_Integer num) const;
83 Standard_EXPORT TopoDS_Shell Shell (const Standard_Integer num) const;
85 Standard_EXPORT TopoDS_Solid Solid (const Standard_Integer num) const;
87 Standard_EXPORT TopoDS_CompSolid CompSolid (const Standard_Integer num) const;
89 Standard_EXPORT TopoDS_Compound Compound (const Standard_Integer num) const;
94 DEFINE_STANDARD_RTTIEXT(TransferBRep_ShapeListBinder,Transfer_Binder)
104 Handle(TopTools_HSequenceOfShape) theres;
115 #endif // _TransferBRep_ShapeListBinder_HeaderFile