File indexing completed on 2026-09-10 09:17:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _OSD_FileSystemSelector_HeaderFile
0015 #define _OSD_FileSystemSelector_HeaderFile
0016
0017 #include <OSD_FileSystem.hxx>
0018
0019 #include <NCollection_List.hxx>
0020
0021
0022 class OSD_FileSystemSelector : public OSD_FileSystem
0023 {
0024 DEFINE_STANDARD_RTTIEXT(OSD_FileSystemSelector, OSD_FileSystem)
0025 public:
0026
0027 OSD_FileSystemSelector() {}
0028
0029
0030
0031
0032
0033 Standard_EXPORT void AddProtocol(const Handle(OSD_FileSystem)& theFileSystem,
0034 bool theIsPreferred = false);
0035
0036
0037 Standard_EXPORT void RemoveProtocol(const Handle(OSD_FileSystem)& theFileSystem);
0038
0039 public:
0040
0041 Standard_EXPORT virtual bool IsSupportedPath(const TCollection_AsciiString& theUrl) const
0042 Standard_OVERRIDE;
0043
0044
0045 Standard_EXPORT virtual Standard_Boolean IsOpenIStream(
0046 const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
0047
0048
0049 Standard_EXPORT virtual Standard_Boolean IsOpenOStream(
0050 const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
0051
0052
0053 Standard_EXPORT virtual std::shared_ptr<std::istream> OpenIStream(
0054 const TCollection_AsciiString& theUrl,
0055 const std::ios_base::openmode theMode,
0056 const int64_t theOffset = 0,
0057 const std::shared_ptr<std::istream>& theOldStream = std::shared_ptr<std::istream>())
0058 Standard_OVERRIDE;
0059
0060
0061 Standard_EXPORT virtual std::shared_ptr<std::ostream> OpenOStream(
0062 const TCollection_AsciiString& theUrl,
0063 const std::ios_base::openmode theMode) Standard_OVERRIDE;
0064
0065
0066 Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer(
0067 const TCollection_AsciiString& theUrl,
0068 const std::ios_base::openmode theMode,
0069 const int64_t theOffset = 0,
0070 int64_t* theOutBufSize = NULL) Standard_OVERRIDE;
0071
0072 protected:
0073 NCollection_List<Handle(OSD_FileSystem)> myProtocols;
0074 };
0075
0076 #endif