0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / IFSelect / IFSelect_SelectDeduct.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IFSelect_SelectDeduct_HeaderFile
18#define _IFSelect_SelectDeduct_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <IFSelect_Selection.hxx>
24#include <Standard_Boolean.hxx>
25class IFSelect_Selection;
26class IFSelect_SelectPointed;
27class Interface_InterfaceError;
28class Interface_EntityIterator;
29class Interface_Graph;
30class IFSelect_SelectionIterator;
31
32
33class IFSelect_SelectDeduct;
34DEFINE_STANDARD_HANDLE(IFSelect_SelectDeduct, IFSelect_Selection)
35
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)
41//!
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
48class IFSelect_SelectDeduct : public IFSelect_Selection
49{
50
51public:
52
53
54 //! Defines or Changes the Input Selection
55 Standard_EXPORT void SetInput (const Handle(IFSelect_Selection)& sel);
56
57 //! Returns the Input Selection
58 Standard_EXPORT Handle(IFSelect_Selection) Input() const;
59
60 //! Returns True if the Input Selection is defined, False else
61 Standard_EXPORT Standard_Boolean HasInput() const;
62
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;
66
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
71 //!
72 //! It is exploited by InputResult
73 Standard_EXPORT Handle(IFSelect_SelectPointed)& Alternate();
74
75 //! Returns the Result determined by Input Selection, as Unique
76 //! if Input Selection is not defined, returns an empty list.
77 //!
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;
81
82 //! Puts in an Iterator the Selections from which "me" depends
83 //! This list contains one Selection : the InputSelection
79104795 84 Standard_EXPORT void FillIterator (IFSelect_SelectionIterator& iter) const Standard_OVERRIDE;
42cf5bc1 85
86
87
88
92efcf78 89 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectDeduct,IFSelect_Selection)
42cf5bc1 90
91protected:
92
93
94
95
96private:
97
98
99 Handle(IFSelect_Selection) thesel;
100 Handle(IFSelect_SelectPointed) thealt;
101
102
103};
104
105
106
107
108
109
110
111#endif // _IFSelect_SelectDeduct_HeaderFile