0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / IFSelect / IFSelect_SelectControl.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-02-16
2// Created by: Christian CAILLET
3// Copyright (c) 1994-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_SelectControl_HeaderFile
18#define _IFSelect_SelectControl_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_SelectionIterator;
27
28
29class IFSelect_SelectControl;
30DEFINE_STANDARD_HANDLE(IFSelect_SelectControl, IFSelect_Selection)
31
32//! A SelectControl kind Selection works with two input Selections
33//! in a dissymmetric way : the Main Input which gives an input
34//! list of Entities, to be processed, and the Second Input which
35//! gives another list, to be used to filter the main input.
36//!
37//! e.g. : SelectDiff retains the items of the Main Input which
38//! are not in the Control Input (which acts as Diff Input)
39//! or a specific selection which retains Entities from the Main
40//! Input if and only if they are concerned by an entity from
41//! the Control Input (such as Views in IGES, etc...)
42//!
43//! The way RootResult and Label are produced are at charge of
44//! each sub-class
45class IFSelect_SelectControl : public IFSelect_Selection
46{
47
48public:
49
50
51 //! Returns the Main Input Selection
52 Standard_EXPORT Handle(IFSelect_Selection) MainInput() const;
53
54 //! Returns True if a Control Input is defined
55 //! Thus, Result can be computed differently if there is a
56 //! Control Input or if there is none
57 Standard_EXPORT Standard_Boolean HasSecondInput() const;
58
59 //! Returns the Control Input Selection, or a Null Handle
60 Standard_EXPORT Handle(IFSelect_Selection) SecondInput() const;
61
62 //! Sets a Selection to be the Main Input
63 Standard_EXPORT void SetMainInput (const Handle(IFSelect_Selection)& sel);
64
65 //! Sets a Selection to be the Control Input
66 Standard_EXPORT void SetSecondInput (const Handle(IFSelect_Selection)& sel);
67
68 //! Puts in an Iterator the Selections from which "me" depends
69 //! That is to say, the list of Input Selections
79104795 70 Standard_EXPORT void FillIterator (IFSelect_SelectionIterator& iter) const Standard_OVERRIDE;
42cf5bc1 71
72
73
74
92efcf78 75 DEFINE_STANDARD_RTTIEXT(IFSelect_SelectControl,IFSelect_Selection)
42cf5bc1 76
77protected:
78
79
80
81
82private:
83
84
85 Handle(IFSelect_Selection) themain;
86 Handle(IFSelect_Selection) thesecond;
87
88
89};
90
91
92
93
94
95
96
97#endif // _IFSelect_SelectControl_HeaderFile