0030480: Visualization - Clear of Select3D_SensitiveGroup does not update internal...
[occt.git] / src / Storage / Storage_TypeData.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_TypeData_HeaderFile
18 #define _Storage_TypeData_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
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;
31 class Storage_Schema;
32 class Storage_BaseDriver;
33 class TCollection_AsciiString;
34
35
36 class Storage_TypeData;
37 DEFINE_STANDARD_HANDLE(Storage_TypeData, Standard_Transient)
38
39
40 class Storage_TypeData : public Standard_Transient
41 {
42
43 public:
44
45   
46   Standard_EXPORT Storage_TypeData();
47
48   Standard_EXPORT Standard_Boolean Read (Storage_BaseDriver& theDriver);
49   
50   Standard_EXPORT Standard_Integer NumberOfTypes() const;
51
52   //! add a type to the list
53   Standard_EXPORT void AddType (const TCollection_AsciiString& aName, const Standard_Integer aTypeNum);
54   
55   //! returns the name of the type with number <aTypeNum>
56   Standard_EXPORT TCollection_AsciiString Type (const Standard_Integer aTypeNum) const;
57
58   //! returns the name of the type with number <aTypeNum>
59   Standard_EXPORT Standard_Integer Type (const TCollection_AsciiString& aTypeName) const;
60   
61   Standard_EXPORT Standard_Boolean IsType (const TCollection_AsciiString& aName) const;
62   
63   Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) Types() const;
64   
65   Standard_EXPORT Storage_Error ErrorStatus() const;
66   
67   Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
68   
69   Standard_EXPORT void ClearErrorStatus();
70   
71   Standard_EXPORT void Clear();
72
73
74 friend class Storage_Schema;
75
76
77   DEFINE_STANDARD_RTTIEXT(Storage_TypeData,Standard_Transient)
78
79 protected:
80
81
82
83
84 private:
85
86   
87   Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
88   
89   Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
90
91   Storage_PType myPt;
92   Storage_Error myErrorStatus;
93   TCollection_AsciiString myErrorStatusExt;
94
95
96 };
97
98
99
100
101
102
103
104 #endif // _Storage_TypeData_HeaderFile