1 // Created on: 1996-04-30
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 _Storage_HeaderFile
18 #define _Storage_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 class TCollection_AsciiString;
27 //! Storage package is used to write and read persistent objects.
28 //! These objects are read and written by a retrieval or storage
29 //! algorithm (Storage_Schema object) in a container (disk, memory,
30 //! network ...). Drivers (FSD_File objects) assign a physical
31 //! container for data to be stored or retrieved.
32 //! The standard procedure for an application in
33 //! reading a container is the following:
34 //! - open the driver in reading mode,
35 //! - call the Read function from the schema,
36 //! setting the driver as a parameter. This function returns
37 //! an instance of the Storage_Data class which contains the data being read,
38 //! - close the driver.
39 //! The standard procedure for an application in writing a container is the following:
40 //! - open the driver in writing mode,
41 //! - create an instance of the Storage_Data class, then
42 //! add the persistent data to write with the function AddRoot,
43 //! - call the function Write from the schema,
44 //! setting the driver and the Storage_Data instance as parameters,
45 //! - close the driver.
53 //! returns the version of Storage's read/write routines
54 Standard_EXPORT static TCollection_AsciiString Version();
70 friend class Storage_BaseDriver;
71 friend class Storage_CallBack;
72 friend class Storage_DefaultCallBack;
73 friend class Storage_HeaderData;
74 friend class Storage_Data;
75 friend class Storage_TypeData;
76 friend class Storage_RootData;
77 friend class Storage_Root;
78 friend class Storage_Schema;
79 friend class Storage_InternalData;
80 friend class Storage_stCONSTclCOM;
81 friend class Storage_TypedCallBack;
91 #endif // _Storage_HeaderFile