Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:17

0001 // Created on: 1997-02-06
0002 // Created by: Kernel
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Storage_HeaderData_HeaderFile
0018 #define _Storage_HeaderData_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <TColStd_SequenceOfAsciiString.hxx>
0025 #include <TColStd_SequenceOfExtendedString.hxx>
0026 #include <Storage_Error.hxx>
0027 #include <Standard_Transient.hxx>
0028 class Storage_BaseDriver;
0029 
0030 
0031 class Storage_HeaderData;
0032 DEFINE_STANDARD_HANDLE(Storage_HeaderData, Standard_Transient)
0033 
0034 
0035 class Storage_HeaderData : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   
0041   Standard_EXPORT Storage_HeaderData();
0042 
0043   Standard_EXPORT Standard_Boolean Read (const Handle(Storage_BaseDriver)& theDriver);
0044   
0045   //! return the creation date
0046   Standard_EXPORT TCollection_AsciiString CreationDate() const;
0047   
0048   //! return the Storage package version
0049   Standard_EXPORT TCollection_AsciiString StorageVersion() const;
0050   
0051   //! get the version of the schema
0052   Standard_EXPORT TCollection_AsciiString SchemaVersion() const;
0053   
0054   //! get the schema's name
0055   Standard_EXPORT TCollection_AsciiString SchemaName() const;
0056   
0057   //! set the version of the application
0058   Standard_EXPORT void SetApplicationVersion (const TCollection_AsciiString& aVersion);
0059   
0060   //! get the version of the application
0061   Standard_EXPORT TCollection_AsciiString ApplicationVersion() const;
0062   
0063   //! set the name of the application
0064   Standard_EXPORT void SetApplicationName (const TCollection_ExtendedString& aName);
0065   
0066   //! get the name of the application
0067   Standard_EXPORT TCollection_ExtendedString ApplicationName() const;
0068   
0069   //! set the data type
0070   Standard_EXPORT void SetDataType (const TCollection_ExtendedString& aType);
0071   
0072   //! returns data type
0073   Standard_EXPORT TCollection_ExtendedString DataType() const;
0074   
0075   //! add <theUserInfo> to the user information
0076   Standard_EXPORT void AddToUserInfo (const TCollection_AsciiString& theUserInfo);
0077   
0078   //! return the user information
0079   Standard_EXPORT const TColStd_SequenceOfAsciiString& UserInfo() const;
0080   
0081   //! add <theUserInfo> to the user information
0082   Standard_EXPORT void AddToComments (const TCollection_ExtendedString& aComment);
0083   
0084   //! return the user information
0085   Standard_EXPORT const TColStd_SequenceOfExtendedString& Comments() const;
0086   
0087   //! the number of persistent objects
0088   //! Return:
0089   //! the number of persistent objects readed
0090   Standard_EXPORT Standard_Integer NumberOfObjects() const;
0091   
0092   Standard_EXPORT Storage_Error ErrorStatus() const;
0093   
0094   Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
0095   
0096   Standard_EXPORT void ClearErrorStatus();
0097 
0098 
0099 friend class Storage_Schema;
0100 
0101 
0102   DEFINE_STANDARD_RTTIEXT(Storage_HeaderData,Standard_Transient)
0103 
0104 public:
0105   
0106   Standard_EXPORT void SetNumberOfObjects (const Standard_Integer anObjectNumber);
0107   
0108   Standard_EXPORT void SetStorageVersion (const TCollection_AsciiString& aVersion);
0109 
0110   void SetStorageVersion (const Standard_Integer theVersion)
0111   {
0112     SetStorageVersion (TCollection_AsciiString (theVersion));
0113   }
0114 
0115   Standard_EXPORT void SetCreationDate (const TCollection_AsciiString& aDate);
0116   
0117   Standard_EXPORT void SetSchemaVersion (const TCollection_AsciiString& aVersion);
0118   
0119   Standard_EXPORT void SetSchemaName (const TCollection_AsciiString& aName);
0120 
0121 private:
0122  
0123   Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
0124   
0125   Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
0126 
0127   Standard_Integer myNBObj;
0128   TCollection_AsciiString myStorageVersion;
0129   TCollection_AsciiString mySchemaVersion;
0130   TCollection_AsciiString mySchemaName;
0131   TCollection_AsciiString myApplicationVersion;
0132   TCollection_ExtendedString myApplicationName;
0133   TCollection_ExtendedString myDataType;
0134   TCollection_AsciiString myDate;
0135   TColStd_SequenceOfAsciiString myUserInfo;
0136   TColStd_SequenceOfExtendedString myComments;
0137   Storage_Error myErrorStatus;
0138   TCollection_AsciiString myErrorStatusExt;
0139 
0140 
0141 };
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 #endif // _Storage_HeaderData_HeaderFile