File indexing completed on 2025-01-18 10:05:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _StdStorage_TypeData_HeaderFile
0015 #define _StdStorage_TypeData_HeaderFile
0016
0017 #include <Standard.hxx>
0018 #include <Standard_Type.hxx>
0019
0020 #include <StdStorage_MapOfTypes.hxx>
0021 #include <Storage_Error.hxx>
0022 #include <TCollection_AsciiString.hxx>
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <StdObjMgt_MapOfInstantiators.hxx>
0026 #include <TColStd_HSequenceOfAsciiString.hxx>
0027 class Storage_BaseDriver;
0028
0029 class StdStorage_TypeData;
0030 DEFINE_STANDARD_HANDLE(StdStorage_TypeData, Standard_Transient)
0031
0032
0033
0034 class StdStorage_TypeData
0035 : public Standard_Transient
0036 {
0037 friend class StdStorage_Data;
0038
0039 public:
0040
0041 DEFINE_STANDARD_RTTIEXT(StdStorage_TypeData, Standard_Transient)
0042
0043
0044
0045
0046
0047 Standard_EXPORT Standard_Boolean Read(const Handle(Storage_BaseDriver)& theDriver);
0048
0049
0050
0051
0052
0053 Standard_EXPORT Standard_Boolean Write(const Handle(Storage_BaseDriver)& theDriver);
0054
0055
0056 Standard_EXPORT Standard_Integer NumberOfTypes() const;
0057
0058
0059 Standard_EXPORT void AddType (const TCollection_AsciiString& aTypeName, const Standard_Integer aTypeNum);
0060
0061
0062 Standard_EXPORT Standard_Integer AddType (const Handle(StdObjMgt_Persistent)& aPObj);
0063
0064
0065 Standard_EXPORT TCollection_AsciiString Type (const Standard_Integer aTypeNum) const;
0066
0067
0068 Standard_EXPORT Standard_Integer Type (const TCollection_AsciiString& aTypeName) const;
0069
0070
0071 Standard_EXPORT StdObjMgt_Persistent::Instantiator Instantiator(const Standard_Integer aTypeNum) const;
0072
0073
0074 Standard_EXPORT Standard_Boolean IsType (const TCollection_AsciiString& aName) const;
0075
0076
0077 Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) Types() const;
0078
0079
0080 Standard_EXPORT Storage_Error ErrorStatus() const;
0081
0082
0083 Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
0084
0085
0086 Standard_EXPORT void ClearErrorStatus();
0087
0088
0089 Standard_EXPORT void Clear();
0090
0091 private:
0092
0093 Standard_EXPORT StdStorage_TypeData();
0094
0095 Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
0096
0097 Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
0098
0099 Standard_Integer myTypeId;
0100 StdObjMgt_MapOfInstantiators myMapOfPInst;
0101 StdStorage_MapOfTypes myPt;
0102 Storage_Error myErrorStatus;
0103 TCollection_AsciiString myErrorStatusExt;
0104
0105 };
0106
0107 #endif