1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-15 11:44:07 +03:00
occt/src/Storage/Storage_RootData.hxx
abv 42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00

107 lines
2.8 KiB
C++

// Created on: 1997-02-06
// Created by: Kernel
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Storage_RootData_HeaderFile
#define _Storage_RootData_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Storage_MapOfPers.hxx>
#include <Storage_Error.hxx>
#include <TCollection_AsciiString.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Integer.hxx>
#include <Storage_HSeqOfRoot.hxx>
#include <Standard_Boolean.hxx>
class Standard_NoSuchObject;
class Storage_Schema;
class Storage_Root;
class TCollection_AsciiString;
class Standard_Persistent;
class Storage_RootData;
DEFINE_STANDARD_HANDLE(Storage_RootData, MMgt_TShared)
class Storage_RootData : public MMgt_TShared
{
public:
Standard_EXPORT Storage_RootData();
//! returns the number of roots.
Standard_EXPORT Standard_Integer NumberOfRoots() const;
//! add a root to <me>. If a root with same name is present, it
//! will be replaced by <aRoot>.
Standard_EXPORT void AddRoot (const Handle(Storage_Root)& aRoot);
Standard_EXPORT Handle(Storage_HSeqOfRoot) Roots() const;
//! find a root with name <aName>.
Standard_EXPORT Handle(Storage_Root) Find (const TCollection_AsciiString& aName) const;
//! returns Standard_True if <me> contains a root named <aName>
Standard_EXPORT Standard_Boolean IsRoot (const TCollection_AsciiString& aName) const;
//! remove the root named <aName>.
Standard_EXPORT void RemoveRoot (const TCollection_AsciiString& aName);
Standard_EXPORT Storage_Error ErrorStatus() const;
Standard_EXPORT TCollection_AsciiString ErrorStatusExtension() const;
Standard_EXPORT void ClearErrorStatus();
friend class Storage_Schema;
DEFINE_STANDARD_RTTI(Storage_RootData,MMgt_TShared)
protected:
private:
Standard_EXPORT void UpdateRoot (const TCollection_AsciiString& aName, const Handle(Standard_Persistent)& aPers);
Standard_EXPORT void SetErrorStatus (const Storage_Error anError);
Standard_EXPORT void SetErrorStatusExtension (const TCollection_AsciiString& anErrorExt);
Storage_MapOfPers myObjects;
Storage_Error myErrorStatus;
TCollection_AsciiString myErrorStatusExt;
};
#endif // _Storage_RootData_HeaderFile