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_RootData_HeaderFile
0018 #define _Storage_RootData_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Storage_MapOfPers.hxx>
0024 #include <Storage_Error.hxx>
0025 #include <TCollection_AsciiString.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <Storage_HSeqOfRoot.hxx>
0029 class Storage_BaseDriver;
0030 class Storage_Root;
0031 class Standard_Persistent;
0032 
0033 
0034 class Storage_RootData;
0035 DEFINE_STANDARD_HANDLE(Storage_RootData, Standard_Transient)
0036 
0037 
0038 class Storage_RootData : public Standard_Transient
0039 {
0040 
0041 public:
0042 
0043   
0044   Standard_EXPORT Storage_RootData();
0045 
0046   Standard_EXPORT Standard_Boolean Read (const Handle(Storage_BaseDriver)& theDriver);
0047   
0048   //! returns the number of roots.
0049   Standard_EXPORT Standard_Integer NumberOfRoots() const;
0050   
0051   //! add a root to <me>. If a root with same name is present, it
0052   //! will be replaced by <aRoot>.
0053   Standard_EXPORT void AddRoot (const Handle(Storage_Root)& aRoot);
0054   
0055   Standard_EXPORT Handle(Storage_HSeqOfRoot) Roots() const;
0056   
0057   //! find a root with name <aName>.
0058   Standard_EXPORT Handle(Storage_Root) Find (const TCollection_AsciiString& aName) const;
0059   
0060   //! returns Standard_True if <me> contains a root named <aName>
0061   Standard_EXPORT Standard_Boolean IsRoot (const TCollection_AsciiString& aName) const;
0062   
0063   //! remove the root named <aName>.
0064   Standard_EXPORT void RemoveRoot (const TCollection_AsciiString& aName);
0065   
0066   Standard_EXPORT Storage_Error ErrorStatus() const;
0067   
0068   Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
0069   
0070   Standard_EXPORT void ClearErrorStatus();
0071 
0072   Standard_EXPORT void UpdateRoot (const TCollection_AsciiString& aName, const Handle(Standard_Persistent)& aPers);
0073 
0074 friend class Storage_Schema;
0075 
0076 
0077   DEFINE_STANDARD_RTTIEXT(Storage_RootData,Standard_Transient)
0078 
0079 protected:
0080 
0081 
0082 
0083 
0084 private:
0085 
0086   
0087   
0088   Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
0089   
0090   Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
0091 
0092   Storage_MapOfPers myObjects;
0093   Storage_Error myErrorStatus;
0094   TCollection_AsciiString myErrorStatusExt;
0095 
0096 
0097 };
0098 
0099 
0100 
0101 
0102 
0103 
0104 
0105 #endif // _Storage_RootData_HeaderFile