Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:21

0001 // Created by: DAUTRY Philippe
0002 // Copyright (c) 1997-1999 Matra Datavision
0003 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _TDocStd_XLinkRoot_HeaderFile
0017 #define _TDocStd_XLinkRoot_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <TDocStd_XLinkPtr.hxx>
0023 #include <TDF_Attribute.hxx>
0024 #include <Standard_OStream.hxx>
0025 class Standard_GUID;
0026 class TDF_Data;
0027 class TDF_RelocationTable;
0028 
0029 
0030 class TDocStd_XLinkRoot;
0031 DEFINE_STANDARD_HANDLE(TDocStd_XLinkRoot, TDF_Attribute)
0032 
0033 //! This attribute is the root of all external
0034 //! references contained in a Data from TDF. Only one
0035 //! instance of this class is added to the TDF_Data
0036 //! root label. Starting from this attribute all the
0037 //! Reference are linked together, to be found easily.
0038 class TDocStd_XLinkRoot : public TDF_Attribute
0039 {
0040 
0041 public:
0042 
0043   
0044   //! Returns the ID: 2a96b61d-ec8b-11d0-bee7-080009dc3333
0045   Standard_EXPORT static const Standard_GUID& GetID();
0046   
0047   //! Sets an empty XLinkRoot to Root or gets the
0048   //! existing one. Only one attribute per TDF_Data.
0049   Standard_EXPORT static Handle(TDocStd_XLinkRoot) Set (const Handle(TDF_Data)& aDF);
0050   
0051   //! Inserts <anXLinkPtr> at the beginning of the XLink chain.
0052   Standard_EXPORT static void Insert (const TDocStd_XLinkPtr& anXLinkPtr);
0053   
0054   //! Removes <anXLinkPtr> from the XLink chain, if it exists.
0055   Standard_EXPORT static void Remove (const TDocStd_XLinkPtr& anXLinkPtr);
0056   
0057   //! Returns the ID of the attribute.
0058   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0059   
0060   //! Returns a null handle.
0061   Standard_EXPORT Handle(TDF_Attribute) BackupCopy() const Standard_OVERRIDE;
0062   
0063   //! Does nothing.
0064   Standard_EXPORT void Restore (const Handle(TDF_Attribute)& anAttribute) Standard_OVERRIDE;
0065   
0066   //! Returns a null handle.
0067   Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0068   
0069   //! Does nothing.
0070   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& intoAttribute, const Handle(TDF_RelocationTable)& aRelocationTable) const Standard_OVERRIDE;
0071   
0072   //! Dumps the attribute on <aStream>.
0073   Standard_EXPORT Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
0074 
0075 
0076 friend class TDocStd_XLinkIterator;
0077 
0078 
0079   DEFINE_STANDARD_RTTIEXT(TDocStd_XLinkRoot,TDF_Attribute)
0080 
0081 protected:
0082 
0083 
0084 
0085 
0086 private:
0087 
0088   
0089   //! Initializes fields.
0090   Standard_EXPORT TDocStd_XLinkRoot();
0091   
0092   //! Sets the field <myFirst> with <anXLinkPtr>.
0093     void First (const TDocStd_XLinkPtr& anXLinkPtr);
0094   
0095   //! Returns the contents of the field <myFirst>.
0096     TDocStd_XLinkPtr First() const;
0097 
0098   TDocStd_XLinkPtr myFirst;
0099 
0100 
0101 };
0102 
0103 
0104 #include <TDocStd_XLinkRoot.lxx>
0105 
0106 
0107 
0108 
0109 
0110 #endif // _TDocStd_XLinkRoot_HeaderFile