Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:37

0001 // Copyright (c) 2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _OSD_LocalFileSystem_HeaderFile
0015 #define _OSD_LocalFileSystem_HeaderFile
0016 
0017 #include <OSD_FileSystem.hxx>
0018 
0019 //! A file system opening local files (or files from mount systems).
0020 class OSD_LocalFileSystem : public OSD_FileSystem
0021 {
0022   DEFINE_STANDARD_RTTIEXT(OSD_LocalFileSystem, OSD_FileSystem)
0023 public:
0024 
0025   //! Constructor.
0026   OSD_LocalFileSystem() {}
0027 
0028   //! Returns TRUE if URL defines a supported protocol.
0029   Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE;
0030 
0031   //! Returns TRUE if current input stream is opened for reading operations.
0032   Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
0033 
0034   //! Returns TRUE if current output stream is opened for writing operations.
0035   Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
0036 
0037   //! Opens stream buffer for specified file URL.
0038   Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer
0039                           (const TCollection_AsciiString& theUrl,
0040                            const std::ios_base::openmode theMode,
0041                            const int64_t theOffset = 0,
0042                            int64_t* theOutBufSize = NULL) Standard_OVERRIDE;
0043 };
0044 #endif // _OSD_LocalFileSystem_HeaderFile