0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / StepToTopoDS / StepToTopoDS.cxx
CommitLineData
b311480e 1// Created on: 1995-01-03
2// Created by: Frederic MAUPAS
3// Copyright (c) 1995-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
42cf5bc1 17
18#include <StepToTopoDS.hxx>
19#include <TCollection_HAsciiString.hxx>
7fd59977 20
21Handle(TCollection_HAsciiString) StepToTopoDS::DecodeBuilderError(const StepToTopoDS_BuilderError Error)
22{
23 Handle(TCollection_HAsciiString) mess;
24 switch(Error)
25 {
26 case StepToTopoDS_BuilderDone:
27 {
28 mess = new TCollection_HAsciiString("Builder Done");
29 break;
30 }
31 case StepToTopoDS_BuilderOther:
32 {
33 mess = new TCollection_HAsciiString("Builder Other");
34 break;
35 }
36 }
37 return mess;
38}
39
40Handle(TCollection_HAsciiString) StepToTopoDS::DecodeShellError(const StepToTopoDS_TranslateShellError Error)
41{
42 Handle(TCollection_HAsciiString) mess;
43 switch(Error)
44 {
45 case StepToTopoDS_TranslateShellDone:
46 {
47 mess = new TCollection_HAsciiString("Translate Shell Done");
48 break;
49 }
50 case StepToTopoDS_TranslateShellOther:
51 {
52 mess = new TCollection_HAsciiString("Translate Shell Other");
53 break;
54 }
55 }
56 return mess;
57}
58
59Handle(TCollection_HAsciiString) StepToTopoDS::DecodeFaceError(const StepToTopoDS_TranslateFaceError Error)
60{
61 Handle(TCollection_HAsciiString) mess;
62 switch(Error)
63 {
64 case StepToTopoDS_TranslateFaceDone:
65 {
66 mess = new TCollection_HAsciiString("Translate Face Done");
67 break;
68 }
69 case StepToTopoDS_TranslateFaceOther:
70 {
71 mess = new TCollection_HAsciiString("Translate Face Other");
72 break;
73 }
74 }
75 return mess;
76}
77
78Handle(TCollection_HAsciiString) StepToTopoDS::DecodeEdgeError(const StepToTopoDS_TranslateEdgeError Error)
79{
80 Handle(TCollection_HAsciiString) mess;
81 switch(Error)
82 {
83 case StepToTopoDS_TranslateEdgeDone:
84 {
85 mess = new TCollection_HAsciiString("Translate Edge Done");
86 break;
87 }
8d3d66d6 88 case StepToTopoDS_TranslateEdgeOther:
7fd59977 89 {
90 mess = new TCollection_HAsciiString("Translate Edge Other");
91 break;
92 }
93 }
94 return mess;
95}
96
97Handle(TCollection_HAsciiString) StepToTopoDS::DecodeVertexError(const StepToTopoDS_TranslateVertexError Error)
98{
99 Handle(TCollection_HAsciiString) mess;
100 switch(Error)
101 {
102 case StepToTopoDS_TranslateVertexDone:
103 {
104 mess = new TCollection_HAsciiString("Translate Vertex Done");
105 break;
106 }
107 case StepToTopoDS_TranslateVertexOther:
108 {
109 mess = new TCollection_HAsciiString("Translate Vertex Other");
110 break;
111 }
112 }
113 return mess;
114}
115
116Handle(TCollection_HAsciiString) StepToTopoDS::DecodeVertexLoopError(const StepToTopoDS_TranslateVertexLoopError Error)
117{
118 Handle(TCollection_HAsciiString) mess;
119 switch(Error)
120 {
121 case StepToTopoDS_TranslateVertexLoopDone:
122 {
123 mess = new TCollection_HAsciiString("Translate VertexLoop Done");
124 break;
125 }
126 case StepToTopoDS_TranslateVertexLoopOther:
127 {
128 mess = new TCollection_HAsciiString("Translate VertexLoop Other");
129 break;
130 }
131 }
132 return mess;
133}
134
135Handle(TCollection_HAsciiString) StepToTopoDS::DecodePolyLoopError(const StepToTopoDS_TranslatePolyLoopError Error)
136{
137 Handle(TCollection_HAsciiString) mess;
138 switch(Error)
139 {
140 case StepToTopoDS_TranslatePolyLoopDone:
141 {
142 mess = new TCollection_HAsciiString("Translate PolyLoop Done");
143 break;
144 }
145 case StepToTopoDS_TranslatePolyLoopOther:
146 {
147 mess = new TCollection_HAsciiString("Translate PolyLoop Other");
148 break;
149 }
150 }
151 return mess;
152}
153
154
155Standard_CString StepToTopoDS::DecodeGeometricToolError(const StepToTopoDS_GeometricToolError Error)
156{
157 Standard_CString mess="";
158 switch(Error)
159 {
160 case StepToTopoDS_GeometricToolDone:
161 {
162 mess = Standard_CString(" Geometric Tool is done");
163 break;
164 }
165 case StepToTopoDS_GeometricToolIsDegenerated:
166 {
167 mess = Standard_CString(" an Edge is degenerated");
168 break;
169 }
170 case StepToTopoDS_GeometricToolHasNoPCurve:
171 {
172 mess = Standard_CString(" SurfaceCurve does not contain a PCurve lying on the BasisSurface");
173 break;
174 }
175 case StepToTopoDS_GeometricToolWrong3dParameters:
176 {
177 mess = Standard_CString(" the update of 3D-Parameters failed");
178 break;
179 }
180 case StepToTopoDS_GeometricToolNoProjectiOnCurve:
181 {
182 mess = Standard_CString(" the projection of a VertexPoint on the curve3d failed");
183 break;
184 }
185 case StepToTopoDS_GeometricToolOther:
186 {
187 mess = Standard_CString(" GeometricTool failed");
188 break;
189 }
190 }
191 return mess;
192}
193
194