Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:31

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, const Storage_OpenMode aMode) Standard_OVERRIDE;
0039 
0040   Standard_EXPORT static Storage_Error IsGoodFileType(const TCollection_AsciiString& aName);
0041 
0042   Standard_EXPORT Storage_Error BeginWriteInfoSection() Standard_OVERRIDE;
0043 
0044   Standard_EXPORT Storage_Error BeginReadInfoSection() Standard_OVERRIDE;
0045 
0046   Standard_EXPORT void WritePersistentObjectHeader(const Standard_Integer aRef, const Standard_Integer aType) Standard_OVERRIDE;
0047 
0048   Standard_EXPORT void BeginWritePersistentObjectData() Standard_OVERRIDE;
0049 
0050   Standard_EXPORT void BeginWriteObjectData() Standard_OVERRIDE;
0051 
0052   Standard_EXPORT void EndWriteObjectData() Standard_OVERRIDE;
0053 
0054   Standard_EXPORT void EndWritePersistentObjectData() Standard_OVERRIDE;
0055 
0056   Standard_EXPORT void ReadPersistentObjectHeader(Standard_Integer& aRef, Standard_Integer& aType) Standard_OVERRIDE;
0057 
0058   Standard_EXPORT void BeginReadPersistentObjectData() Standard_OVERRIDE;
0059 
0060   Standard_EXPORT void BeginReadObjectData() Standard_OVERRIDE;
0061 
0062   Standard_EXPORT void EndReadObjectData() Standard_OVERRIDE;
0063 
0064   Standard_EXPORT void EndReadPersistentObjectData() Standard_OVERRIDE;
0065 
0066   Standard_EXPORT void Destroy();
0067   ~FSD_CmpFile()
0068   {
0069     Destroy();
0070   }
0071 
0072   Standard_EXPORT static Standard_CString MagicNumber();
0073 
0074 protected:
0075 
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) Standard_OVERRIDE;
0084 
0085   //! read from the first none space character position to the end of line.
0086   Standard_EXPORT void ReadString(TCollection_AsciiString& buffer) Standard_OVERRIDE;
0087 
0088 };
0089 
0090 #endif // _FSD_CmpFile_HeaderFile