0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / Storage / Storage_HeaderData.hxx
CommitLineData
42cf5bc1 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 <TCollection_AsciiString.hxx>
25#include <TCollection_ExtendedString.hxx>
26#include <TColStd_SequenceOfAsciiString.hxx>
27#include <TColStd_SequenceOfExtendedString.hxx>
28#include <Storage_Error.hxx>
25e59720 29#include <Standard_Transient.hxx>
42cf5bc1 30class Storage_Schema;
7ed7467d 31class Storage_BaseDriver;
42cf5bc1 32class TCollection_AsciiString;
33class TCollection_ExtendedString;
34
35
36class Storage_HeaderData;
25e59720 37DEFINE_STANDARD_HANDLE(Storage_HeaderData, Standard_Transient)
42cf5bc1 38
39
25e59720 40class Storage_HeaderData : public Standard_Transient
42cf5bc1 41{
42
43public:
44
45
46 Standard_EXPORT Storage_HeaderData();
7ed7467d 47
39c8dc70 48 Standard_EXPORT Standard_Boolean Read (const Handle(Storage_BaseDriver)& theDriver);
42cf5bc1 49
50 //! return the creation date
51 Standard_EXPORT TCollection_AsciiString CreationDate() const;
52
53 //! return the Storage package version
54 Standard_EXPORT TCollection_AsciiString StorageVersion() const;
55
56 //! get the version of the schema
57 Standard_EXPORT TCollection_AsciiString SchemaVersion() const;
58
59 //! get the schema's name
60 Standard_EXPORT TCollection_AsciiString SchemaName() const;
61
62 //! set the version of the application
63 Standard_EXPORT void SetApplicationVersion (const TCollection_AsciiString& aVersion);
64
65 //! get the version of the application
66 Standard_EXPORT TCollection_AsciiString ApplicationVersion() const;
67
68 //! set the name of the application
69 Standard_EXPORT void SetApplicationName (const TCollection_ExtendedString& aName);
70
71 //! get the name of the application
72 Standard_EXPORT TCollection_ExtendedString ApplicationName() const;
73
74 //! set the data type
75 Standard_EXPORT void SetDataType (const TCollection_ExtendedString& aType);
76
77 //! returns data type
78 Standard_EXPORT TCollection_ExtendedString DataType() const;
79
80 //! add <theUserInfo> to the user informations
81 Standard_EXPORT void AddToUserInfo (const TCollection_AsciiString& theUserInfo);
82
83 //! return the user informations
84 Standard_EXPORT const TColStd_SequenceOfAsciiString& UserInfo() const;
85
86 //! add <theUserInfo> to the user informations
87 Standard_EXPORT void AddToComments (const TCollection_ExtendedString& aComment);
88
89 //! return the user informations
90 Standard_EXPORT const TColStd_SequenceOfExtendedString& Comments() const;
91
92 //! the the number of persistent objects
93 //! Return:
94 //! the number of persistent objects readed
95 Standard_EXPORT Standard_Integer NumberOfObjects() const;
96
97 Standard_EXPORT Storage_Error ErrorStatus() const;
98
99 Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
100
101 Standard_EXPORT void ClearErrorStatus();
102
103
104friend class Storage_Schema;
105
106
25e59720 107 DEFINE_STANDARD_RTTIEXT(Storage_HeaderData,Standard_Transient)
42cf5bc1 108
4ff92abe 109public:
42cf5bc1 110
111 Standard_EXPORT void SetNumberOfObjects (const Standard_Integer anObjectNumber);
112
113 Standard_EXPORT void SetStorageVersion (const TCollection_AsciiString& aVersion);
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);
4ff92abe 120
121private:
122
42cf5bc1 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