Salome HOME
Issue #608: Usage of OCCT in interface -- Wrap classes by SWIG
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_STEPImport.cpp
index 8ed138604b6ebfea7cf7d14f52b1fbe35e2feb3c..7ff22b0f015a3500fb3fe675816a4670b61278ef 100644 (file)
@@ -43,7 +43,6 @@
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
-namespace STEPImport {
 //=============================================================================
 /*!
  *  GetShape()
@@ -364,10 +363,9 @@ Handle(TCollection_HAsciiString) GetValue (const TCollection_AsciiString& theFil
   return aValue;
 }
 
-TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                     const TCollection_AsciiString& theFormatName,
-                     TCollection_AsciiString&       theError,
-                     const TDF_Label&               theShapeLabel)
+TopoDS_Shape STEPImport(const std::string& theFileName,
+                        const std::string& theFormatName,
+                        std::string& theError)
 {
   TopoDS_Shape aResShape;
 
@@ -388,7 +386,7 @@ TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
   try {
     OCC_CATCH_SIGNALS;
 
-    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
+    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.c_str());
 
     if (status == IFSelect_RetDone) {
 
@@ -495,5 +493,3 @@ TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
   // Return previous locale
   return aResShape;
 }
-
-} // namespace STEPImport