mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027726: List of formats supported by TDocStd_Application
Minor corrections and implementation of ABV remark
This commit is contained in:
@@ -418,7 +418,7 @@ Handle(PCDM_Reader) CDF_Application::ReaderFromFormat(const TCollection_Extended
|
||||
{
|
||||
// check map of readers
|
||||
Handle(PCDM_RetrievalDriver) aReader;
|
||||
if (myReaders.Find (theFormat, aReader))
|
||||
if (myReaders.FindFromKey (theFormat, aReader))
|
||||
return aReader;
|
||||
|
||||
// support of legacy method of loading reader as plugin
|
||||
@@ -426,7 +426,7 @@ Handle(PCDM_Reader) CDF_Application::ReaderFromFormat(const TCollection_Extended
|
||||
aResourceName += ".RetrievalPlugin";
|
||||
if (!UTL::Find(Resources(), aResourceName))
|
||||
{
|
||||
myReaders.Bind(theFormat, aReader);
|
||||
myReaders.Add(theFormat, aReader);
|
||||
Standard_SStream aMsg;
|
||||
aMsg << "Could not found the item:" << aResourceName <<(char)0;
|
||||
myRetrievableStatus = PCDM_RS_WrongResource;
|
||||
@@ -449,7 +449,7 @@ Handle(PCDM_Reader) CDF_Application::ReaderFromFormat(const TCollection_Extended
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
myReaders.Bind(theFormat, aReader);
|
||||
myReaders.Add(theFormat, aReader);
|
||||
myRetrievableStatus = PCDM_RS_WrongResource;
|
||||
Standard_Failure::Caught()->Reraise();
|
||||
}
|
||||
@@ -462,7 +462,7 @@ Handle(PCDM_Reader) CDF_Application::ReaderFromFormat(const TCollection_Extended
|
||||
}
|
||||
|
||||
// record in map
|
||||
myReaders.Bind (theFormat, aReader);
|
||||
myReaders.Add(theFormat, aReader);
|
||||
return aReader;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ Handle(PCDM_StorageDriver) CDF_Application::WriterFromFormat(const TCollection_E
|
||||
{
|
||||
// check map of writers
|
||||
Handle(PCDM_StorageDriver) aDriver;
|
||||
if (myWriters.Find (theFormat, aDriver))
|
||||
if (myWriters.FindFromKey(theFormat, aDriver))
|
||||
return aDriver;
|
||||
|
||||
// support of legacy method of loading reader as plugin
|
||||
@@ -482,7 +482,7 @@ Handle(PCDM_StorageDriver) CDF_Application::WriterFromFormat(const TCollection_E
|
||||
aResourceName += ".StoragePlugin";
|
||||
if(!UTL::Find(Resources(), aResourceName))
|
||||
{
|
||||
myWriters.Bind (theFormat, aDriver);
|
||||
myWriters.Add(theFormat, aDriver);
|
||||
Standard_SStream aMsg;
|
||||
aMsg << "Could not found the resource definition:" << aResourceName <<(char)0;
|
||||
Standard_NoSuchObject::Raise(aMsg);
|
||||
@@ -504,7 +504,7 @@ Handle(PCDM_StorageDriver) CDF_Application::WriterFromFormat(const TCollection_E
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
myWriters.Bind (theFormat, aDriver);
|
||||
myWriters.Add(theFormat, aDriver);
|
||||
myRetrievableStatus = PCDM_RS_WrongResource;
|
||||
Standard_Failure::Caught()->Reraise();
|
||||
}
|
||||
@@ -518,7 +518,7 @@ Handle(PCDM_StorageDriver) CDF_Application::WriterFromFormat(const TCollection_E
|
||||
}
|
||||
|
||||
// record in map
|
||||
myWriters.Bind(theFormat, aDriver);
|
||||
myWriters.Add(theFormat, aDriver);
|
||||
return aDriver;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#include <TColStd_SequenceOfExtendedString.hxx>
|
||||
#include <CDF_TypeOfActivation.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
#include <NCollection_IndexedDataMap.hxx>
|
||||
|
||||
class Standard_NoSuchObject;
|
||||
class CDF_Session;
|
||||
@@ -164,8 +164,8 @@ protected:
|
||||
Standard_EXPORT CDF_Application();
|
||||
|
||||
PCDM_ReaderStatus myRetrievableStatus;
|
||||
NCollection_DataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)> myReaders;
|
||||
NCollection_DataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)> myWriters;
|
||||
NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)> myReaders;
|
||||
NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)> myWriters;
|
||||
|
||||
private:
|
||||
|
||||
|
Reference in New Issue
Block a user