1 // Created on: 1996-11-29
2 // Created by: Christophe LEYNADIER
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _FSD_CmpFile_HeaderFile
18 #define _FSD_CmpFile_HeaderFile
20 #include <FSD_File.hxx>
21 #include <Storage_BaseDriver.hxx>
22 #include <Storage_Error.hxx>
23 #include <Storage_OpenMode.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_CString.hxx>
27 class TCollection_AsciiString;
28 class TCollection_ExtendedString;
29 class Storage_BaseDriver;
31 class FSD_CmpFile : public FSD_File
38 Standard_EXPORT FSD_CmpFile();
40 Standard_EXPORT Storage_Error Open(const TCollection_AsciiString& aName, const Storage_OpenMode aMode);
42 Standard_EXPORT static Storage_Error IsGoodFileType(const TCollection_AsciiString& aName);
44 Standard_EXPORT Storage_Error BeginWriteInfoSection();
46 Standard_EXPORT Storage_Error BeginReadInfoSection();
48 Standard_EXPORT void WritePersistentObjectHeader(const Standard_Integer aRef, const Standard_Integer aType);
50 Standard_EXPORT void BeginWritePersistentObjectData();
52 Standard_EXPORT void BeginWriteObjectData();
54 Standard_EXPORT void EndWriteObjectData();
56 Standard_EXPORT void EndWritePersistentObjectData();
58 Standard_EXPORT void ReadPersistentObjectHeader(Standard_Integer& aRef, Standard_Integer& aType);
60 Standard_EXPORT void BeginReadPersistentObjectData();
62 Standard_EXPORT void BeginReadObjectData();
64 Standard_EXPORT void EndReadObjectData();
66 Standard_EXPORT void EndReadPersistentObjectData();
68 Standard_EXPORT void Destroy();
74 Standard_EXPORT static Standard_CString MagicNumber();
81 //! read from the current position to the end of line.
82 Standard_EXPORT void ReadLine(TCollection_AsciiString& buffer);
84 //! read extended chars (unicode) from the current position to the end of line.
85 Standard_EXPORT void ReadExtendedLine(TCollection_ExtendedString& buffer);
87 //! write from the current position to the end of line.
88 Standard_EXPORT void WriteExtendedLine(const TCollection_ExtendedString& buffer);
90 //! read from the first none space character position to the end of line.
91 Standard_EXPORT void ReadString(TCollection_AsciiString& buffer);
95 #endif // _FSD_CmpFile_HeaderFile