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_RootData_HeaderFile
0015 #define _StdStorage_RootData_HeaderFile
0016
0017 #include <Standard.hxx>
0018 #include <Standard_Type.hxx>
0019
0020 #include <Storage_Error.hxx>
0021 #include <TCollection_AsciiString.hxx>
0022 #include <Standard_Transient.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <StdStorage_MapOfRoots.hxx>
0025 #include <StdStorage_HSequenceOfRoots.hxx>
0026 class Storage_BaseDriver;
0027 class StdStorage_Root;
0028
0029 class StdStorage_RootData;
0030 DEFINE_STANDARD_HANDLE(StdStorage_RootData, Standard_Transient)
0031
0032
0033 class StdStorage_RootData
0034 : public Standard_Transient
0035 {
0036 friend class StdStorage_Data;
0037
0038 public:
0039
0040 DEFINE_STANDARD_RTTIEXT(StdStorage_RootData, Standard_Transient)
0041
0042
0043
0044
0045
0046 Standard_EXPORT Standard_Boolean Read(const Handle(Storage_BaseDriver)& theDriver);
0047
0048
0049
0050
0051
0052 Standard_EXPORT Standard_Boolean Write(const Handle(Storage_BaseDriver)& theDriver);
0053
0054
0055 Standard_EXPORT Standard_Integer NumberOfRoots() const;
0056
0057
0058
0059 Standard_EXPORT void AddRoot(const Handle(StdStorage_Root)& aRoot);
0060
0061
0062 Standard_EXPORT Handle(StdStorage_HSequenceOfRoots) Roots() const;
0063
0064
0065 Standard_EXPORT Handle(StdStorage_Root) Find(const TCollection_AsciiString& aName) const;
0066
0067
0068 Standard_EXPORT Standard_Boolean IsRoot(const TCollection_AsciiString& aName) const;
0069
0070
0071 Standard_EXPORT void RemoveRoot(const TCollection_AsciiString& aName);
0072
0073
0074 Standard_EXPORT Storage_Error ErrorStatus() const;
0075
0076
0077 Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
0078
0079
0080 Standard_EXPORT void ClearErrorStatus();
0081
0082
0083 Standard_EXPORT void Clear();
0084
0085 private:
0086
0087 Standard_EXPORT StdStorage_RootData();
0088
0089 Standard_EXPORT void SetErrorStatus(const Storage_Error anError);
0090
0091 Standard_EXPORT void SetErrorStatusExtension(const TCollection_AsciiString& anErrorExt);
0092
0093 StdStorage_MapOfRoots myObjects;
0094 Storage_Error myErrorStatus;
0095 TCollection_AsciiString myErrorStatusExt;
0096
0097 };
0098
0099 #endif