1 // Created on: 1992-11-17
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IFSelect_SelectionIterator_HeaderFile
18 #define _IFSelect_SelectionIterator_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Integer.hxx>
25 #include <IFSelect_HSeqOfSelection.hxx>
26 #include <IFSelect_TSeqOfSelection.hxx>
27 #include <Standard_Boolean.hxx>
28 class Standard_NoSuchObject;
29 class IFSelect_Selection;
32 //! Defines an Iterator on a list of Selections
33 class IFSelect_SelectionIterator
40 //! Creates an empty iterator, ready to be filled
41 Standard_EXPORT IFSelect_SelectionIterator();
43 //! Creates an iterator from a Selection : it lists the Selections
44 //! from which <sel> depends (given by its method FillIterator)
45 Standard_EXPORT IFSelect_SelectionIterator(const Handle(IFSelect_Selection)& sel);
47 //! Adds to an iterator the content of another one
48 //! (each selection is present only once in the result)
49 Standard_EXPORT void AddFromIter (IFSelect_SelectionIterator& iter);
51 //! Adds a Selection to an iterator (if not yet noted)
52 Standard_EXPORT void AddItem (const Handle(IFSelect_Selection)& sel);
54 //! Adds a list of Selections to an iterator (this list comes
55 //! from the description of a Selection or a Dispatch, etc...)
56 Standard_EXPORT void AddList (const IFSelect_TSeqOfSelection& list);
58 //! Returns True if there are more Selections to get
59 Standard_EXPORT Standard_Boolean More() const;
61 //! Sets iterator to the next item
62 Standard_EXPORT void Next();
64 //! Returns the current Selction beeing iterated
65 //! Error if count of Selection has been passed
66 Standard_EXPORT const Handle(IFSelect_Selection)& Value() const;
81 Standard_Integer thecurr;
82 Handle(IFSelect_HSeqOfSelection) thelist;
93 #endif // _IFSelect_SelectionIterator_HeaderFile