Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-25 10:08:45

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 class FSD_CmpFile : public FSD_File
0029 {
0030 public:
0031   DEFINE_STANDARD_RTTIEXT(FSD_CmpFile, FSD_File)
0032 
0033 public:
0034   Standard_EXPORT FSD_CmpFile();
0035 
0036   Standard_EXPORT Storage_Error Open(const TCollection_AsciiString& aName,
0037                                      const Storage_OpenMode         aMode) override;
0038 
0039   Standard_EXPORT static Storage_Error IsGoodFileType(const TCollection_AsciiString& aName);
0040 
0041   Standard_EXPORT Storage_Error BeginWriteInfoSection() override;
0042 
0043   Standard_EXPORT Storage_Error BeginReadInfoSection() override;
0044 
0045   Standard_EXPORT void WritePersistentObjectHeader(const int aRef, const int aType) override;
0046 
0047   Standard_EXPORT void BeginWritePersistentObjectData() override;
0048 
0049   Standard_EXPORT void BeginWriteObjectData() override;
0050 
0051   Standard_EXPORT void EndWriteObjectData() override;
0052 
0053   Standard_EXPORT void EndWritePersistentObjectData() override;
0054 
0055   Standard_EXPORT void ReadPersistentObjectHeader(int& aRef, int& aType) override;
0056 
0057   Standard_EXPORT void BeginReadPersistentObjectData() override;
0058 
0059   Standard_EXPORT void BeginReadObjectData() override;
0060 
0061   Standard_EXPORT void EndReadObjectData() override;
0062 
0063   Standard_EXPORT void EndReadPersistentObjectData() override;
0064 
0065   Standard_EXPORT void Destroy();
0066 
0067   ~FSD_CmpFile() override { Destroy(); }
0068 
0069   Standard_EXPORT static const char* MagicNumber();
0070 
0071 protected:
0072   //! read from the current position to the end of line.
0073   Standard_EXPORT void ReadLine(TCollection_AsciiString& buffer) override;
0074 
0075   //! read extended chars (unicode) from the current position to the end of line.
0076   Standard_EXPORT void ReadExtendedLine(TCollection_ExtendedString& buffer) override;
0077 
0078   //! write from the current position to the end of line.
0079   Standard_EXPORT void WriteExtendedLine(const TCollection_ExtendedString& buffer) override;
0080 
0081   //! read from the first none space character position to the end of line.
0082   Standard_EXPORT void ReadString(TCollection_AsciiString& buffer) override;
0083 };
0084 
0085 #endif // _FSD_CmpFile_HeaderFile