Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-26 08:18:16

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_XLinkIterator_HeaderFile
0017 #define _TDocStd_XLinkIterator_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <TDocStd_XLinkPtr.hxx>
0024 #include <Standard_Boolean.hxx>
0025 class TDocStd_Document;
0026 
0027 //! Iterates on Reference attributes.
0028 //! This is an iterator giving all the external references
0029 //! of a Document.
0030 class TDocStd_XLinkIterator
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   //! Returns an empty iterator;
0036   Standard_EXPORT TDocStd_XLinkIterator();
0037 
0038   //! Creates an iterator on Reference of <D>.
0039   Standard_EXPORT TDocStd_XLinkIterator(const Handle(TDocStd_Document)& D);
0040 
0041   //! Restarts an iteration with <D>.
0042   Standard_EXPORT void Initialize(const Handle(TDocStd_Document)& D);
0043 
0044   //! Returns True if there is a current Item in the
0045   //! iteration.
0046   Standard_Boolean More() const;
0047 
0048   //! Move to the next item; raises if there is no more item.
0049   Standard_EXPORT void Next();
0050 
0051   //! Returns the current item; a null handle if there is none.
0052   TDocStd_XLinkPtr Value() const;
0053 
0054 protected:
0055 private:
0056   Standard_EXPORT void Init(const Handle(TDocStd_Document)& D);
0057 
0058   TDocStd_XLinkPtr myValue;
0059 };
0060 
0061 #include <TDocStd_XLinkIterator.lxx>
0062 
0063 #endif // _TDocStd_XLinkIterator_HeaderFile