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_SelectDeduct_HeaderFile
18 #define _IFSelect_SelectDeduct_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <IFSelect_Selection.hxx>
24 #include <Standard_Boolean.hxx>
25 class IFSelect_Selection;
26 class IFSelect_SelectPointed;
27 class Interface_InterfaceError;
28 class Interface_EntityIterator;
29 class Interface_Graph;
30 class IFSelect_SelectionIterator;
33 class IFSelect_SelectDeduct;
34 DEFINE_STANDARD_HANDLE(IFSelect_SelectDeduct, IFSelect_Selection)
36 //! A SelectDeduct determines a list of Entities from an Input
37 //! Selection, by a computation : Output list is not obliged to be
38 //! a sub-list of Input list
39 //! (for more specific, see SelectExtract for filtered sub-lists,
40 //! and SelectExplore for recurcive exploration)
42 //! A SelectDeduct may use an alternate input for one shot
43 //! This allows to use an already existing definition, by
44 //! overloading the input selection by an alternate list,
45 //! already defined, for one use :
46 //! If this alternate list is set, InputResult queries it instead
47 //! of calling the input selection, then clears it immediately
48 class IFSelect_SelectDeduct : public IFSelect_Selection
54 //! Defines or Changes the Input Selection
55 Standard_EXPORT void SetInput (const Handle(IFSelect_Selection)& sel);
57 //! Returns the Input Selection
58 Standard_EXPORT Handle(IFSelect_Selection) Input() const;
60 //! Returns True if the Input Selection is defined, False else
61 Standard_EXPORT Standard_Boolean HasInput() const;
63 //! Tells if an Alternate List has been set, i.e. : the Alternate
64 //! Definition is present and set
65 Standard_EXPORT Standard_Boolean HasAlternate() const;
67 //! Returns the Alternate Definition
68 //! It is returned modifiable, hence an already defined
69 //! SelectPointed can be used
70 //! But if it was not yet defined, it is created the first time
72 //! It is exploited by InputResult
73 Standard_EXPORT Handle(IFSelect_SelectPointed)& Alternate();
75 //! Returns the Result determined by Input Selection, as Unique
76 //! if Input Selection is not defined, returns an empty list.
78 //! If Alternate is set, InputResult takes its definition instead
79 //! of calling the Input Selection, then clears it
80 Standard_EXPORT Interface_EntityIterator InputResult (const Interface_Graph& G) const;
82 //! Puts in an Iterator the Selections from which "me" depends
83 //! This list contains one Selection : the InputSelection
84 Standard_EXPORT void FillIterator (IFSelect_SelectionIterator& iter) const Standard_OVERRIDE;
89 DEFINE_STANDARD_RTTI(IFSelect_SelectDeduct,IFSelect_Selection)
99 Handle(IFSelect_Selection) thesel;
100 Handle(IFSelect_SelectPointed) thealt;
111 #endif // _IFSelect_SelectDeduct_HeaderFile