File indexing completed on 2025-01-18 10:04:37
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
0028 OSD_FileSystemSelector() {}
0029
0030
0031
0032
0033 Standard_EXPORT void AddProtocol (const Handle(OSD_FileSystem)& theFileSystem, bool theIsPreferred = false);
0034
0035
0036 Standard_EXPORT void RemoveProtocol (const Handle(OSD_FileSystem)& theFileSystem);
0037
0038 public:
0039
0040
0041 Standard_EXPORT virtual bool IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE;
0042
0043
0044 Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
0045
0046
0047 Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
0048
0049
0050 Standard_EXPORT virtual std::shared_ptr<std::istream> OpenIStream
0051 (const TCollection_AsciiString& theUrl,
0052 const std::ios_base::openmode theMode,
0053 const int64_t theOffset = 0,
0054 const std::shared_ptr<std::istream>& theOldStream = std::shared_ptr<std::istream>()) Standard_OVERRIDE;
0055
0056
0057 Standard_EXPORT virtual std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
0058 const std::ios_base::openmode theMode) Standard_OVERRIDE;
0059
0060
0061 Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer
0062 (const TCollection_AsciiString& theUrl,
0063 const std::ios_base::openmode theMode,
0064 const int64_t theOffset = 0,
0065 int64_t* theOutBufSize = NULL) Standard_OVERRIDE;
0066
0067 protected:
0068
0069 NCollection_List<Handle(OSD_FileSystem)> myProtocols;
0070
0071 };
0072
0073 #endif