1 // Created on: 1997-02-06
3 // Copyright (c) 1997-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_TypeData_HeaderFile
18 #define _Storage_TypeData_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Storage_PType.hxx>
24 #include <Storage_Error.hxx>
25 #include <TCollection_AsciiString.hxx>
26 #include <Standard_Transient.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TColStd_HSequenceOfAsciiString.hxx>
30 class Standard_NoSuchObject;
32 class Storage_BaseDriver;
33 class TCollection_AsciiString;
36 class Storage_TypeData;
37 DEFINE_STANDARD_HANDLE(Storage_TypeData, Standard_Transient)
40 class Storage_TypeData : public Standard_Transient
46 Standard_EXPORT Storage_TypeData();
48 Standard_EXPORT Standard_Boolean Read (Storage_BaseDriver& theDriver);
50 Standard_EXPORT Standard_Integer NumberOfTypes() const;
52 //! add a type to the list
53 Standard_EXPORT void AddType (const TCollection_AsciiString& aName, const Standard_Integer aTypeNum);
55 //! returns the name of the type with number <aTypeNum>
56 Standard_EXPORT TCollection_AsciiString Type (const Standard_Integer aTypeNum) const;
58 //! returns the name of the type with number <aTypeNum>
59 Standard_EXPORT Standard_Integer Type (const TCollection_AsciiString& aTypeName) const;
61 Standard_EXPORT Standard_Boolean IsType (const TCollection_AsciiString& aName) const;
63 Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) Types() const;
65 Standard_EXPORT Storage_Error ErrorStatus() const;
67 Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
69 Standard_EXPORT void ClearErrorStatus();
71 Standard_EXPORT void Clear();
74 friend class Storage_Schema;
77 DEFINE_STANDARD_RTTIEXT(Storage_TypeData,Standard_Transient)
87 Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
89 Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
92 Storage_Error myErrorStatus;
93 TCollection_AsciiString myErrorStatusExt;
104 #endif // _Storage_TypeData_HeaderFile