Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:14:47

0001 // Created on: 1992-11-17
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1992-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 _IFSelect_SelectionIterator_HeaderFile
0018 #define _IFSelect_SelectionIterator_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <IFSelect_Selection.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <NCollection_HSequence.hxx>
0028 class IFSelect_Selection;
0029 
0030 //! Defines an Iterator on a list of Selections
0031 class IFSelect_SelectionIterator
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! Creates an empty iterator, ready to be filled
0037   Standard_EXPORT IFSelect_SelectionIterator();
0038 
0039   //! Creates an iterator from a Selection : it lists the Selections
0040   //! from which <sel> depends (given by its method FillIterator)
0041   Standard_EXPORT IFSelect_SelectionIterator(const occ::handle<IFSelect_Selection>& sel);
0042 
0043   //! Adds to an iterator the content of another one
0044   //! (each selection is present only once in the result)
0045   Standard_EXPORT void AddFromIter(IFSelect_SelectionIterator& iter);
0046 
0047   //! Adds a Selection to an iterator (if not yet noted)
0048   Standard_EXPORT void AddItem(const occ::handle<IFSelect_Selection>& sel);
0049 
0050   //! Adds a list of Selections to an iterator (this list comes
0051   //! from the description of a Selection or a Dispatch, etc...)
0052   Standard_EXPORT void AddList(const NCollection_Sequence<occ::handle<IFSelect_Selection>>& list);
0053 
0054   //! Returns True if there are more Selections to get
0055   Standard_EXPORT bool More() const;
0056 
0057   //! Sets iterator to the next item
0058   Standard_EXPORT void Next();
0059 
0060   //! Returns the current Selection being iterated
0061   //! Error if count of Selection has been passed
0062   Standard_EXPORT const occ::handle<IFSelect_Selection>& Value() const;
0063 
0064 private:
0065   int                                                                 thecurr;
0066   occ::handle<NCollection_HSequence<occ::handle<IFSelect_Selection>>> thelist;
0067 };
0068 
0069 #endif // _IFSelect_SelectionIterator_HeaderFile