1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()

- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
This commit is contained in:
mkrylova
2021-07-14 15:06:35 +03:00
committed by bugmaster
parent 000c21fa0c
commit ad3f20c684
17 changed files with 150 additions and 152 deletions

View File

@@ -22,8 +22,8 @@
#include <LDOM_DocumentType.hxx>
#include <LDOM_LDOMImplementation.hxx>
#include <LDOMParser.hxx>
#include <OSD_FileSystem.hxx>
#include <OSD_Path.hxx>
#include <OSD_OpenFile.hxx>
#include <PCDM_Document.hxx>
#include <PCDM_DOMHeaderParser.hxx>
#include <Standard_Type.hxx>
@@ -175,12 +175,12 @@ void XmlLDrivers_DocumentRetrievalDriver::Read
myReaderStatus = PCDM_RS_DriverFailure;
myFileName = theFileName;
std::ifstream aFileStream;
OSD_OpenStream (aFileStream, myFileName, std::ios::in);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in);
if (aFileStream.is_open() && aFileStream.good())
if (aFileStream.get() != NULL && aFileStream->good())
{
Read (aFileStream, NULL, theNewDocument, theApplication, theFilter, theRange);
Read (*aFileStream, NULL, theNewDocument, theApplication, theFilter, theRange);
}
else
{