Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-29 08:15:55

0001 // Created on: 1996-11-29
0002 // Created by: Christophe LEYNADIER
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _FSD_CmpFile_HeaderFile
0018 #define _FSD_CmpFile_HeaderFile
0019 
0020 #include <FSD_File.hxx>
0021 #include <Storage_BaseDriver.hxx>
0022 #include <Storage_Error.hxx>
0023 #include <Storage_OpenMode.hxx>
0024 
0025 class TCollection_AsciiString;
0026 class TCollection_ExtendedString;
0027 
0028 DEFINE_STANDARD_HANDLE(FSD_CmpFile, FSD_File)
0029 
0030 class FSD_CmpFile : public FSD_File
0031 {
0032 public:
0033   DEFINE_STANDARD_RTTIEXT(FSD_CmpFile, FSD_File)
0034 
0035 public:
0036   Standard_EXPORT FSD_CmpFile();
0037 
0038   Standard_EXPORT Storage_Error Open(const TCollection_AsciiString& aName,
0039                                      const Storage_OpenMode         aMode) Standard_OVERRIDE;
0040 
0041   Standard_EXPORT static Storage_Error IsGoodFileType(const TCollection_AsciiString& aName);
0042 
0043   Standard_EXPORT Storage_Error BeginWriteInfoSection() Standard_OVERRIDE;
0044 
0045   Standard_EXPORT Storage_Error BeginReadInfoSection() Standard_OVERRIDE;
0046 
0047   Standard_EXPORT void WritePersistentObjectHeader(const Standard_Integer aRef,
0048                                                    const Standard_Integer aType) Standard_OVERRIDE;
0049 
0050   Standard_EXPORT void BeginWritePersistentObjectData() Standard_OVERRIDE;
0051 
0052   Standard_EXPORT void BeginWriteObjectData() Standard_OVERRIDE;
0053 
0054   Standard_EXPORT void EndWriteObjectData() Standard_OVERRIDE;
0055 
0056   Standard_EXPORT void EndWritePersistentObjectData() Standard_OVERRIDE;
0057 
0058   Standard_EXPORT void ReadPersistentObjectHeader(Standard_Integer& aRef,
0059                                                   Standard_Integer& aType) Standard_OVERRIDE;
0060 
0061   Standard_EXPORT void BeginReadPersistentObjectData() Standard_OVERRIDE;
0062 
0063   Standard_EXPORT void BeginReadObjectData() Standard_OVERRIDE;
0064 
0065   Standard_EXPORT void EndReadObjectData() Standard_OVERRIDE;
0066 
0067   Standard_EXPORT void EndReadPersistentObjectData() Standard_OVERRIDE;
0068 
0069   Standard_EXPORT void Destroy();
0070 
0071   ~FSD_CmpFile() { Destroy(); }
0072 
0073   Standard_EXPORT static Standard_CString MagicNumber();
0074 
0075 protected:
0076   //! read from the current position to the end of line.
0077   Standard_EXPORT void ReadLine(TCollection_AsciiString& buffer) Standard_OVERRIDE;
0078 
0079   //! read extended chars (unicode) from the current position to the end of line.
0080   Standard_EXPORT void ReadExtendedLine(TCollection_ExtendedString& buffer) Standard_OVERRIDE;
0081 
0082   //! write from the current position to the end of line.
0083   Standard_EXPORT void WriteExtendedLine(const TCollection_ExtendedString& buffer)
0084     Standard_OVERRIDE;
0085 
0086   //! read from the first none space character position to the end of line.
0087   Standard_EXPORT void ReadString(TCollection_AsciiString& buffer) Standard_OVERRIDE;
0088 };
0089 
0090 #endif // _FSD_CmpFile_HeaderFile