1 // Created on: 1996-04-30
2 // Created by: cle
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #ifndef _Storage_HeaderFile
18 #define _Storage_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23 
24 class TCollection_AsciiString;
25 class Storage_BaseDriver;
26 class Storage_CallBack;
27 class Storage_DefaultCallBack;
28 class Storage_HeaderData;
29 class Storage_Data;
30 class Storage_TypeData;
31 class Storage_RootData;
32 class Storage_Root;
33 class Storage_Schema;
34 class Storage_InternalData;
35 class Storage_stCONSTclCOM;
36 class Storage_TypedCallBack;
37 
38 
39 //! Storage package is used to write and read persistent objects.
40 //! These objects are read and written by a retrieval or storage
41 //! algorithm (Storage_Schema object) in a container (disk, memory,
42 //! network ...). Drivers (FSD_File objects) assign a physical
43 //! container for data to be stored or retrieved.
44 //! The standard procedure for an application in
45 //! reading a container is the following:
46 //! -   open the driver in reading mode,
47 //! -   call the Read function from the schema,
48 //! setting the driver as a parameter. This   function returns
49 //! an instance of the   Storage_Data class which contains the   data being read,
50 //! -   close the driver.
51 //! The standard procedure for an application in writing a container is the following:
52 //! -   open the driver in writing mode,
53 //! -   create an instance of the Storage_Data   class, then
54 //! add the persistent data to write   with the function AddRoot,
55 //! -   call the function Write from the schema,
56 //! setting the driver and the Storage_Data   instance as parameters,
57 //! -      close the driver.
58 class Storage
59 {
60 public:
61 
62   DEFINE_STANDARD_ALLOC
63 
64 
65   //! returns the version of Storage's read/write routines
66   Standard_EXPORT static TCollection_AsciiString Version();
67 
68 
69 
70 
71 protected:
72 
73 
74 
75 
76 
77 private:
78 
79 
80 
81 
82 friend class Storage_BaseDriver;
83 friend class Storage_CallBack;
84 friend class Storage_DefaultCallBack;
85 friend class Storage_HeaderData;
86 friend class Storage_Data;
87 friend class Storage_TypeData;
88 friend class Storage_RootData;
89 friend class Storage_Root;
90 friend class Storage_Schema;
91 friend class Storage_InternalData;
92 friend class Storage_stCONSTclCOM;
93 friend class Storage_TypedCallBack;
94 
95 };
96 
97 
98 
99 
100 
101 
102 
103 #endif // _Storage_HeaderFile
104