Warnings on vc14 were eliminated
[occt.git] / src / TransferBRep / TransferBRep_ShapeListBinder.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
42cf5bc1 14
15#include <Standard_OutOfRange.hxx>
16#include <Standard_Type.hxx>
17#include <Standard_TypeMismatch.hxx>
18#include <TopoDS.hxx>
19#include <TopoDS_Compound.hxx>
20#include <TopoDS_CompSolid.hxx>
21#include <TopoDS_Edge.hxx>
22#include <TopoDS_Face.hxx>
23#include <TopoDS_Shape.hxx>
24#include <TopoDS_Shell.hxx>
25#include <TopoDS_Solid.hxx>
26#include <TopoDS_Vertex.hxx>
27#include <TopoDS_Wire.hxx>
28#include <TransferBRep_ShapeListBinder.hxx>
7fd59977 29
92efcf78 30IMPLEMENT_STANDARD_RTTIEXT(TransferBRep_ShapeListBinder,Transfer_Binder)
31
b311480e 32TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder ()
7fd59977 33 { theres = new TopTools_HSequenceOfShape(); }
34
35 TransferBRep_ShapeListBinder::TransferBRep_ShapeListBinder
36 (const Handle(TopTools_HSequenceOfShape)& list)
37 { theres = list; }
38
39 Standard_Boolean TransferBRep_ShapeListBinder::IsMultiple () const
40 { return (NbShapes() > 1); }
41
42 Handle(Standard_Type) TransferBRep_ShapeListBinder::ResultType () const
43 { return STANDARD_TYPE(TransferBRep_ShapeListBinder); }
44
45 Standard_CString TransferBRep_ShapeListBinder::ResultTypeName () const
46 { return "list(TopoDS_Shape)"; }
47
48
49 void TransferBRep_ShapeListBinder::AddResult (const TopoDS_Shape& shape)
50 { theres->Append(shape); }
51
52 Handle(TopTools_HSequenceOfShape) TransferBRep_ShapeListBinder::Result
53 () const
54 { return theres; }
55
56 void TransferBRep_ShapeListBinder::SetResult
57 (const Standard_Integer num, const TopoDS_Shape& shape)
58 { theres->SetValue(num,shape); }
59
60 Standard_Integer TransferBRep_ShapeListBinder::NbShapes () const
61 { return theres->Length(); }
62
63 const TopoDS_Shape& TransferBRep_ShapeListBinder::Shape
64 (const Standard_Integer num) const
65 { return theres->Value(num); }
66
67 TopAbs_ShapeEnum TransferBRep_ShapeListBinder::ShapeType
68 (const Standard_Integer num) const
69 { return theres->Value(num).ShapeType(); }
70
71 TopoDS_Vertex TransferBRep_ShapeListBinder::Vertex
72 (const Standard_Integer num) const
73 { return TopoDS::Vertex(theres->Value(num)); }
74
75 TopoDS_Edge TransferBRep_ShapeListBinder::Edge
76 (const Standard_Integer num) const
77 { return TopoDS::Edge(theres->Value(num)); }
78
79 TopoDS_Wire TransferBRep_ShapeListBinder::Wire
80 (const Standard_Integer num) const
81 { return TopoDS::Wire(theres->Value(num)); }
82
83 TopoDS_Face TransferBRep_ShapeListBinder::Face
84 (const Standard_Integer num) const
85 { return TopoDS::Face(theres->Value(num)); }
86
87 TopoDS_Shell TransferBRep_ShapeListBinder::Shell
88 (const Standard_Integer num) const
89 { return TopoDS::Shell(theres->Value(num)); }
90
91 TopoDS_Solid TransferBRep_ShapeListBinder::Solid
92 (const Standard_Integer num) const
93 { return TopoDS::Solid(theres->Value(num)); }
94
95 TopoDS_CompSolid TransferBRep_ShapeListBinder::CompSolid
96 (const Standard_Integer num) const
97 { return TopoDS::CompSolid(theres->Value(num)); }
98
99 TopoDS_Compound TransferBRep_ShapeListBinder::Compound
100 (const Standard_Integer num) const
101 { return TopoDS::Compound(theres->Value(num)); }
102
103