0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool]
[occt.git] / src / Storage / Storage_HeaderData.hxx
1 // Created on: 1997-02-06
2 // Created by: Kernel
3 // Copyright (c) 1997-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_HeaderData_HeaderFile
18 #define _Storage_HeaderData_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <TColStd_SequenceOfAsciiString.hxx>
25 #include <TColStd_SequenceOfExtendedString.hxx>
26 #include <Storage_Error.hxx>
27 #include <Standard_Transient.hxx>
28 class Storage_BaseDriver;
29
30
31 class Storage_HeaderData;
32 DEFINE_STANDARD_HANDLE(Storage_HeaderData, Standard_Transient)
33
34
35 class Storage_HeaderData : public Standard_Transient
36 {
37
38 public:
39
40   
41   Standard_EXPORT Storage_HeaderData();
42
43   Standard_EXPORT Standard_Boolean Read (const Handle(Storage_BaseDriver)& theDriver);
44   
45   //! return the creation date
46   Standard_EXPORT TCollection_AsciiString CreationDate() const;
47   
48   //! return the Storage package version
49   Standard_EXPORT TCollection_AsciiString StorageVersion() const;
50   
51   //! get the version of the schema
52   Standard_EXPORT TCollection_AsciiString SchemaVersion() const;
53   
54   //! get the schema's name
55   Standard_EXPORT TCollection_AsciiString SchemaName() const;
56   
57   //! set the version of the application
58   Standard_EXPORT void SetApplicationVersion (const TCollection_AsciiString& aVersion);
59   
60   //! get the version of the application
61   Standard_EXPORT TCollection_AsciiString ApplicationVersion() const;
62   
63   //! set the name of the application
64   Standard_EXPORT void SetApplicationName (const TCollection_ExtendedString& aName);
65   
66   //! get the name of the application
67   Standard_EXPORT TCollection_ExtendedString ApplicationName() const;
68   
69   //! set the data type
70   Standard_EXPORT void SetDataType (const TCollection_ExtendedString& aType);
71   
72   //! returns data type
73   Standard_EXPORT TCollection_ExtendedString DataType() const;
74   
75   //! add <theUserInfo> to the user information
76   Standard_EXPORT void AddToUserInfo (const TCollection_AsciiString& theUserInfo);
77   
78   //! return the user information
79   Standard_EXPORT const TColStd_SequenceOfAsciiString& UserInfo() const;
80   
81   //! add <theUserInfo> to the user information
82   Standard_EXPORT void AddToComments (const TCollection_ExtendedString& aComment);
83   
84   //! return the user information
85   Standard_EXPORT const TColStd_SequenceOfExtendedString& Comments() const;
86   
87   //! the number of persistent objects
88   //! Return:
89   //! the number of persistent objects readed
90   Standard_EXPORT Standard_Integer NumberOfObjects() const;
91   
92   Standard_EXPORT Storage_Error ErrorStatus() const;
93   
94   Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
95   
96   Standard_EXPORT void ClearErrorStatus();
97
98
99 friend class Storage_Schema;
100
101
102   DEFINE_STANDARD_RTTIEXT(Storage_HeaderData,Standard_Transient)
103
104 public:
105   
106   Standard_EXPORT void SetNumberOfObjects (const Standard_Integer anObjectNumber);
107   
108   Standard_EXPORT void SetStorageVersion (const TCollection_AsciiString& aVersion);
109
110   void SetStorageVersion (const Standard_Integer theVersion)
111   {
112     SetStorageVersion (TCollection_AsciiString (theVersion));
113   }
114
115   Standard_EXPORT void SetCreationDate (const TCollection_AsciiString& aDate);
116   
117   Standard_EXPORT void SetSchemaVersion (const TCollection_AsciiString& aVersion);
118   
119   Standard_EXPORT void SetSchemaName (const TCollection_AsciiString& aName);
120
121 private:
122  
123   Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
124   
125   Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
126
127   Standard_Integer myNBObj;
128   TCollection_AsciiString myStorageVersion;
129   TCollection_AsciiString mySchemaVersion;
130   TCollection_AsciiString mySchemaName;
131   TCollection_AsciiString myApplicationVersion;
132   TCollection_ExtendedString myApplicationName;
133   TCollection_ExtendedString myDataType;
134   TCollection_AsciiString myDate;
135   TColStd_SequenceOfAsciiString myUserInfo;
136   TColStd_SequenceOfExtendedString myComments;
137   Storage_Error myErrorStatus;
138   TCollection_AsciiString myErrorStatusExt;
139
140
141 };
142
143
144
145
146
147
148
149 #endif // _Storage_HeaderData_HeaderFile